:root {
  --bg: #07060c;
  --ink: #f4f1ff;
  --muted: #9a93c2;
  --neon: #c6ff3a;
  --neon-2: #ff3ea5;
  --neon-3: #3ad7ff;
  --card: rgba(22, 18, 38, 0.72);
  --line: rgba(255, 255, 255, 0.08);
}

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

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.stage {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.2rem, 4vw, 3rem) 1.2rem 2rem;
  isolation: isolate;
}

/* Ambient glows */
.glow {
  position: fixed;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  z-index: -2;
  pointer-events: none;
}
.glow-a { background: radial-gradient(circle, var(--neon-2), transparent 60%); top: -25vmax; left: -15vmax; }
.glow-b { background: radial-gradient(circle, var(--neon-3), transparent 60%); bottom: -30vmax; right: -20vmax; }

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Masthead */
.masthead { text-align: center; margin-bottom: clamp(1.5rem, 5vh, 3rem); }
.logo {
  font-family: 'Anton', sans-serif;
  font-size: clamp(3rem, 13vw, 7rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: linear-gradient(100deg, var(--neon), var(--neon-3) 55%, var(--neon-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(198, 255, 58, 0.18));
}
.logo span { display: block; color: var(--ink); -webkit-text-fill-color: var(--ink); }
.tagline {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  max-width: 32ch;
  margin-inline: auto;
}

/* Booth / panels */
.booth { width: 100%; max-width: 640px; flex: 1; display: flex; align-items: flex-start; justify-content: center; }
.panel {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(1.6rem, 5vw, 2.6rem);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  text-align: center;
}
.hidden { display: none !important; }

.mic { font-size: 4.5rem; margin-bottom: 1.2rem; filter: drop-shadow(0 8px 20px rgba(255, 62, 165, 0.4)); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }

.drop-btn {
  position: relative;
  border: none;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 3.4vw, 1.5rem);
  letter-spacing: 0.02em;
  color: #0a0a0a;
  padding: 1rem 2.4rem;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--neon), var(--neon-3));
  box-shadow: 0 0 0 0 rgba(198, 255, 58, 0.6);
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}
.drop-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 40px -10px rgba(58, 215, 255, 0.6); }
.drop-btn:active { transform: scale(0.97); }
.drop-btn.small { font-size: 1rem; padding: 0.7rem 1.5rem; }
.hint { margin-top: 1.4rem; color: var(--muted); font-size: 0.9rem; max-width: 36ch; margin-inline: auto; }

/* Loader */
.loader { display: flex; gap: 0.5rem; justify-content: center; align-items: flex-end; height: 60px; margin-bottom: 1.2rem; }
.loader span {
  width: 9px; border-radius: 6px;
  background: linear-gradient(var(--neon), var(--neon-2));
  animation: bars 1s ease-in-out infinite;
}
.loader span:nth-child(1) { animation-delay: 0s; }
.loader span:nth-child(2) { animation-delay: 0.15s; }
.loader span:nth-child(3) { animation-delay: 0.3s; }
.loader span:nth-child(4) { animation-delay: 0.45s; }
.loader span:nth-child(5) { animation-delay: 0.6s; }
@keyframes bars { 0%, 100% { height: 14px; } 50% { height: 56px; } }
.loading-text { font-family: 'Space Grotesk', sans-serif; color: var(--muted); letter-spacing: 0.04em; }

/* Now playing */
.now-playing { display: flex; align-items: center; gap: 1rem; text-align: left; margin-bottom: 1.3rem; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 46px; width: 64px; flex: none; }
.eq span {
  flex: 1; border-radius: 3px;
  background: linear-gradient(var(--neon-3), var(--neon-2));
  height: 20%;
}
.eq.live span { animation: eq 0.8s ease-in-out infinite; }
.eq.live span:nth-child(odd) { animation-duration: 0.65s; }
.eq.live span:nth-child(3n) { animation-duration: 1s; }
@keyframes eq { 0%, 100% { height: 18%; } 50% { height: 100%; } }

.track-meta { min-width: 0; }
.track-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(1.4rem, 5vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
}
.track-ref { color: var(--neon); font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.9rem; margin-top: 0.3rem; }

.verse-source {
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  border-left: 2px solid var(--neon-2);
  padding: 0.4rem 0 0.4rem 0.9rem;
  margin-bottom: 1.4rem;
}

/* Lyrics */
.lyrics-wrap {
  text-align: left;
  max-height: 46vh;
  overflow-y: auto;
  padding-right: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-2) transparent;
  -webkit-mask-image: linear-gradient(transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(transparent, #000 8%, #000 92%, transparent);
}
.lyrics { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; padding: 0.6rem 0; }
.lyrics li {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  font-weight: 500;
  color: rgba(244, 241, 255, 0.32);
  transition: color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  transform-origin: left center;
}
.lyrics li.done { color: rgba(244, 241, 255, 0.5); }
.lyrics li.active {
  color: var(--ink);
  font-weight: 700;
  transform: scale(1.04);
  text-shadow: 0 0 22px rgba(198, 255, 58, 0.35);
}
.lyrics li.active::before {
  content: '▶';
  color: var(--neon);
  font-size: 0.7em;
  margin-right: 0.5em;
  vertical-align: middle;
}

/* Controls */
.controls { display: flex; gap: 0.8rem; justify-content: center; align-items: center; margin-top: 1.6rem; }
.ghost-btn {
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ghost-btn:hover { border-color: var(--neon-2); background: rgba(255, 62, 165, 0.08); }

.err-text { color: var(--neon-2); margin-bottom: 1.2rem; font-weight: 500; }

.footnote {
  margin-top: 2rem;
  color: rgba(154, 147, 194, 0.6);
  font-size: 0.72rem;
  max-width: 50ch;
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .now-playing { gap: 0.7rem; }
  .eq { width: 48px; }
}
