:root {
  --bg: #0a0614;
  --bg2: #120a22;
  --panel: rgba(18, 10, 36, 0.72);
  --panel-border: rgba(180, 90, 255, 0.25);
  --neon-pink: #ff2d95;
  --neon-purple: #b44aff;
  --neon-cyan: #2de2e6;
  --neon-lime: #7cff6b;
  --neon-yellow: #ffe566;
  --text: #f3eaff;
  --muted: #9b8bb8;
  --frog-green: #4a9c3a;
  --frog-shirt: #5b4fcf;
  --radius: 16px;
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --glow-pink: 0 0 20px rgba(255, 45, 149, 0.55);
  --glow-cyan: 0 0 20px rgba(45, 226, 230, 0.45);
  --glow-purple: 0 0 24px rgba(180, 74, 255, 0.5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  min-height: 100dvh;
  min-height: 100svh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(180, 74, 255, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(255, 45, 149, 0.12), transparent 50%),
    radial-gradient(ellipse 40% 35% at 90% 60%, rgba(45, 226, 230, 0.1), transparent 50%),
    var(--bg);
}

body.playing {
  --pulse: 1;
}

/* Vibe-reactive atmosphere */
body[data-vibe="techno"] {
  --vibe-accent: var(--neon-pink);
  --vibe-glow: rgba(255, 45, 149, 0.35);
}
body[data-vibe="house"] {
  --vibe-accent: #ff9f43;
  --vibe-glow: rgba(255, 159, 67, 0.35);
}
body[data-vibe="pastel"] {
  --vibe-accent: #ff8ad8;
  --vibe-glow: rgba(255, 138, 216, 0.35);
}
body[data-vibe="soft"] {
  --vibe-accent: var(--neon-cyan);
  --vibe-glow: rgba(45, 226, 230, 0.3);
}

body[data-vibe="house"] {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 159, 67, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(255, 45, 149, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 35% at 90% 60%, rgba(180, 74, 255, 0.12), transparent 50%),
    var(--bg);
}
body[data-vibe="pastel"] {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 138, 216, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 75%, rgba(124, 255, 107, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 35% at 85% 55%, rgba(180, 74, 255, 0.15), transparent 50%),
    var(--bg);
}
body[data-vibe="soft"] {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(45, 226, 230, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(100, 140, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 40% 35% at 90% 60%, rgba(180, 74, 255, 0.1), transparent 50%),
    var(--bg);
}

#bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(180, 74, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 74, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  pointer-events: none;
  z-index: 0;
}

#viz {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}

#emote-layer,
#particles {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  opacity: 0.5;
}

/* —— Header —— */
.top-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(10, 6, 20, 0.65);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-frog {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--neon-lime);
  box-shadow: 0 0 16px rgba(124, 255, 107, 0.4);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.brand .accent {
  color: var(--neon-pink);
  text-shadow: var(--glow-pink);
}

.tagline {
  margin: 0.1rem 0 0;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 45, 149, 0.4);
  background: rgba(255, 45, 149, 0.1);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--neon-pink);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-pink);
  box-shadow: var(--glow-pink);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

body.playing .pulse-dot {
  animation-duration: 0.55s;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.75);
  }
}

.top-actions {
  display: flex;
  gap: 0.5rem;
}

.chip {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.chip:hover {
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.chip:active {
  transform: scale(0.96);
}

.chip.active {
  border-color: var(--neon-lime);
  color: var(--neon-lime);
  box-shadow: 0 0 14px rgba(124, 255, 107, 0.35);
}

.chip.pulse-once {
  animation: chip-pulse 0.4s ease;
}

@keyframes chip-pulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

/* Toast feedback for top actions */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(120%);
  z-index: 200;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(18, 10, 36, 0.92);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), var(--glow-purple);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  max-width: min(90vw, 360px);
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* —— Stage —— */
.stage {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.booth {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 0.75rem;
  align-items: end;
  padding: 1.75rem 1rem 1.5rem;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(30, 14, 55, 0.55), rgba(12, 6, 24, 0.85));
  overflow: hidden;
  min-height: 420px;
}

.booth-glow {
  position: absolute;
  left: 50%;
  bottom: -40%;
  width: 70%;
  height: 80%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(180, 74, 255, 0.35), transparent 65%);
  pointer-events: none;
  animation: booth-breathe 3s ease-in-out infinite;
}

body.playing .booth-glow {
  animation-duration: 1.1s;
  background: radial-gradient(ellipse, rgba(255, 45, 149, 0.4), transparent 65%);
}

@keyframes booth-breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }
}

.deck {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 1;
}

.vinyl {
  --vinyl-size: 160px;
  width: var(--vinyl-size);
  height: var(--vinyl-size);
  border-radius: 50%;
  position: relative;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  /* Outer shell does NOT rotate — keeps hit-testing stable */
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #2a2a2a, #0a0a0a 70%);
  border: 3px solid #3a3a3a;
  box-shadow:
    0 0 0 5px rgba(180, 74, 255, 0.22),
    0 14px 32px rgba(0, 0, 0, 0.55),
    inset 0 0 24px rgba(0, 0, 0, 0.65);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
}

.vinyl:hover {
  border-color: var(--neon-purple);
  box-shadow:
    0 0 0 5px rgba(180, 74, 255, 0.4),
    0 14px 32px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(180, 74, 255, 0.35),
    inset 0 0 24px rgba(0, 0, 0, 0.65);
}

.vinyl:active,
.vinyl.is-scrubbing {
  cursor: grabbing;
  border-color: var(--neon-pink);
  transform: scale(1.03);
  box-shadow:
    0 0 0 6px rgba(255, 45, 149, 0.45),
    0 14px 32px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(255, 45, 149, 0.45),
    inset 0 0 24px rgba(0, 0, 0, 0.65);
}

.vinyl-disc {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  will-change: transform;
  pointer-events: none;
}

.vinyl-grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle at center,
      #141414 0 2px,
      #0c0c0c 2px 4px
    );
  opacity: 0.95;
}

.vinyl-disc::after {
  content: "";
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  background: #111;
  border: 2px solid #444;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8);
  z-index: 1;
}

.deck-hint {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-align: center;
  max-width: 11rem;
  line-height: 1.3;
  opacity: 0.9;
}

body.is-scrubbing {
  cursor: grabbing;
}

body.is-scrubbing .booth {
  user-select: none;
}

body.is-scrubbing .frog,
body.is-scrubbing .peepo-dj {
  animation-play-state: paused !important;
}

.vinyl-label {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  display: grid;
  place-items: center;
  box-shadow: 0 0 14px rgba(255, 45, 149, 0.45);
}

.vinyl-label img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
  pointer-events: none;
}

/* Spin is JS-driven on .vinyl-disc — no CSS animation fight */

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
}

.eq-bars span {
  width: 5px;
  border-radius: 2px;
  background: linear-gradient(to top, var(--neon-purple), var(--neon-cyan));
  height: 20%;
  transition: height 0.08s linear;
  box-shadow: 0 0 6px rgba(45, 226, 230, 0.4);
}

.dj-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  text-align: center;
}

.spotlight {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 220px;
  background: linear-gradient(180deg, rgba(255, 229, 102, 0.18), transparent 70%);
  clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
  pointer-events: none;
  opacity: 0.7;
}

body.playing .spotlight {
  animation: spot-flicker 2.4s ease-in-out infinite;
}

@keyframes spot-flicker {
  0%,
  100% {
    opacity: 0.55;
  }
  40% {
    opacity: 0.9;
  }
  60% {
    opacity: 0.7;
  }
}

.frog-stage {
  position: relative;
  width: min(340px, 72vw);
  height: min(340px, 72vw);
  display: grid;
  place-items: center;
}

.frog {
  width: min(300px, 64vw);
  height: min(300px, 64vw);
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(124, 255, 107, 0.5));
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.08s linear;
  z-index: 2;
}

body.playing .frog {
  animation: frog-bob 0.55s ease-in-out infinite;
}

body.playing.paused .frog {
  animation-play-state: paused;
}

@keyframes frog-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-14px) rotate(2deg);
  }
}

.peepo-dj {
  position: absolute;
  right: -4%;
  bottom: 2%;
  width: min(140px, 30vw);
  height: min(140px, 30vw);
  z-index: 3;
  filter: drop-shadow(0 0 16px rgba(180, 74, 255, 0.75));
  image-rendering: auto;
  -webkit-user-drag: none;
}

body.playing .peepo-dj {
  animation: peepo-hop 0.55s ease-in-out infinite;
  animation-delay: 0.12s;
}

@keyframes peepo-hop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-18px) scale(1.06);
  }
}

.now-playing {
  margin-top: 0.75rem;
  max-width: min(420px, 92vw);
}

.np-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.np-label {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.track-vibe-chip {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.track-vibe-chip.techno {
  color: var(--neon-pink);
  border-color: rgba(255, 45, 149, 0.4);
  background: rgba(255, 45, 149, 0.12);
}
.track-vibe-chip.house {
  color: #ffb36b;
  border-color: rgba(255, 159, 67, 0.45);
  background: rgba(255, 159, 67, 0.12);
}
.track-vibe-chip.pastel {
  color: #ff9edc;
  border-color: rgba(255, 138, 216, 0.45);
  background: rgba(255, 138, 216, 0.12);
}
.track-vibe-chip.soft {
  color: var(--neon-cyan);
  border-color: rgba(45, 226, 230, 0.4);
  background: rgba(45, 226, 230, 0.1);
}

.track-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 0 20px rgba(243, 234, 255, 0.3);
}

.track-meta {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* —— Mixer —— */
.mixer {
  padding: 1rem 1.25rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.progress-row,
.volume-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.progress-row span,
.vol-icon {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 2.4rem;
}

#seek,
#volume {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

#seek::-webkit-slider-thumb,
#volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--neon-pink);
  box-shadow: var(--glow-pink);
  border: 2px solid #fff;
  cursor: pointer;
}

#seek::-moz-range-thumb,
#volume::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--neon-pink);
  box-shadow: var(--glow-pink);
  border: 2px solid #fff;
  cursor: pointer;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
}

.ctrl {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.ctrl:hover {
  border-color: var(--neon-purple);
  box-shadow: var(--glow-purple);
  transform: translateY(-1px);
}

.ctrl:active {
  transform: scale(0.94);
}

.ctrl.play {
  width: 64px;
  height: 64px;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  border: none;
  box-shadow: var(--glow-pink);
}

.ctrl.play:hover {
  box-shadow: 0 0 28px rgba(255, 45, 149, 0.7);
}

.ctrl.active {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

/* —— Playlist —— */
.playlist-panel {
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--panel-border);
}

.panel-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--neon-yellow);
  text-shadow: 0 0 12px rgba(255, 229, 102, 0.4);
}

.track-count {
  font-size: 0.75rem;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filter {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.filter .count {
  font-size: 0.65rem;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

.filter:hover {
  color: var(--text);
  border-color: var(--panel-border);
}

.filter.active {
  color: var(--bg);
  background: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.filter.active .count {
  opacity: 0.9;
}

.search-row {
  padding: 0.55rem 0.85rem 0.25rem;
}

#playlist-search {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#playlist-search::placeholder {
  color: var(--muted);
}

#playlist-search:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px rgba(180, 74, 255, 0.2);
}

.playlist {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-purple) transparent;
}

.playlist li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s, transform 0.1s;
}

.playlist li:hover {
  background: rgba(180, 74, 255, 0.12);
}

.playlist li.active {
  background: linear-gradient(90deg, rgba(255, 45, 149, 0.2), rgba(180, 74, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(255, 45, 149, 0.35);
}

.playlist li.empty {
  display: block;
  text-align: center;
  color: var(--muted);
  cursor: default;
  padding: 1.25rem;
}

.playlist li.empty:hover {
  background: transparent;
}

.playlist li .num {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--muted);
  min-width: 1.5rem;
}

.playlist li.active .num {
  color: var(--neon-pink);
}

.playlist li .name {
  font-weight: 600;
  font-size: 0.92rem;
}

.playlist li .badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.playlist li .badge.techno {
  color: var(--neon-pink);
  background: rgba(255, 45, 149, 0.15);
}

.playlist li .badge.house {
  color: #ffb36b;
  background: rgba(255, 159, 67, 0.14);
}

.playlist li .badge.pastel {
  color: #ff9edc;
  background: rgba(255, 138, 216, 0.14);
}

.playlist li .badge.soft {
  color: var(--neon-cyan);
  background: rgba(45, 226, 230, 0.12);
}

.set-stats {
  margin: 0;
  padding: 0.5rem 1rem 0.75rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(180, 90, 255, 0.12);
}

.keys-hint {
  margin: 0;
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* —— Emote bar —— */
.emote-bar {
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  padding: 0.85rem 1rem 1rem;
}

.emote-hint {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.04em;
}

.emote-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.emote-btn {
  width: 52px;
  height: 52px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
  display: grid;
  place-items: center;
}

.emote-btn:hover {
  transform: scale(1.12) translateY(-2px);
  border-color: var(--neon-purple);
  box-shadow: var(--glow-purple);
}

.emote-btn:active {
  transform: scale(0.95);
}

.emote-btn img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Flying emotes */
.fly-emote {
  position: absolute;
  width: 48px;
  height: 48px;
  object-fit: contain;
  pointer-events: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 8px rgba(180, 74, 255, 0.5));
  z-index: 1;
}

.fly-emote.big {
  width: 72px;
  height: 72px;
}

/* Native audio fallback — collapsed unless needed */
.native-audio-wrap {
  position: relative;
  z-index: 20;
  max-width: 1100px;
  margin: 0 auto 0.5rem;
  padding: 0 1rem 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.native-audio-wrap summary {
  cursor: pointer;
  text-align: center;
  padding: 0.4rem;
  border-radius: 8px;
  list-style: none;
}

.native-audio-wrap summary::-webkit-details-marker {
  display: none;
}

.native-audio-wrap summary:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.native-audio-wrap audio {
  width: 100%;
  height: 44px;
  margin-top: 0.5rem;
  border-radius: 10px;
  outline: none;
  background: rgba(18, 10, 36, 0.9);
}

.enter-sub {
  margin: 0.85rem 0 0 !important;
  font-size: 0.75rem !important;
  opacity: 0.7;
}

/* —— Footer —— */
.footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer a {
  color: var(--neon-cyan);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer .sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

/* —— Enter overlay —— */
.enter-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(180, 74, 255, 0.25), transparent 55%),
    rgba(6, 3, 14, 0.92);
  backdrop-filter: blur(8px);
  transition: opacity 0.45s ease, visibility 0.45s;
}

.enter-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.enter-card {
  text-align: center;
  padding: 2rem 2.25rem;
  border-radius: 24px;
  border: 1px solid var(--panel-border);
  background: rgba(18, 10, 36, 0.85);
  box-shadow: 0 0 60px rgba(180, 74, 255, 0.25);
  max-width: 360px;
  position: relative;
}

.enter-frog {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(124, 255, 107, 0.5));
  animation: frog-bob 1.2s ease-in-out infinite;
}

.enter-peepo {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 0 12px rgba(255, 45, 149, 0.6));
}

.enter-card h2 {
  margin: 0.75rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  background: linear-gradient(90deg, var(--neon-lime), var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.enter-card p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.enter-btn {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple), #5b4fcf);
  box-shadow: var(--glow-pink);
  transition: transform 0.15s, box-shadow 0.15s;
}

.enter-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 32px rgba(255, 45, 149, 0.7);
}

.enter-btn:active {
  transform: scale(0.97);
}

/* —— Responsive / mobile —— */
.top-bar {
  padding-top: max(0.85rem, env(safe-area-inset-top, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

.stage {
  padding-bottom: max(5rem, calc(3rem + env(safe-area-inset-bottom, 0px)));
}

.ctrl,
.chip,
.filter,
.emote-btn,
.enter-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ctrl {
  min-width: 48px;
  min-height: 48px;
}

.ctrl.play {
  min-width: 64px;
  min-height: 64px;
}

.chip {
  min-height: 40px;
  padding: 0.45rem 0.85rem;
}

@media (max-width: 900px) {
  .booth {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 0.75rem;
    padding: 1.25rem 0.75rem 1.5rem;
  }

  /* Vinyls stay usable on mobile — under the frog */
  .booth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "center center"
      "left right";
    align-items: start;
    justify-items: center;
  }

  .dj-center {
    grid-area: center;
    width: 100%;
  }

  .deck-left {
    grid-area: left;
    display: flex;
    flex-direction: column;
  }

  .deck-right {
    grid-area: right;
    display: flex;
    flex-direction: column;
  }

  .deck .eq-bars {
    display: none;
  }

  .vinyl {
    --vinyl-size: 132px;
  }

  .vinyl-label {
    width: 50px;
    height: 50px;
  }

  .vinyl-label img {
    width: 42px;
    height: 42px;
  }

  .deck-hint {
    font-size: 0.65rem;
  }

  .frog-stage {
    width: min(280px, 78vw);
    height: min(280px, 78vw);
  }

  .frog {
    width: min(250px, 70vw);
    height: min(250px, 70vw);
  }

  .peepo-dj {
    width: min(120px, 32vw);
    height: min(120px, 32vw);
  }

  .spotlight {
    width: 240px;
    height: 260px;
  }

  .live-pill {
    display: none;
  }

  .top-bar {
    flex-wrap: wrap;
    gap: 0.65rem;
    row-gap: 0.5rem;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand h1 {
    font-size: 0.95rem;
  }

  .top-actions {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .track-title {
    font-size: 1.05rem;
  }

  .keys-hint {
    display: none;
  }

  .playlist {
    max-height: min(40vh, 280px);
  }

  .mixer {
    position: sticky;
    bottom: 0;
    z-index: 15;
    border-radius: 16px 16px 0 0;
    margin: 0 -0.25rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .stage {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    gap: 0.85rem;
    /* room so sticky mixer doesn't cover playlist / emotes */
    padding-bottom: max(7.5rem, calc(6rem + env(safe-area-inset-bottom, 0px)));
  }

  .scanlines {
    opacity: 0.25;
  }

  .footer {
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .native-audio-wrap {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }

  #seek,
  #volume {
    min-height: 28px;
  }

  .enter-overlay {
    padding: max(1rem, env(safe-area-inset-top, 0px)) 0.75rem
      max(1rem, env(safe-area-inset-bottom, 0px));
    align-items: center;
  }

  .enter-btn {
    width: 100%;
    min-height: 52px;
  }

  /* Keep center viz room — don't crush frog on short phones */
  .booth {
    min-height: 0;
    overflow: visible;
  }

  .emote-picker {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
  }

  .emote-picker::-webkit-scrollbar {
    display: none;
  }

  .emote-btn {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
  }

  .enter-card {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
    padding: 1.5rem 1.25rem;
  }

  .enter-frog {
    width: min(160px, 40vw);
    height: min(160px, 40vw);
  }

  .enter-peepo {
    width: 72px;
    height: 72px;
    right: 1.25rem;
    top: 1.75rem;
  }

  .filters {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
  }

  .filter {
    flex: 0 0 auto;
  }
}

@media (max-width: 420px) {
  .brand .tagline {
    display: none;
  }

  .chip {
    font-size: 0.75rem;
    padding: 0.4rem 0.65rem;
  }

  .controls {
    gap: 0.4rem;
  }

  .ctrl:not(.play) {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 1rem;
  }
}

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