/* Melissa's Mixtape - MTV 1985-1995 broadcast look.
   Husky purple base, gold + neon pink/cyan, hard sticker shadows,
   CRT scanlines, glitch verdicts, lower-third video credits. */

:root {
  --bg: #150a2d;
  --surface: #261347;
  --surface-2: #36205f;
  --border: #4b2e83;
  --text: #ffffff;
  --text-dim: #c4b6e8;
  --purple: #4b2e83;
  --purple-bright: #8a6fc8;
  --gold: #ffc700;
  --pink: #ff2d95;
  --cyan: #19e3ff;
  --red: #ef476f;
  --spotify: #1db954;
  --radius: 12px;
  --display: 'Bungee', 'Arial Black', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 45, 149, 0.18) 0%, transparent 55%),
    radial-gradient(700px 500px at -10% 30%, rgba(25, 227, 255, 0.10) 0%, transparent 55%),
    radial-gradient(1200px 600px at 50% 110%, #3a2566 0%, var(--bg) 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ---- CRT scanlines + flicker ------------------------------------- */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.14) 2px 4px
  );
  animation: flicker 6s infinite;
  mix-blend-mode: multiply;
}
@keyframes flicker {
  0%, 100% { opacity: 0.55; }
  92% { opacity: 0.55; }
  93% { opacity: 0.85; }
  94% { opacity: 0.45; }
  95% { opacity: 0.7; }
  96% { opacity: 0.55; }
}

/* ---- Memphis shapes floating behind everything --------------------- */
.shapes { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.shapes span { position: absolute; opacity: 0.5; animation: drift 14s ease-in-out infinite; }
.shape-tri {
  width: 0; height: 0;
  border-left: 26px solid transparent;
  border-right: 26px solid transparent;
  border-bottom: 44px solid var(--pink);
  top: 16%; left: 6%;
  transform: rotate(-12deg);
}
.shape-ring {
  width: 54px; height: 54px;
  border: 8px solid var(--cyan);
  border-radius: 50%;
  top: 64%; right: 7%;
  animation-delay: -4s;
}
.shape-zig {
  width: 90px; height: 30px;
  top: 38%; right: 12%;
  background: linear-gradient(135deg, transparent 0 8px, var(--gold) 8px 14px, transparent 14px 22px) 0 0 / 22px 30px repeat-x;
  transform: rotate(8deg);
  animation-delay: -8s;
}
.shape-cross {
  width: 34px; height: 34px;
  bottom: 12%; left: 10%;
  background:
    linear-gradient(var(--gold), var(--gold)) 50% 0 / 8px 100% no-repeat,
    linear-gradient(var(--gold), var(--gold)) 0 50% / 100% 8px no-repeat;
  transform: rotate(18deg);
  animation-delay: -2s;
}
.shape-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--pink);
  top: 8%; right: 28%;
  animation-delay: -6s;
}
@keyframes drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}

/* ---- Top bar / wordmark -------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 3px solid var(--gold);
  /* Sticky so the wordmark (a Home button) is always one tap away on mobile,
     no matter how far down the lyrics or category list you've scrolled. */
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 10, 45, 0.95);
  backdrop-filter: blur(6px);
}

.logo {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer; /* doubles as a Home button */
}
.logo-m {
  height: 3.2em;
  width: auto;
  display: block;
  filter: drop-shadow(4px 4px 0 var(--pink));
  transform: rotate(-3deg);
}
.logo-stack { display: flex; flex-direction: column; line-height: 1; }
.logo-text {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 3px 3px 0 #000;
}
.logo-text em { font-style: normal; color: var(--gold); }
.logo-sub {
  margin-top: 4px;
  align-self: flex-start;
  background: #fff;
  color: #000;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: 0.22em;
  padding: 1px 7px;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px;
  position: relative;
  z-index: 1;
}

/* ---- Cards: sticker look -------------------------------------------- */
.card {
  background: var(--surface);
  border: 3px solid var(--purple-bright);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
  animation: rise 0.35s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.card h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
}

.hidden { display: none !important; }

.fine-print { color: var(--text-dim); font-size: 0.85rem; }

.how-list { padding-left: 20px; margin: 0 0 10px; }
.how-list li { margin-bottom: 6px; }

/* ---- Buttons: chunky, hard shadows ----------------------------------- */
.btn {
  border: 3px solid #000;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }

.btn-primary { background: var(--gold); color: #14092b; }
.btn-primary:hover { background: #ffd84d; }

.btn-spotify { background: var(--spotify); color: #04130a; }
.btn-spotify:hover { background: #2ee46a; }

.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: #46307a; }

.btn-small { padding: 6px 12px; font-size: 0.72rem; box-shadow: 3px 3px 0 #000; }
.btn-big { padding: 11px 18px; font-size: 0.95rem; font-family: var(--display); font-weight: 400; }

.user-chip { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 0.9rem; }

/* ---- Scoreboard ------------------------------------------------------- */
.stats-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.stat {
  flex: 1;
  background: var(--surface);
  border: 3px solid var(--purple-bright);
  border-radius: var(--radius);
  padding: 8px 6px;
  text-align: center;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55);
}
.stat-num {
  display: block;
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--text);
  line-height: 1.1;
  text-shadow: 2px 2px 0 var(--pink);
}
.stat-streak .stat-num { color: var(--gold); text-shadow: 2px 2px 0 #000; }
.stat-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 700;
}
.stat-best { display: block; font-size: 0.7rem; color: var(--text-dim); }

.stat-num.pop { animation: pop 0.45s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.45) rotate(-3deg); }
  100% { transform: scale(1); }
}

/* ---- Mode nav --------------------------------------------------------- */
.mode-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  min-height: 28px;
}
.mode-title {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--cyan);
  text-shadow: 2px 2px 0 #000;
}

/* ---- Mode cards (home): each gets its own neon ------------------------ */
.mode-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 3px solid var(--purple-bright);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  color: var(--text);
  cursor: pointer;
  position: relative;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.15s;
  animation: rise 0.35s ease both;
  font: inherit;
}
.mode-card:hover { transform: translate(-2px, -2px) rotate(-0.5deg); }
.mode-card[data-mode="browse"]:hover { border-color: var(--cyan); box-shadow: 8px 8px 0 var(--cyan); }
.mode-card[data-mode="gameshow"]:hover { border-color: var(--pink); box-shadow: 8px 8px 0 var(--pink); }
.mode-card[data-mode="tune"]:hover { border-color: var(--gold); box-shadow: 8px 8px 0 var(--gold); }
.mode-icon { font-size: 1.8rem; display: block; margin-bottom: 6px; }
.mode-name {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 #000;
}
.mode-card[data-mode="browse"] .mode-name { color: var(--cyan); }
.mode-card[data-mode="gameshow"] .mode-name { color: var(--pink); }
.mode-card[data-mode="tune"] .mode-name { color: var(--gold); }
.mode-desc { display: block; color: var(--text-dim); font-size: 0.9rem; margin-top: 4px; }
.mode-best {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #000;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid var(--gold);
}

/* ---- Category grid ----------------------------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cat-card {
  background: var(--surface-2);
  border: 3px solid #000;
  border-radius: 10px;
  padding: 14px 6px;
  text-align: center;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
}
.cat-card:hover {
  transform: translate(-2px, -2px) rotate(-1.5deg);
  box-shadow: 6px 6px 0 var(--pink);
  background: #46307a;
}
.cat-card .cat-icon { display: block; font-size: 1.5rem; margin-bottom: 4px; }

/* ---- Round header ------------------------------------------------------ */
.round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
}
.round-progress {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 var(--pink);
}
.round-score { color: var(--gold); font-family: var(--display); font-size: 0.85rem; text-shadow: 2px 2px 0 #000; }

/* ---- Results ------------------------------------------------------------ */
.results-card { text-align: center; padding: 20px 16px; border-color: var(--gold); }
.results-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 800;
}
.results-score {
  font-family: var(--display);
  font-size: 2.6rem;
  color: var(--gold);
  line-height: 1.1;
  margin: 6px 0;
  text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 rgba(0, 0, 0, 0.4);
}
.results-line { color: var(--text-dim); margin-bottom: 16px; }
.results-actions { display: flex; gap: 12px; justify-content: center; }

/* ---- Search -------------------------------------------------------------- */
.search-row { display: flex; gap: 10px; }
.search-row input {
  flex: 1;
  background: #1c0f38;
  border: 3px solid var(--purple-bright);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 16px;
  font-size: 0.95rem;
  outline: none;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.4);
  transition: border-color 0.15s;
}
.search-row input::placeholder { color: var(--text-dim); }
.search-row input:focus { border-color: var(--cyan); }

.results { list-style: none; margin: 12px 0 0; padding: 0; }
.results li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: 2px dashed var(--border);
  border-radius: 8px;
  transition: background 0.12s;
}
.results li:hover { background: var(--surface-2); }
.results li:last-child { border-bottom: none; }
.results img { width: 48px; height: 48px; border-radius: 6px; border: 2px solid #000; flex-shrink: 0; }
.result-meta { flex: 1; min-width: 0; }
.result-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-artist { color: var(--text-dim); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Player: music video frame + lower-third credits --------------------- */
#player-panel { position: relative; border-color: var(--cyan); }

.live-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--red);
  text-transform: uppercase;
}
.live-badge::before {
  content: '\25CF ';
  animation: blink 1.2s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.now-playing { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.now-playing img {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.55);
}

/* The MTV lower third: white bold lines with hard shadow and a side bar */
.np-credits {
  border-left: 6px solid var(--gold);
  padding-left: 10px;
}
.np-kicker {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--cyan);
  font-weight: 800;
}
.np-title {
  font-weight: 800;
  font-size: 1.15rem;
  text-shadow: 2px 2px 0 #000;
}
.np-artist { color: #fff; font-size: 0.95rem; font-weight: 700; text-shadow: 2px 2px 0 #000; }
.np-album { color: var(--text-dim); font-size: 0.82rem; font-style: italic; }

.controls { display: flex; gap: 10px; }

/* ---- Lyrics --------------------------------------------------------------- */
.lyrics-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.lyrics-head h2 { margin: 0; }

.lyrics-box {
  background: #1c0f38;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  min-height: 70px;
  max-height: 320px;
  overflow-y: auto;
  transition: filter 0.3s;
  /* Reading size for eyes in their reading-glasses years. */
  font-size: 1rem;
  line-height: 1.6;
}
.lyrics-box p { white-space: pre-wrap; margin: 0; }
.lyrics-box.blurred {
  filter: blur(9px);
  user-select: none;
  pointer-events: none;
}

.score-row { display: flex; gap: 12px; margin-top: 10px; }

/* ---- Name That Tune -------------------------------------------------------- */
.nt-stage { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.nt-art {
  width: 76px;
  height: 76px;
  border-radius: 6px;
  background: #1c0f38;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.nt-art span {
  font-family: var(--display);
  font-size: 1.9rem;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--pink);
  animation: drift 3s ease-in-out infinite;
}
.nt-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.nt-art.revealed span { display: none; }
.nt-art.revealed img { display: block; }
.nt-stage-meta { flex: 1; border-left: 6px solid var(--gold); padding-left: 10px; }
.nt-stage-meta .btn { margin-top: 8px; }

.nt-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.nt-choice {
  background: var(--surface-2);
  border: 3px solid #000;
  border-radius: 10px;
  padding: 11px 12px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
}
.nt-choice:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--cyan);
}
.nt-choice:disabled { cursor: default; opacity: 0.92; }
.nt-choice .nt-choice-artist { display: block; color: var(--text-dim); font-weight: 400; font-size: 0.9rem; }
.nt-choice.correct {
  background: rgba(255, 199, 0, 0.25);
  border-color: var(--gold);
  box-shadow: 4px 4px 0 var(--gold);
}
.nt-choice.wrong {
  background: rgba(239, 71, 111, 0.25);
  border-color: var(--red);
  box-shadow: 4px 4px 0 var(--red);
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
#nt-next { margin-top: 14px; }

/* ---- Verdict banner: VHS glitch --------------------------------------------- */
.verdict {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 95;
}
.verdict span {
  font-family: var(--display);
  font-size: clamp(2rem, 8.5vw, 4.2rem);
  letter-spacing: 0.02em;
  padding: 0.25em 0.6em;
  border-radius: 12px;
  border: 4px solid #000;
  animation: verdict-pop 1.4s ease forwards, glitch 0.18s steps(2) 6;
}
.verdict.hit span {
  color: #14092b;
  background: var(--gold);
  box-shadow: 8px 8px 0 var(--pink), 0 0 70px rgba(255, 199, 0, 0.5);
}
.verdict.miss span {
  color: #fff;
  background: var(--red);
  box-shadow: 8px 8px 0 var(--cyan), 0 0 70px rgba(239, 71, 111, 0.5);
}
@keyframes verdict-pop {
  0% { opacity: 0; transform: scale(0.5) rotate(-4deg); }
  15% { opacity: 1; transform: scale(1.08) rotate(2deg); }
  25% { transform: scale(1) rotate(-1deg); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.02); }
}
@keyframes glitch {
  0% { text-shadow: 3px 0 var(--cyan), -3px 0 var(--pink); }
  50% { text-shadow: -3px 0 var(--cyan), 3px 0 var(--pink); }
  100% { text-shadow: 2px 0 var(--cyan), -2px 0 var(--pink); }
}

/* ---- Confetti canvas ---------------------------------------------------------- */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 85;
}

/* ---- Known songs ---------------------------------------------------------------- */
.known-count { color: var(--text-dim); font-family: inherit; font-size: 0.8rem; }
.known-head { display: flex; align-items: center; justify-content: space-between; }
.known-head h2 { margin: 0; }
.known-search {
  width: 100%;
  margin: 12px 0 6px;
  background: #1c0f38;
  border: 3px solid var(--purple-bright);
  border-radius: 10px;
  color: var(--text);
  padding: 8px 14px;
  font-size: 0.9rem;
  outline: none;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.4);
}
.known-search::placeholder { color: var(--text-dim); }
.known-search:focus { border-color: var(--gold); }
.known-date { color: var(--text-dim); font-size: 0.75rem; flex-shrink: 0; }
.known-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.known-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 6px;
  border-bottom: 2px dashed var(--border);
  font-size: 0.95rem;
}
.known-meta { flex: 1; min-width: 0; }
.known-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.08s;
}
.known-remove:hover { border-color: var(--red); color: var(--red); }
.known-remove:active { transform: scale(0.9); }
.known-list li:last-child { border-bottom: none; }
.known-list .artist { color: var(--text-dim); }

/* ---- Reset ------------------------------------------------------------------------ */
.reset-row { text-align: center; margin: 8px 0 16px; }
.reset-row .btn { opacity: 0.7; }
.reset-row .btn:hover { opacity: 1; border-color: var(--red); color: var(--red); }

/* ---- Head-to-head + playlist rounds ------------------------------------------------ */
.versus-row { display: flex; gap: 8px; margin-bottom: 14px; }

.handoff { text-align: center; padding: 22px 0 14px; }
.handoff-name {
  font-family: var(--display);
  color: var(--gold);
  font-size: 1.15rem;
  margin-bottom: 14px;
  text-shadow: 2px 2px 0 #000;
}

.playlist-list { margin-top: 14px; display: grid; gap: 8px; }
.playlist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 2px solid var(--purple-bright);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.playlist-row:hover { border-color: var(--gold); }
.playlist-count { font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; }

/* ---- Toggle row (blind / speed run) ----------------------------------------------- */
.toggle-row { margin-top: 0; }
.toggle-note { margin: 0 0 14px; }
/* A toggle button reading "on" gets the primary (gold) treatment via JS
   swapping btn-ghost <-> btn-primary, same as the solo/versus toggle. */

/* ---- Challenge / daily banners ---------------------------------------------------- */
.challenge-banner {
  border-color: var(--cyan);
  background: var(--surface-2);
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  color: var(--cyan);
  text-shadow: 2px 2px 0 #000;
  padding: 14px 18px;
}

/* ---- Results recap sections (wrongs, close calls, score-card tracks) --------------- */
.results-section { text-align: left; margin-top: 20px; border-top: 2px dashed var(--border); padding-top: 14px; }
.results-section-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
}
.recap-list { list-style: none; margin: 0; padding: 0; }
.recap-list li {
  padding: 8px 6px;
  border-bottom: 2px dashed var(--border);
  font-size: 0.9rem;
  line-height: 1.4;
}
.recap-list li:last-child { border-bottom: none; }
.recap-heard { font-weight: 800; }
.recap-detail { display: block; color: var(--text-dim); font-size: 0.82rem; }
.recap-flag {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  border-radius: 999px;
  border: 2px solid var(--cyan);
  color: var(--cyan);
}
.recap-flag.warn { border-color: var(--red); color: var(--red); }

.results-share-row { flex-wrap: wrap; margin-top: 14px; }

/* ---- Leaderboard ------------------------------------------------------------------ */
.lb-filter {
  background: #1c0f38;
  border: 3px solid var(--purple-bright);
  border-radius: 10px;
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
}
.lb-list { list-style: none; margin: 0; padding: 0; counter-reset: lb; }
.lb-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 2px dashed var(--border);
}
.lb-list li:last-child { border-bottom: none; }
.lb-rank {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--gold);
  min-width: 36px;
  text-align: center;
  text-shadow: 2px 2px 0 #000;
}
.lb-name { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-cat { font-size: 0.78rem; color: var(--text-dim); }
.lb-points { font-family: var(--display); font-size: 0.9rem; color: var(--cyan); text-shadow: 2px 2px 0 #000; }
.lb-list li.lb-you { background: rgba(255, 199, 0, 0.12); border-radius: 8px; }

/* ---- Spotify attribution footer --------------------------------------------------- */
.spotify-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  padding: 22px 16px 40px;
  text-align: center;
}
.spotify-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--spotify);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.spotify-credit:hover { text-decoration: underline; }
.spotify-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1db954;
  flex-shrink: 0;
}
.footer-links a { color: var(--text-dim); font-size: 0.8rem; text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* ---- Legal pages (privacy / terms) ------------------------------------------------ */
.legal-card { max-width: 720px; margin: 24px auto; text-align: left; }
.legal-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--pink);
  margin: 0 0 4px;
}
.legal-card h2 { margin-top: 20px; }
.legal-card a { color: var(--cyan); }
.legal-list { padding-left: 20px; }
.legal-list li { margin-bottom: 8px; }
.legal-back { margin-top: 24px; }
.legal-back a { color: var(--gold); font-weight: 800; text-decoration: none; }

/* ---- Mobile ----------------------------------------------------------------------- */
@media (max-width: 480px) {
  .topbar { flex-wrap: wrap; padding: 10px 14px; }
  .logo-m { height: 2.1em; }
  .logo-text { font-size: 1rem; }
  .stats-bar { flex-wrap: wrap; gap: 8px; }
  .stat { min-width: 42%; }
  .stat-num { font-size: 1.2rem; }
  .controls .btn, .score-row .btn { flex: 1; }
  .now-playing img { width: 64px; height: 64px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .nt-choices { grid-template-columns: 1fr 1fr; gap: 7px; }
  .nt-choice { padding: 8px 9px; font-size: 0.88rem; }
  .shapes { display: none; }

  /* Name That Tune: the four answer buttons must land on screen with no
     scrolling, so the header stack above them (topbar, mode nav, round
     head, art + timer) gets squeezed down on small screens. */
  .mode-nav { min-height: 22px; margin-bottom: 6px; }
  #nt-question .card { padding: 10px; margin-bottom: 8px; }
  #nt-question .round-head { padding: 6px 10px; }
  .nt-stage { gap: 8px; margin-bottom: 6px; }
  .nt-art { width: 52px; height: 52px; }
  .nt-art span { font-size: 1.3rem; }
  .nt-stage-meta .btn { margin-top: 4px; }
  .nt-timer { margin-bottom: 8px; }
}

/* ---- Suggest your own category (Name That Tune) ---------------------- */
.suggest-block {
  margin-top: 18px;
  border-top: 2px dashed var(--purple-bright);
  padding-top: 14px;
}
.suggest-title {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--cyan);
  text-shadow: 2px 2px 0 #000;
  margin: 0 0 8px;
}
.suggest-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.suggest-chips-label {
  font-size: 0.75rem;
  color: #b9a7e0;
  margin-right: 2px;
}
.suggest-chip {
  background: var(--surface);
  border: 2px solid var(--purple-bright);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}
.suggest-chip:hover { border-color: var(--gold); }

/* ---- Seek / scrub bar (Browse + Game Show player) ------------------- */
.seek-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.seek-time {
  font-family: var(--display);
  font-size: 0.7rem;
  color: var(--text-dim);
  min-width: 36px;
  text-align: center;
}
.seek-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 6px;
  background: #1c0f38;
  border: 2px solid var(--purple-bright);
  outline: none;
  cursor: pointer;
}
.seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
}
.seek-bar::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #000;
  cursor: pointer;
}

/* ---- Name That Tune countdown bar + choice number badges ------------ */
.nt-timer {
  height: 8px;
  border-radius: 6px;
  background: #1c0f38;
  border: 2px solid var(--purple-bright);
  overflow: hidden;
  margin-bottom: 12px;
}
.nt-timer-fill { height: 100%; width: 100%; background: var(--gold); }
.nt-timer-fill.low { background: var(--red); }

.nt-choice-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 5px;
  background: var(--purple);
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.68rem;
  vertical-align: middle;
  flex-shrink: 0;
}
.nt-choice-title { font-weight: 700; }

/* ---- Respect reduced-motion: calm the CRT flicker and animations ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .scanlines { animation: none !important; opacity: 0.35 !important; }
  .shapes { display: none !important; }
}
