:root {
  --bg-primary: #F5F5F7;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #FAFAFA;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-heavy: rgba(0, 0, 0, 0.15);
  --text-primary: #1D1D1F;
  --text-secondary: #86868B;
  --text-muted: #AEAEB2;
  --accent: #0071E3;
  --accent-hover: #0077ED;
  --accent-muted: #E8F0FE;

  --font-mono: 'SF Mono', 'Menlo', 'Courier New', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;

  --font-size-xs: 0.7rem;
  --font-size-sm: 0.8rem;
  --font-size-base: 0.95rem;
  --font-size-lg: 1.15rem;
  --font-size-xl: 1.5rem;
  --font-size-display: 2rem;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 980px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* === HEADER === */
.site-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-title {
  font-family: var(--font-display);
  font-size: var(--font-size-display);
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 2px;
  position: relative;
}

.site-title a {
  color: inherit;
  text-decoration: none;
  position: relative;
  display: inline-block;
  animation: glitch-trigger 15s step-end infinite;
}

.site-title a::before,
.site-title a::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.site-title a::before {
  color: #ff003c;
  animation: glitch-r 15s step-end infinite;
}

.site-title a::after {
  color: #00e5ff;
  animation: glitch-c 15s step-end infinite;
}

/* ~0.3s burst at the end of a 15s cycle (98%-100% = 300ms) */
@keyframes glitch-trigger {
  0%, 97.9% { transform: none; }
  98% { transform: translateX(-3px) skewX(-1.5deg); }
  98.4% { transform: translateX(2px) skewX(1deg); }
  98.8% { transform: translateX(-1px); }
  99.2% { transform: translateX(1px) skewX(-0.5deg); }
  99.6% { transform: none; }
  100% { transform: none; }
}

@keyframes glitch-r {
  0%, 97.9% { opacity: 0; }
  98% { opacity: 0.9; clip-path: inset(15% 0 55% 0); transform: translateX(-4px); }
  98.3% { opacity: 0; }
  98.6% { opacity: 0.7; clip-path: inset(55% 0 15% 0); transform: translateX(3px); }
  98.9% { opacity: 0; }
  99.2% { opacity: 0.8; clip-path: inset(30% 0 40% 0); transform: translateX(-2px); }
  99.5% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes glitch-c {
  0%, 97.9% { opacity: 0; }
  98.1% { opacity: 0.8; clip-path: inset(50% 0 20% 0); transform: translateX(4px); }
  98.4% { opacity: 0; }
  98.7% { opacity: 0.9; clip-path: inset(10% 0 65% 0); transform: translateX(-3px); }
  99% { opacity: 0; }
  99.3% { opacity: 0.7; clip-path: inset(40% 0 25% 0); transform: translateX(2px); }
  99.6% { opacity: 0; }
  100% { opacity: 0; }
}

.site-subtitle {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: block;
  font-weight: 300;
}

.surveillance-notice {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
  letter-spacing: 0.12em;
  font-weight: 300;
  text-transform: uppercase;
}

/* === USER AGREEMENT BANNER === */
.user-agreement-banner {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: center;
  letter-spacing: 0.01em;
  line-height: 1.6;
  font-weight: 400;
  transition: all 0.4s ease;
}

.user-agreement-banner.dismissed {
  max-height: 0;
  padding: 0;
  overflow: hidden;
  border: none;
  opacity: 0;
}

.agree-btn {
  display: inline-block;
  margin-left: var(--space-md);
  padding: 3px 12px;
  background: var(--text-primary);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  color: #FFFFFF;
  transition: opacity 0.2s ease;
  text-transform: uppercase;
}

.agree-btn:hover {
  opacity: 0.85;
}

/* === FOOTER === */
.site-footer {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  text-align: center;
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 2;
  margin-top: var(--space-xl);
  font-weight: 300;
}

/* === UFO EASTER EGG === */
.ufo {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  font-size: 0;
  line-height: 1;
}

.ufo-craft {
  display: block;
  width: 28px;
  height: 14px;
  position: relative;
}

/* Dome */
.ufo-craft::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 7px;
  background: radial-gradient(ellipse at center, rgba(180, 210, 240, 0.9), rgba(140, 180, 220, 0.7));
  border-radius: 50% 50% 0 0;
}

/* Body */
.ufo-craft::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 8px;
  background: linear-gradient(180deg, #A0A0A8, #78787F);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ufo.flying {
  opacity: 1;
  animation: ufo-fly 8s linear forwards;
}

@keyframes ufo-fly {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  3% {
    opacity: 0.85;
  }
  15% {
    transform: translate(-15vw, -6px);
  }
  30% {
    transform: translate(-30vw, 2px);
  }
  50% {
    transform: translate(-55vw, -4px);
  }
  70% {
    transform: translate(-75vw, 1px);
  }
  85% {
    transform: translate(-95vw, -3px);
  }
  95% {
    opacity: 0.85;
  }
  100% {
    transform: translate(-115vw, -1px);
    opacity: 0;
  }
}

/* === FIGHTER JET === */
.jet {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  font-size: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

.jet-trail {
  display: block;
  width: 90px;
  height: 1.5px;
  background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.15) 30%, rgba(255,255,255,0.45) 100%);
  filter: blur(0.8px);
  margin-right: -2px;
  flex-shrink: 0;
}

.jet-craft {
  display: block;
  width: 20px;
  height: 10px;
  background: #3a3a3a;
  clip-path: polygon(
    100% 50%,
    70% 35%,
    55% 0%,
    40% 35%,
    0% 30%,
    8% 50%,
    0% 70%,
    40% 65%,
    55% 100%,
    70% 65%
  );
  flex-shrink: 0;
  position: relative;
}

.jet.flying {
  opacity: 1;
  animation: jet-fly 2.5s linear forwards;
}

@keyframes jet-fly {
  0% {
    transform: translate(0, 0) rotate(-2deg);
    opacity: 0;
  }
  2% {
    opacity: 0.9;
  }
  96% {
    opacity: 0.9;
  }
  100% {
    transform: translate(calc(100vw + 140px), -12px) rotate(-2deg);
    opacity: 0;
  }
}

/* === HEAVEN EFFECT === */
.heaven {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}

.heaven.active {
  animation: heaven-cycle 10s ease-in-out forwards;
}

@keyframes heaven-cycle {
  0% { opacity: 0; }
  12% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}

/* Warm wash */
.heaven::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 220, 150, 0.18) 0%, rgba(255, 200, 120, 0.06) 100%);
}

/* Main golden glow from above */
.heaven-glow {
  position: absolute;
  top: -20%;
  left: 25%;
  width: 50%;
  height: 120%;
  background: radial-gradient(ellipse at 50% 15%,
    rgba(255, 235, 160, 0.55) 0%,
    rgba(255, 215, 120, 0.3) 18%,
    rgba(255, 200, 90, 0.12) 40%,
    rgba(255, 180, 60, 0.04) 60%,
    transparent 80%
  );
}

.heaven.active .heaven-glow {
  animation: glow-breathe 5s ease-in-out infinite;
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* God rays */
.heaven-rays {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(172deg, transparent 20%, rgba(255, 235, 170, 0.2) 42%, transparent 46%),
    linear-gradient(182deg, transparent 15%, rgba(255, 225, 150, 0.15) 39%, transparent 43%),
    linear-gradient(192deg, transparent 18%, rgba(255, 240, 180, 0.12) 37%, transparent 41%),
    linear-gradient(162deg, transparent 22%, rgba(255, 230, 160, 0.17) 43%, transparent 47%),
    linear-gradient(200deg, transparent 20%, rgba(255, 220, 140, 0.1) 40%, transparent 44%),
    linear-gradient(155deg, transparent 25%, rgba(255, 245, 190, 0.09) 45%, transparent 49%);
}

.heaven.active .heaven-rays {
  animation: rays-shimmer 4s ease-in-out infinite;
}

@keyframes rays-shimmer {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

/* Anamorphic lens streak */
.heaven-streak {
  position: absolute;
  top: 18%;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 240, 200, 0.2) 15%,
    rgba(255, 250, 230, 0.45) 42%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 250, 230, 0.45) 58%,
    rgba(255, 240, 200, 0.2) 85%,
    transparent 100%
  );
  filter: blur(1px);
}

.heaven.active .heaven-streak {
  animation: streak-pulse 3s ease-in-out infinite;
}

@keyframes streak-pulse {
  0%, 100% { opacity: 0.3; transform: scaleX(0.92); }
  50% { opacity: 1; transform: scaleX(1.08); }
}

/* Lens flare spots */
.heaven-flare {
  position: absolute;
  border-radius: 50%;
}

/* Main bright source */
.heaven-flare-1 {
  top: 6%;
  left: 46%;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle,
    rgba(255, 250, 235, 0.95) 0%,
    rgba(255, 235, 170, 0.5) 20%,
    rgba(255, 210, 110, 0.15) 50%,
    transparent 70%
  );
}

.heaven.active .heaven-flare-1 {
  animation: flare-glow 3.5s ease-in-out infinite;
}

/* Blue ghost artifact */
.heaven-flare-2 {
  top: 42%;
  left: 53%;
  width: 16px;
  height: 16px;
  background: radial-gradient(circle,
    rgba(180, 210, 255, 0.7) 0%,
    rgba(160, 190, 255, 0.25) 45%,
    transparent 70%
  );
}

.heaven.active .heaven-flare-2 {
  animation: flare-glow 2.5s ease-in-out 0.6s infinite;
}

/* Small warm artifact */
.heaven-flare-3 {
  top: 60%;
  left: 42%;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle,
    rgba(255, 200, 140, 0.8) 0%,
    rgba(255, 175, 100, 0.25) 50%,
    transparent 70%
  );
}

.heaven.active .heaven-flare-3 {
  animation: flare-glow 2s ease-in-out 1.2s infinite;
}

@keyframes flare-glow {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.4); opacity: 1; }
}

/* === UTILITY === */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 680px) {
  .site-header {
    padding: var(--space-md);
  }

  .site-title {
    font-size: 1.5rem;
    letter-spacing: 0.15em;
  }

  .site-subtitle {
    font-size: 0.6rem;
  }

  .user-agreement-banner {
    font-size: 0.6rem;
    padding: var(--space-sm) var(--space-md);
  }
}
