/* ── Guess the NDP Tune — Singapore National Day theme ──────────────
   Palette: Singapore flag red + white, with festive gold accents.
   White surfaces on a red night sky, crescent & stars throughout.    */

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

:root {
  --sg-red: #ed2939;          /* flag red */
  --sg-red-deep: #a6121f;
  --sg-red-ink: #8f0d19;      /* red text on white surfaces */
  --gold: #ffd166;
  --teal: #10c98f;            /* success */
  --ink: #fff;
  --white-card: rgba(255, 255, 255, 0.94);
  --glass: rgba(255, 255, 255, 0.10);
  --glass-border: rgba(255, 255, 255, 0.22);
}

html, body { min-height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(165deg, #3d0308 0%, #7c0d18 35%, #b5121f 70%, #e02434 100%);
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  overflow-x: hidden;
}

/* Floating fireworks blobs — red night sky with gold & white bursts */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  pointer-events: none;
  animation: drift 16s ease-in-out infinite alternate;
}
.blob-1 { width: 380px; height: 380px; background: #ffd166; top: -110px; left: -120px; }
.blob-2 { width: 320px; height: 320px; background: #ffffff; bottom: -90px; right: -100px; opacity: 0.25; animation-delay: -5s; }
.blob-3 { width: 260px; height: 260px; background: #ff5d6c; top: 42%; left: 72%; animation-delay: -10s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, -30px) scale(1.15); }
}

/* Night sky — scattered white stars & crescents */
.sky span {
  position: fixed;
  color: #fff;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
  animation: twinkle 5s ease-in-out infinite alternate;
}
.sky span:nth-child(2n)  { animation-delay: -1.4s; animation-duration: 6s; }
.sky span:nth-child(3n)  { animation-delay: -2.8s; animation-duration: 4.4s; }
.sky span:nth-child(5n)  { animation-delay: -3.6s; animation-duration: 7s; }

@keyframes twinkle {
  from { opacity: 0.08; }
  to   { opacity: 0.3; }
}

/* ── Card / screens ── */
#app { width: 100%; max-width: 640px; position: relative; z-index: 1; }

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 32px 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(40, 0, 4, 0.45);
  text-align: center;
}

.screen { display: none; animation: pop-in 0.35s ease; }
.screen.active { display: block; }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ── Start / end screens ── */
.logo { margin-bottom: 14px; animation: bounce 2.2s ease-in-out infinite; }
.logo svg { width: 92px; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35)); }
.big-emoji { font-size: 64px; line-height: 1; }

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

.title { font-size: clamp(30px, 6vw, 42px); font-weight: 800; letter-spacing: -0.5px; }
.title span {
  background: linear-gradient(90deg, var(--gold), #ffedb3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle { margin: 12px 0 22px; opacity: 0.9; font-size: 17px; line-height: 1.5; }

.rules {
  list-style: none;
  text-align: left;
  margin: 0 auto 26px;
  max-width: 460px;
  display: grid;
  gap: 10px;
}
.rules li {
  background: var(--white-card);
  color: var(--sg-red-ink);
  font-weight: 600;
  border: 1px solid #fff;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 15px;
}
.rule-emoji { margin-right: 8px; }

.tier-word { white-space: nowrap; }
.tier-word.easy { color: #067a57; }
.tier-word.med  { color: #9a6b00; }
.tier-word.hard { color: var(--sg-red); }

.tiny-note { margin-top: 14px; font-size: 13px; opacity: 0.7; }

/* ── Buttons ── */
.btn {
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 16px;
  padding: 14px 22px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Flag-white primary button with red text — very NDP */
.btn-primary {
  background: linear-gradient(180deg, #ffffff, #ffe9eb);
  color: var(--sg-red);
  box-shadow: 0 10px 26px rgba(255, 255, 255, 0.25);
}
.btn-big { font-size: 20px; padding: 16px 48px; border-radius: 20px; }

.btn-gold {
  background: linear-gradient(90deg, #ffd166, #ffb347);
  color: #6b3a00;
  box-shadow: 0 8px 22px rgba(255, 209, 102, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* ── Setup screen ── */
.count-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }

.count-btn {
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  padding: 14px 18px;
  min-width: 96px;
  cursor: pointer;
  line-height: 1.7;
  transition: all 0.15s ease;
}
.count-btn:hover:not(:disabled) { transform: translateY(-2px); background: rgba(255, 255, 255, 0.16); }
.count-btn.selected {
  background: linear-gradient(180deg, #ffffff, #ffe9eb);
  color: var(--sg-red);
  border-color: #fff;
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.3);
}
.count-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.count-btn small { font-size: 12px; font-weight: 600; opacity: 0.8; }

.len-btn { min-width: 88px; font-size: 20px; line-height: 1.4; }

.setup-label { font-weight: 700; margin: 6px 0 10px; font-size: 16px; }

.team-names { display: grid; gap: 10px; max-width: 380px; margin: 0 auto 20px; }
.team-names input {
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  color: var(--sg-red-ink);
  background: var(--white-card);
  border: 1px solid #fff;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
.team-names input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.4); }
.team-names input::placeholder { color: rgba(143, 13, 25, 0.45); }

.setup-note { font-size: 14px; opacity: 0.9; margin-bottom: 22px; line-height: 1.5; }

/* ── HUD ── */
.hud { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }

.hud-emblem svg { width: 34px; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3)); }

.hud-chip {
  background: var(--white-card);
  color: var(--sg-red-ink);
  border: 1px solid #fff;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 600;
}
.hud-chip strong { font-size: 15px; }

/* Difficulty badge — explicit tier per round */
.diff-chip { font-weight: 800; letter-spacing: 0.3px; }
.diff-chip.tier-1 { background: #e2fbf2; border-color: var(--teal); color: #067a57; }
.diff-chip.tier-2 { background: #fff6dd; border-color: var(--gold); color: #9a6b00; }
.diff-chip.tier-3 { background: var(--sg-red); border-color: #fff; color: #fff; }

/* ── Scoreboard ── */
.scoreboard { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.team-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white-card);
  color: var(--sg-red-ink);
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.team-chip strong { font-size: 16px; color: var(--sg-red); }
.team-chip.active {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.45);
  transform: scale(1.05);
}
.team-chip.bump { animation: bump 0.45s ease; }

@keyframes bump {
  0% { transform: scale(1.05); }
  40% { transform: scale(1.25); background: #fff2c4; }
  100% { transform: scale(1.05); }
}

/* Turn banner */
.turn-banner {
  font-size: 17px;
  font-weight: 800;
  background: var(--white-card);
  color: var(--sg-red-ink);
  border: 1px solid #fff;
  border-left: 6px solid var(--sg-red);
  border-right: 6px solid var(--sg-red);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  animation: pop-in 0.3s ease;
}

/* ── Stage pills ── */
.stages { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; }

.stage-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  opacity: 0.6;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.stage-pill.active {
  opacity: 1;
  background: #fff;
  color: var(--sg-red);
  border-color: #fff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}
.stage-pill.done { opacity: 0.9; border-color: var(--teal); }

.stage-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}
.stage-pill.active .stage-num { background: var(--sg-red); color: #fff; }
.stage-pill.done .stage-num { background: var(--teal); color: #003b2c; }

.stage-line { width: 22px; height: 2px; background: rgba(255, 255, 255, 0.3); border-radius: 2px; }

/* ── Video + shroud ── */
.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #000;
  border: 2px solid rgba(255, 255, 255, 0.55);
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.shroud {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 209, 102, 0.28), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(237, 41, 57, 0.5), transparent 60%),
    linear-gradient(150deg, #45050b, #7c0d18);
  z-index: 2;
}
.shroud.revealed { display: none; }
#shroud-msg { font-size: 14px; opacity: 0.9; padding: 0 20px; position: relative; }

/* Big crescent & stars watermark behind the equalizer */
.shroud-emblem {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46%;
  opacity: 0.14;
}

.equalizer { display: flex; align-items: flex-end; gap: 6px; height: 46px; position: relative; }
.equalizer i {
  width: 9px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff, var(--gold));
  transition: height 0.3s ease;
}
.shroud.playing .equalizer i { animation: eq 0.9s ease-in-out infinite; }
.shroud.playing .equalizer i:nth-child(2) { animation-delay: 0.15s; }
.shroud.playing .equalizer i:nth-child(3) { animation-delay: 0.3s; }
.shroud.playing .equalizer i:nth-child(4) { animation-delay: 0.45s; }
.shroud.playing .equalizer i:nth-child(5) { animation-delay: 0.6s; }

@keyframes eq {
  0%, 100% { height: 12px; }
  50% { height: 46px; }
}

.btn-clip { width: 100%; font-size: 17px; margin-bottom: 14px; }

/* ── Typed guess box ── */
.guess-box { display: flex; gap: 10px; margin-bottom: 14px; }
.guess-box input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  color: var(--sg-red-ink);
  background: var(--white-card);
  border: 2px solid #fff;
  border-radius: 14px;
  padding: 12px 16px;
  outline: none;
}
.guess-box input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.4); }
.guess-box input::placeholder { color: rgba(143, 13, 25, 0.45); }
.guess-box input.shake { animation: shake 0.4s ease; }
.guess-box .btn { flex-shrink: 0; }

/* ── Hint ── */
.hint-card {
  background: var(--white-card);
  color: #7a4a00;
  border: 1px solid #fff;
  border-left: 6px solid var(--gold);
  border-radius: 16px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  animation: pop-in 0.3s ease;
}
.hint-card strong { color: var(--sg-red); }

/* ── Stage action buttons ── */
.stage-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.stage-actions .btn { flex: 1 1 200px; font-size: 15px; }

/* ── Options ── */
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  animation: pop-in 0.3s ease;
}
@media (max-width: 480px) { .options { grid-template-columns: 1fr; } }

.option {
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  color: var(--sg-red-ink);
  text-align: center;
  background: var(--white-card);
  border: 2px solid #fff;
  border-radius: 16px;
  padding: 16px 12px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.option:hover:not(:disabled) { transform: translateY(-2px); background: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }
.option:disabled { cursor: default; }

.option.correct {
  background: linear-gradient(90deg, #10c98f, #04a076);
  border-color: #d8ffee;
  color: #fff;
  animation: correct-pop 0.4s ease;
}
.option.wrong {
  background: #2e2530;
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.75);
  text-decoration: line-through;
  animation: shake 0.4s ease;
}
.option.dim { opacity: 0.35; }

@keyframes correct-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

/* ── Reveal ── */
.reveal { margin-top: 16px; animation: pop-in 0.3s ease; }
.reveal-verdict { font-size: 23px; font-weight: 800; margin-bottom: 6px; }
.reveal-verdict.good { color: #8effd0; }
.reveal-verdict.bad { color: #ffc7cd; }
.reveal-song { font-size: 20px; margin-bottom: 2px; }
.reveal-meta { font-size: 14px; opacity: 0.9; margin-bottom: 16px; }

/* ── Round scoreboard ── */
.standings-lead {
  font-size: 19px;
  font-weight: 800;
  color: var(--gold);
  margin: 6px 0 20px;
}
#standings-progress { margin-bottom: 20px; }
.podium-row.leader {
  background: #fff7dd;
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(255, 209, 102, 0.45);
}

/* ── Champion celebration ── */
.champion-name {
  font-size: clamp(34px, 9vw, 58px);
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.15;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #ffd166, #fff3c4, #ffd166);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255, 209, 102, 0.55));
  animation: champ-shine 2s linear infinite, champ-pop 0.6s ease;
}
@keyframes champ-shine {
  to { background-position: 200% center; }
}
@keyframes champ-pop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
.big-emoji.celebrating { animation: celebrate-bounce 0.7s ease infinite alternate; }
@keyframes celebrate-bounce {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-10px) scale(1.15); }
}

/* ── End screen / podium ── */
.end-message { font-size: 18px; opacity: 0.95; margin: 8px 0 24px; }

.podium { display: grid; gap: 10px; max-width: 440px; margin: 0 auto 28px; }

.podium-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white-card);
  color: var(--sg-red-ink);
  border: 2px solid #fff;
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 16px;
}
.podium-row.winner {
  background: #fff7dd;
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(255, 209, 102, 0.45);
  font-size: 18px;
}
.podium-medal { font-size: 24px; }
.podium-name { flex: 1; text-align: left; font-weight: 700; }
.podium-pts { font-weight: 800; color: var(--sg-red); font-size: 20px; }
.podium-sub { font-size: 12px; opacity: 0.7; display: block; font-weight: 500; }

/* Solo end stats */
.end-stats { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.end-stat {
  background: var(--white-card);
  color: var(--sg-red-ink);
  border: 1px solid #fff;
  border-radius: 18px;
  padding: 16px 22px;
  min-width: 104px;
}
.end-stat span { display: block; font-size: 28px; font-weight: 800; color: var(--sg-red); }
.end-stat label { font-size: 13px; opacity: 0.8; }

/* ── Confetti ── */
#confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
#confetti span {
  position: absolute;
  top: -40px;
  font-size: 24px;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); opacity: 0.7; }
}

/* Floating "+points" */
.float-pts {
  position: fixed;
  z-index: 60;
  font-size: 26px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  animation: rise 1.1s ease forwards;
}
@keyframes rise {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-70px); }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(40, 2, 6, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 14px;
  z-index: 70;
  animation: pop-in 0.25s ease;
}
.toast.hidden { display: none; }

.hidden { display: none !important; }

/* ═══════════ PARTY MODE (host + phones) ═══════════ */

/* ── Lobby / QR ── */
.qr-box {
  display: inline-block;
  background: #fff;
  border-radius: 20px;
  padding: 10px;
  margin: 6px 0 10px;
  box-shadow: 0 12px 32px rgba(40, 0, 4, 0.4);
}
.qr-box svg { display: block; width: min(46vw, 240px); height: auto; }

.join-url { font-size: 16px; font-weight: 700; color: var(--gold); margin-bottom: 8px; letter-spacing: 0.3px; }

.room-code-line { font-size: 16px; margin-bottom: 18px; opacity: 0.95; }
.room-code {
  display: inline-block;
  background: var(--white-card);
  color: var(--sg-red);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 6px;
  border-radius: 10px;
  padding: 2px 10px 2px 16px;
  margin-left: 6px;
}

.lobby-players { margin-bottom: 22px; }
.lobby-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 40px; }
.team-chip.pop { animation: pop-in 0.3s ease; }

/* ── Host controls ── */
.host-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.host-controls .btn { flex: 1 1 150px; font-size: 15px; }
.host-controls #btn-reveal, .host-controls #btn-scoreboard { flex-basis: 100%; font-size: 17px; }
.host-controls .btn-replay { flex: 0 1 auto; font-size: 13px; padding: 10px 18px; }

/* Reveal button: dimmed while players are still guessing,
   lit + pulsing once everyone is done */
#btn-reveal.waiting { opacity: 0.55; filter: saturate(0.6); }
#btn-reveal.ready {
  background: linear-gradient(90deg, #ffd166, #ffb347);
  color: #6b3a00;
  opacity: 1;
  filter: none;
  animation: reveal-pulse 1.1s ease-in-out infinite;
}
@keyframes reveal-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.55); transform: scale(1); }
  50% { box-shadow: 0 0 0 12px rgba(255, 209, 102, 0); transform: scale(1.03); }
}

/* ── Live tally ── */
.tally { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tally-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.tally-chip.good { background: rgba(16, 201, 143, 0.3); border-color: var(--teal); }
.tally-chip.tried { background: rgba(0, 0, 0, 0.25); opacity: 0.8; }
.tally-chip.out { opacity: 0.45; }
.tally-chip .t-icon { font-size: 13px; }

/* Options shown on the TV are display-only */
.option.static { cursor: default; }

/* ── Animated rank board ── */
.rank-board { position: relative; max-width: 460px; margin: 0 auto 20px; }
.rank-row {
  position: absolute;
  left: 0; right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white-card);
  color: var(--sg-red-ink);
  border: 2px solid #fff;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 16px;
  transition: top 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.rank-row.leader {
  background: #fff7dd;
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.4);
}
.rank-num { font-weight: 800; color: var(--sg-red); min-width: 34px; text-align: left; }
.rank-up   { color: #067a57; font-weight: 800; font-size: 14px; }
.rank-down { color: var(--sg-red); font-weight: 800; font-size: 14px; }
.rank-same { opacity: 0.4; font-weight: 800; }
.rank-gain { color: #9a6b00; font-weight: 800; font-size: 14px; }

/* ── Podium stand (top 3) ── */
.podium-stand {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin: 10px 0 24px;
}
.podium-col { flex: 1; max-width: 150px; }
.podium-col.empty { visibility: hidden; }
.podium-medal-big { font-size: 40px; animation: bounce 2s ease-in-out infinite; }
.podium-col-name {
  font-weight: 800;
  font-size: 16px;
  margin: 6px 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium-block {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white-card);
  border: 2px solid #fff;
  border-radius: 14px 14px 6px 6px;
  color: var(--sg-red);
  font-weight: 900;
  font-size: 22px;
}
.podium-col.first  .podium-block { height: 120px; background: #fff7dd; border-color: var(--gold); box-shadow: 0 0 26px rgba(255, 209, 102, 0.5); }
.podium-col.second .podium-block { height: 88px; }
.podium-col.third  .podium-block { height: 64px; }

/* ── Player page (phones) ── */
.player-body { align-items: flex-start; padding-top: 18px; }
.player-app { max-width: 430px; }
.player-app .card { padding: 24px 20px; }

.p-heading { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.p-qhead { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.p-listen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  font-size: 14px;
}
.p-listen.pulse { animation: bump 0.5s ease; }
.equalizer.playing-always i { animation: eq 0.9s ease-in-out infinite; }
.equalizer.playing-always i:nth-child(2) { animation-delay: 0.15s; }
.equalizer.playing-always i:nth-child(3) { animation-delay: 0.3s; }
.equalizer.playing-always i:nth-child(4) { animation-delay: 0.45s; }
.equalizer.playing-always i:nth-child(5) { animation-delay: 0.6s; }

.p-guess .guess-box { margin-bottom: 10px; }
.p-guess .btn { margin-bottom: 8px; }

.p-options { display: grid; grid-template-columns: 1fr; gap: 10px; }
.p-options .option { font-size: 17px; padding: 18px 12px; }
.p-options .option.picked { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.5); }
.p-options .option:disabled:not(.picked) { opacity: 0.55; }

.p-status {
  border-radius: 16px;
  padding: 18px 16px;
  font-size: 17px;
  line-height: 1.6;
  animation: pop-in 0.3s ease;
}
.p-status.good { background: rgba(16, 201, 143, 0.25); border: 1px solid var(--teal); }
.p-status.bad  { background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.3); }
.p-status.wait { background: rgba(255, 209, 102, 0.18); border: 1px solid rgba(255, 209, 102, 0.5); }

.p-rank-card { font-size: 20px; font-weight: 800; margin-top: 6px; }

.p-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(40, 2, 6, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 800;
  font-size: 15px;
  z-index: 40;
}
.p-footer #p-score { color: var(--gold); }
