/* ============================================
   K-POP AI Audition Kazakhstan — Main Styles
   ============================================ */

:root {
  --blue: #0047A0;
  --red: #CD2E3A;
  --cyan: #6BE7FF;
  --pink: #FF6AE5;
  --bg: #050510;
  --bg-card: rgba(255, 255, 255, 0.04);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.65);
  --font-display: 'Orbitron', 'Noto Sans KR', sans-serif;
  --font-body: 'Exo 2', 'Noto Sans KR', sans-serif;
  --transition-scene: 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  --glow-blue: 0 0 40px rgba(0, 71, 160, 0.6);
  --glow-cyan: 0 0 30px rgba(107, 231, 255, 0.5);
  --glow-pink: 0 0 30px rgba(255, 106, 229, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  word-break: keep-all;
  text-wrap: balance;
}

html {
  font-size: 16px;
  scroll-behavior: auto;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Spotlight Layer ---- */
.spotlight-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 11;
  overflow: hidden;
}

.spotlight {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.spotlight-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
}

.spotlight-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--pink) 0%, transparent 70%);
}

/* ---- Particle Canvas ---- */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 11;
  pointer-events: none;
}

/* ---- Three.js Container ---- */
#three-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(300px, 42vw);
  height: min(440px, 58vw);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}

#three-container.visible {
  opacity: 1;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55));
}

#three-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ---- Persistent UI ---- */
.persistent-ui {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  pointer-events: none;
}

.persistent-ui > * {
  pointer-events: auto;
}

.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  line-height: 1;
}

.logo-k {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--red);
  letter-spacing: 0.05em;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
}

.logo-sub {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.ui-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-selector {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-card);
  border-radius: 6px;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.lang-btn.active,
.lang-btn:hover {
  color: var(--text);
  background: rgba(107, 231, 255, 0.15);
}

.music-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.music-toggle svg {
  width: 16px;
  height: 16px;
}

.music-toggle .icon-music-off {
  display: none;
}

.music-toggle.muted .icon-music-on {
  display: none;
}

.music-toggle.muted .icon-music-off {
  display: block;
}

.music-toggle.active {
  color: var(--cyan);
  border-color: rgba(107, 231, 255, 0.3);
}

.btn-join {
  background: linear-gradient(135deg, var(--red), #a02030);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-join:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(205, 46, 58, 0.5);
}

.progress-indicator {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 100;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.progress-current {
  color: var(--cyan);
}

/* ---- Scene Container ---- */
#scene-container {
  position: fixed;
  inset: 0;
  z-index: 10;
}

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: opacity var(--transition-scene),
              transform var(--transition-scene),
              visibility var(--transition-scene);
  overflow: hidden;
}

.scene.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scene.exit-up {
  opacity: 0;
  transform: translateY(-30px);
}

.scene.exit-down {
  opacity: 0;
  transform: translateY(30px);
}

.scene-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.scene-bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  will-change: transform;
}

.scene-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 16, 0.35) 0%,
    rgba(5, 5, 16, 0.55) 50%,
    rgba(5, 5, 16, 0.72) 100%
  );
}

.scene-bg > *:not(.scene-bg-img):not(.scene-bg-overlay) {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.scene-vfx {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.scene-content {
  position: relative;
  z-index: 5;
  padding: 2rem;
  max-width: 900px;
  text-align: center;
}

.scene-content-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---- Typography ---- */
.headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-shadow: 0 0 40px rgba(107, 231, 255, 0.15);
}

.headline-xl {
  font-size: clamp(3rem, 10vw, 6.5rem);
}

.subheadline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.08em;
  font-family: var(--font-body);
}

.text-accent {
  color: var(--red);
}

.text-cyan {
  color: var(--cyan);
}

.text-pink {
  color: var(--pink);
}

.text-gradient {
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.scene-tag {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

/* ---- Scene Backgrounds (tint overlays on top of images) ---- */
.scene-bg-dark .scene-bg-overlay {
  background:
    radial-gradient(ellipse at center top, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, rgba(5, 5, 16, 0.45) 0%, rgba(5, 5, 16, 0.82) 100%);
}

.scene-bg-stage .scene-bg-overlay {
  background:
    linear-gradient(180deg, transparent 40%, rgba(0, 71, 160, 0.35) 100%),
    radial-gradient(ellipse at 50% 100%, rgba(205, 46, 58, 0.2) 0%, transparent 60%),
    linear-gradient(180deg, rgba(5, 5, 16, 0.25) 0%, rgba(5, 5, 16, 0.6) 100%);
}

.scene-bg-stage .crowd-lights {
  inset: auto 0 0 0;
  height: 40%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 8px,
    rgba(107, 231, 255, 0.03) 8px,
    rgba(107, 231, 255, 0.03) 10px
  );
  animation: crowdPulse 3s ease-in-out infinite;
}

@keyframes crowdPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.stage-lights-sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg at 50% 0%, transparent, rgba(107, 231, 255, 0.08), transparent, rgba(255, 106, 229, 0.08), transparent);
  animation: lightSweep 8s linear infinite;
}

@keyframes lightSweep {
  to { transform: rotate(360deg); }
}

.scene-bg-rhythm .scene-bg-overlay {
  background:
    linear-gradient(135deg, rgba(0, 71, 160, 0.45) 0%, transparent 50%),
    linear-gradient(225deg, rgba(255, 106, 229, 0.25) 0%, transparent 50%),
    linear-gradient(180deg, rgba(5, 5, 16, 0.3) 0%, rgba(5, 5, 16, 0.65) 100%);
}

.scene-bg-dance .scene-bg-overlay {
  background:
    radial-gradient(circle at 30% 70%, rgba(255, 106, 229, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(107, 231, 255, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, rgba(5, 5, 16, 0.35) 0%, rgba(5, 5, 16, 0.68) 100%);
}

.scene-bg-esports .scene-bg-overlay {
  background:
    linear-gradient(180deg, rgba(0, 71, 160, 0.5) 0%, transparent 30%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(107, 231, 255, 0.04) 2px, rgba(107, 231, 255, 0.04) 4px),
    linear-gradient(180deg, rgba(5, 5, 16, 0.35) 0%, rgba(5, 5, 16, 0.65) 100%);
}

.scene-bg-broadcast .scene-bg-overlay {
  background:
    linear-gradient(180deg, rgba(205, 46, 58, 0.2) 0%, transparent 40%),
    linear-gradient(180deg, rgba(5, 5, 16, 0.35) 0%, rgba(5, 5, 16, 0.68) 100%);
}

.scene-bg-broadcast .led-walls {
  inset: 10%;
  border: 2px solid rgba(107, 231, 255, 0.2);
  background: repeating-linear-gradient(
    90deg,
    rgba(107, 231, 255, 0.05) 0px,
    rgba(107, 231, 255, 0.05) 4px,
    transparent 4px,
    transparent 8px
  );
  animation: ledFlicker 4s ease-in-out infinite;
}

@keyframes ledFlicker {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.scene-bg-countdown .scene-bg-overlay {
  background:
    radial-gradient(circle at center, rgba(205, 46, 58, 0.35) 0%, transparent 50%),
    linear-gradient(180deg, rgba(5, 5, 16, 0.4) 0%, rgba(5, 5, 16, 0.72) 100%);
}

.scene-bg-academy .scene-bg-overlay {
  background:
    linear-gradient(135deg, rgba(0, 71, 160, 0.35) 0%, transparent 60%),
    linear-gradient(180deg, rgba(5, 5, 16, 0.35) 0%, rgba(5, 5, 16, 0.65) 100%);
}

.scene-bg-debut .scene-bg-overlay {
  background:
    radial-gradient(ellipse at 50% 80%, rgba(255, 106, 229, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 20%, rgba(107, 231, 255, 0.25) 0%, transparent 40%),
    linear-gradient(180deg, rgba(5, 5, 16, 0.3) 0%, rgba(5, 5, 16, 0.62) 100%);
}

.scene-bg-debut .confetti-container {
  inset: 0;
}

/* ---- Scene 0: Enter ---- */
.enter-spotlight,
.cta-spotlight {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
  animation: spotlightPulse 4s ease-in-out infinite;
}

@keyframes spotlightPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.btn-enter-stage {
  position: relative;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 1.2rem 3rem;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.2s;
}

.btn-enter-stage:hover {
  border-color: var(--cyan);
  transform: scale(1.02);
}

.btn-enter-stage .btn-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
  filter: blur(20px);
}

.btn-enter-stage:hover .btn-glow {
  opacity: 0.4;
}

.enter-subtitle {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ---- Music Consent ---- */
.music-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: blur(8px);
}

.music-consent-overlay[hidden] {
  display: none;
}

.music-consent-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  max-width: 420px;
  margin: 1rem;
}

.music-consent-card h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.music-consent-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.music-consent-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn-primary,
.btn-secondary {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #0066cc);
  color: var(--text);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-blue);
}

.btn-glow-lg {
  font-size: 1rem;
  padding: 1.1rem 2.5rem;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---- Scene 2: Singing Game UI ---- */
.game-ui {
  margin-bottom: 2rem;
}

.score-panel {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 1.5rem;
}

.score-item {
  text-align: center;
}

.score-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.score-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--cyan);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.score-value.combo {
  color: var(--pink);
}

#waveform-canvas {
  width: min(500px, 90vw);
  height: 80px;
  border: 1px solid rgba(107, 231, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
}

/* ---- Scene 3: Dance ---- */
.dance-visual {
  position: relative;
  width: 200px;
  height: 280px;
  margin: 0 auto 2rem;
}

.dance-silhouette {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--pink) 0%, transparent 100%);
  clip-path: polygon(35% 0%, 65% 0%, 70% 15%, 60% 15%, 55% 35%, 70% 35%, 75% 55%, 60% 55%, 55% 100%, 45% 100%, 40% 55%, 25% 55%, 30% 35%, 45% 35%, 40% 15%, 30% 15%);
  opacity: 0.7;
  animation: danceMove 2s ease-in-out infinite alternate;
}

@keyframes danceMove {
  from { transform: translateX(-5px) rotate(-2deg); }
  to { transform: translateX(5px) rotate(2deg); }
}

.motion-trackers {
  position: absolute;
  inset: 0;
}

.tracker {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  animation: trackerPulse 1.5s ease-in-out infinite;
}

.tracker:nth-child(1) { top: 5%; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.tracker:nth-child(2) { top: 35%; left: 30%; animation-delay: 0.3s; }
.tracker:nth-child(3) { top: 35%; right: 30%; animation-delay: 0.6s; }
.tracker:nth-child(4) { bottom: 10%; left: 50%; transform: translateX(-50%); animation-delay: 0.9s; }

@keyframes trackerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107, 231, 255, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(107, 231, 255, 0); }
}

/* ---- Scene 4: Leaderboard ---- */
.leaderboard {
  max-width: 400px;
  margin: 2rem auto;
  text-align: left;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.3s, border-color 0.3s;
  animation: rankSlideIn 0.6s ease backwards;
}

.leaderboard-row:nth-child(1) { animation-delay: 0.1s; }
.leaderboard-row:nth-child(2) { animation-delay: 0.2s; }
.leaderboard-row:nth-child(3) { animation-delay: 0.3s; }
.leaderboard-row:nth-child(4) { animation-delay: 0.4s; }
.leaderboard-row:nth-child(5) { animation-delay: 0.5s; }

@keyframes rankSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.leaderboard-row:hover {
  transform: translateX(4px);
  border-color: rgba(107, 231, 255, 0.3);
}

.leaderboard-row.rank-1 .rank { color: #ffd700; }
.leaderboard-row.rank-2 .rank { color: #c0c0c0; }
.leaderboard-row.rank-3 .rank { color: #cd7f32; }

.rank {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.player {
  font-weight: 600;
}

.points {
  color: var(--cyan);
  font-family: var(--font-display);
}

/* ---- Scene 5: TV Show ---- */
.episode-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
}

.episode-num {
  font-family: var(--font-display);
  font-size: 6rem;
  line-height: 1;
  color: var(--red);
  text-shadow: var(--glow-pink);
}

.episode-label {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

/* ---- Scene 6: Selection ---- */
.countdown-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.countdown-from,
.countdown-to {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 1;
}

.countdown-from {
  color: var(--text-muted);
  opacity: 0.5;
}

.countdown-to {
  color: var(--red);
  text-shadow: 0 0 40px rgba(205, 46, 58, 0.6);
}

.countdown-arrow {
  font-size: 3rem;
  color: var(--cyan);
  animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---- Scene 7: Academy ---- */
.academy-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.academy-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  min-width: 100px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.academy-item:hover {
  transform: translateY(-4px) rotateX(5deg);
  box-shadow: var(--glow-cyan);
}

.academy-icon {
  font-size: 2rem;
}

.academy-item span:last-child {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Scene 8: Confetti ---- */
.confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  animation: confettiFall linear infinite;
}

@keyframes confettiFall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ---- Scene 9: CTA ---- */
.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ---- Navigation ---- */
.nav-hints {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-arrow {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow:hover {
  color: var(--cyan);
  border-color: rgba(107, 231, 255, 0.4);
}

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ---- Trailer Modal ---- */
.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trailer-modal[hidden] {
  display: none;
}

.trailer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.trailer-content {
  position: relative;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0;
  max-width: 960px;
  width: 90%;
  overflow: hidden;
}

.trailer-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.trailer-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.trailer-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Parallax ---- */
.parallax-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.parallax-bg {
  background: radial-gradient(circle at 20% 80%, rgba(0, 71, 160, 0.2) 0%, transparent 40%);
}

.parallax-fg {
  background: radial-gradient(circle at 80% 20%, rgba(255, 106, 229, 0.1) 0%, transparent 30%);
}

/* ---- 3D Tilt Cards ---- */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

/* ---- SEO Hidden Content ---- */
.seo-content {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scene {
    transition: opacity 0.3s ease;
    transform: none !important;
  }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .persistent-ui {
    padding: 1rem;
  }

  .logo-k { font-size: 1.5rem; }
  .logo-text { font-size: 0.9rem; }
  .logo-sub { display: none; }

  .music-label { display: none; }

  .btn-join {
    padding: 0.5rem 0.8rem;
    font-size: 0.65rem;
  }

  .lang-selector {
    display: none;
  }

  .progress-indicator {
    bottom: 1rem;
    left: 1rem;
    font-size: 1.2rem;
  }

  .nav-hints {
    right: 1rem;
  }

  .nav-arrow {
    width: 36px;
    height: 36px;
  }

  .score-panel {
    gap: 1.5rem;
  }

  .countdown-visual {
    gap: 1rem;
  }

  .academy-icons {
    gap: 1rem;
  }

  .academy-item {
    min-width: 80px;
    padding: 1rem;
  }

  #three-container {
    width: 70vw;
    height: 70vw;
    opacity: 0.5;
  }
}

@media (max-width: 480px) {
  .ui-controls {
    gap: 0.5rem;
  }

  .headline-xl {
    font-size: clamp(2rem, 12vw, 3.5rem);
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 280px;
  }
}
