/* ===== BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green: #1db954;
  --green-dark: #17a349;
  --bg: #121212;
  --surface: #1e1e1e;
  --surface2: #282828;
  --text: #ffffff;
  --text-muted: #b3b3b3;
  --correct: #1db954;
  --wrong: #e74c3c;
  --radius: 12px;
  --transition: 0.2s ease;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  min-height: 100vh;
  padding: 20px 16px 40px;
}

.screen.active {
  display: block;
}

.container {
  max-width: 560px;
  margin: 0 auto;
}

/* ===== LOGO ===== */
.logo {
  text-align: center;
  padding: 40px 0 32px;
}

.logo-icon {
  font-size: 64px;
  margin-bottom: 12px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.logo h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #1db954, #69d493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 1rem;
}

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.input-row {
  display: flex;
  gap: 8px;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--green);
}

input[type="number"] {
  width: 100px;
}

/* ===== BUTTONS ===== */
.btn {
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--green);
  color: #000;
}

.btn-primary:hover:not(:disabled) {
  background: var(--green-dark);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
}

.btn-secondary:hover {
  background: #3a3a3a;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 10px 16px;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* ===== PLAYLIST PREVIEW ===== */
.playlist-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface2);
  border-radius: 10px;
  padding: 14px;
  margin: -4px 0 20px;
  border-left: 3px solid var(--green);
}

.playlist-preview img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.playlist-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.playlist-meta {
  font-size: 0.83rem;
  color: var(--text-muted);
}

/* ===== QUIZ HEADER ===== */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 16px;
}

.progress-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

#question-counter {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.score {
  font-size: 1rem;
  font-weight: 800;
  color: var(--green);
}

/* ===== PROGRESS BAR ===== */
.progress-bar-wrapper {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ===== PLAYER ===== */
.player-card {
  text-align: center;
}

.album-art {
  width: 150px;
  height: 150px;
  margin: 0 auto 20px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-placeholder {
  font-size: 56px;
}

#album-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
}

/* Cover that hides the album art until answered */
.art-cover {
  position: absolute;
  inset: 0;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  z-index: 2;
  transition: opacity 0.4s ease;
}

.art-cover.hidden {
  opacity: 0;
  pointer-events: none;
  display: flex; /* keep in DOM for transition, just invisible */
}

.art-cover-note {
  font-size: 52px;
  animation: pulse 2s infinite;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--green);
  color: #000;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(29, 185, 84, 0.4);
}

.play-btn:hover {
  background: var(--green-dark);
  transform: scale(1.05);
}

.play-btn:active {
  transform: scale(0.97);
}

/* ===== AUDIO WAVE ===== */
.audio-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 30px;
  opacity: 0;
  transition: opacity 0.3s;
}

.audio-wave.playing {
  opacity: 1;
}

.audio-wave span {
  display: block;
  width: 4px;
  background: var(--green);
  border-radius: 2px;
  animation: wave 0.9s ease-in-out infinite;
  min-height: 4px;
}

.audio-wave span:nth-child(1) { animation-delay: 0s; height: 12px; }
.audio-wave span:nth-child(2) { animation-delay: 0.1s; height: 22px; }
.audio-wave span:nth-child(3) { animation-delay: 0.2s; height: 30px; }
.audio-wave span:nth-child(4) { animation-delay: 0.1s; height: 22px; }
.audio-wave span:nth-child(5) { animation-delay: 0s; height: 12px; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.player-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ===== VOLUME SLIDER ===== */
.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 0 4px;
}

.vol-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.volume-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--surface2);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
  transition: transform var(--transition);
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
  border: none;
}

/* ===== OPTIONS ===== */
.options-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.option-btn {
  background: var(--surface);
  border: 2px solid var(--surface2);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  line-height: 1.4;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--green);
  background: rgba(29, 185, 84, 0.08);
}

.option-btn .option-title {
  font-weight: 700;
  display: block;
}

.option-btn .option-artist {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 12px;
  float: left;
  margin-top: 2px;
  flex-shrink: 0;
}

.option-btn.correct {
  border-color: var(--correct);
  background: rgba(29, 185, 84, 0.15);
}

.option-btn.correct .option-letter {
  background: var(--correct);
  color: #000;
}

.option-btn.wrong {
  border-color: var(--wrong);
  background: rgba(231, 76, 60, 0.12);
}

.option-btn.wrong .option-letter {
  background: var(--wrong);
  color: #fff;
}

.option-btn:disabled {
  cursor: not-allowed;
}

/* ===== RESULT BANNER ===== */
.result-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.result-banner #result-icon {
  font-size: 1.6rem;
}

.result-banner #result-text {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
}

/* ===== RESULTS SCREEN ===== */
.results-card {
  text-align: center;
  margin-top: 40px;
}

.result-emoji {
  font-size: 72px;
  margin-bottom: 16px;
  display: block;
}

.results-card h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.final-score {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--green);
}

.final-score .divider {
  color: var(--text-muted);
  font-weight: 300;
}

.result-message {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 1rem;
}

.answers-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  max-height: 300px;
  overflow-y: auto;
  text-align: left;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 8px;
  font-size: 0.85rem;
}

.summary-item .si-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.summary-item .si-text {
  flex: 1;
  color: var(--text-muted);
}

.summary-item .si-text strong {
  color: var(--text);
  display: block;
}

.result-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.result-buttons .btn {
  flex: 1;
  min-width: 140px;
}

/* ===== BADGES ===== */
.source-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  vertical-align: middle;
}

.badge-yt {
  background: #ff0000;
  color: #fff;
}

.badge-dz {
  background: #a238ff;
  color: #fff;
}

/* ===== YOUTUBE PLAYER ===== */
.yt-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  margin-bottom: 14px;
}

#yt-player-container {
  width: 100%;
  pointer-events: none;
}

#yt-player-container iframe {
  display: block;
  width: 100%;
}

.yt-overlay {
  position: absolute;
  inset: 0;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: opacity 0.4s ease;
}

.yt-overlay.answered {
  opacity: 0;
  pointer-events: none;
}

/* Thumbnail reveal inside overlay after answering */
.yt-thumb-reveal {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.yt-thumb-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

#btn-yt-play {
  position: relative;
  z-index: 1;
}

.play-btn-big {
  width: 72px;
  height: 72px;
  font-size: 1.8rem;
}

.yt-timer-bar-wrapper {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}

.yt-timer-bar {
  height: 100%;
  background: #ff0000;
  border-radius: 2px;
  width: 100%;
}

/* ===== UTILITIES ===== */
.hidden {
  display: none !important;
}

.error-msg {
  color: var(--wrong);
  background: rgba(231, 76, 60, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-top: 12px;
}

/* ===== ANSWER OVERLAY ===== */
.answer-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}

.answer-overlay.show-correct {
  animation: overlayFade 1.6s ease forwards;
  background: radial-gradient(circle, rgba(29,185,84,0.25) 0%, transparent 70%);
}

.answer-overlay.show-wrong {
  animation: overlayFade 1.6s ease forwards;
  background: radial-gradient(circle, rgba(231,76,60,0.25) 0%, transparent 70%);
}

@keyframes overlayFade {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

.overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: 24px;
  padding: 36px 56px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: overlayPop 1.6s ease forwards;
}

@keyframes overlayPop {
  0%   { transform: scale(0.4) translateY(20px); opacity: 0; }
  15%  { transform: scale(1.08) translateY(0);   opacity: 1; }
  25%  { transform: scale(1)    translateY(0);   opacity: 1; }
  70%  { transform: scale(1)    translateY(0);   opacity: 1; }
  100% { transform: scale(0.9)  translateY(-10px); opacity: 0; }
}

.overlay-icon {
  font-size: 4.5rem;
  line-height: 1;
  display: block;
}

.overlay-text {
  font-size: 1.8rem;
  font-weight: 900;
  display: block;
}

.answer-overlay.show-correct .overlay-text { color: var(--correct); }
.answer-overlay.show-wrong  .overlay-text { color: var(--wrong); }

.overlay-pts {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
}

/* ===== QUIZ TWO-COLUMN LAYOUT ===== */
.screen-quiz {
  padding: 0;
}

.quiz-wrap {
  display: grid;
  grid-template-columns: 1fr 240px;
  min-height: 100vh;
}

.quiz-main {
  padding: 20px 20px 40px;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
}

.quiz-sidebar {
  background: var(--surface);
  border-left: 1px solid var(--surface2);
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--surface2);
}

.sidebar-scoreboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface2);
  transition: background 0.2s;
}

.sidebar-row.me {
  background: rgba(29,185,84,0.12);
  border: 1px solid rgba(29,185,84,0.3);
}

.sidebar-row.answered {
  opacity: 0.7;
}

.sb-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #000;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sb-info {
  flex: 1;
  min-width: 0;
}

.sb-name-live {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-score-live {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sb-check {
  font-size: 0.9rem;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .quiz-wrap {
    grid-template-columns: 1fr;
  }
  .quiz-sidebar {
    position: static;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--surface2);
    padding: 16px;
  }
  .sidebar-scoreboard {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .sidebar-row {
    flex: 1;
    min-width: 120px;
  }
}

/* ===== MULTIPLAYER: ROOM CODE ===== */
.room-code-card {
  text-align: center;
  margin-bottom: 16px;
}

.room-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.room-code {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 12px;
  color: var(--green);
  margin-bottom: 16px;
  font-family: monospace;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px 14px;
  flex-wrap: wrap;
}

.room-link {
  flex: 1;
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
  text-align: left;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
  flex-shrink: 0;
}

/* ===== MULTIPLAYER: LOBBY PLAYER LIST ===== */
.lobby-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.lobby-header h2 {
  margin-bottom: 0;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #000;
  font-size: 0.8rem;
  font-weight: 800;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.no-players {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 16px 0;
}

.player-lobby-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 10px;
}

.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: #000;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.player-lobby-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ===== MULTIPLAYER: QUIZ HEADER ===== */
.q-counter {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.answered-count {
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 700;
}

/* ===== MULTIPLAYER: HOST OPTIONS (display only) ===== */
.host-options .option-btn,
.host-options .option-display {
  cursor: default;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.option-display {
  background: var(--surface);
  border: 2px solid var(--surface2);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
}

.option-display.correct {
  border-color: var(--correct);
  background: rgba(29, 185, 84, 0.15);
}

.option-display .option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 12px;
  flex-shrink: 0;
}

.option-display.correct .option-letter {
  background: var(--correct);
  color: #000;
}

/* ===== MULTIPLAYER: BIG PLAYER OPTIONS ===== */
.options-grid-big {
  display: grid;
  gap: 12px;
}

.option-btn-big {
  background: var(--surface);
  border: 2px solid var(--surface2);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  display: flex;
  align-items: center;
}

.option-btn-big:hover:not(:disabled) {
  border-color: var(--green);
  background: rgba(29, 185, 84, 0.08);
  transform: translateY(-1px);
}

.option-btn-big:disabled { cursor: not-allowed; }

.option-btn-big.correct {
  border-color: var(--correct);
  background: rgba(29, 185, 84, 0.15);
}

.option-btn-big.wrong {
  border-color: var(--wrong);
  background: rgba(231, 76, 60, 0.12);
}

.option-btn-big .option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  font-size: 0.85rem;
  font-weight: 700;
  margin-right: 14px;
  flex-shrink: 0;
}

.option-btn-big.correct .option-letter { background: var(--correct); color: #000; }
.option-btn-big.wrong .option-letter { background: var(--wrong); color: #fff; }

.option-btn-big .option-title { font-weight: 700; display: block; }
.option-btn-big .option-artist { font-size: 0.82rem; color: var(--text-muted); display: block; margin-top: 2px; }

/* ===== MULTIPLAYER: SCOREBOARD ===== */
.mini-scoreboard {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.scoreboard-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.scoreboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface2);
}

.scoreboard-row:last-child { border-bottom: none; }

.sb-rank { font-size: 1.1rem; width: 28px; flex-shrink: 0; }
.sb-name { flex: 1; font-weight: 600; font-size: 0.95rem; }
.sb-score {
  font-weight: 800;
  font-size: 1rem;
  color: var(--green);
  min-width: 28px;
  text-align: right;
}

/* ===== MULTIPLAYER: FINAL SCOREBOARD ===== */
.final-scoreboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 24px;
  text-align: left;
}

.final-sb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface2);
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.final-sb-row.first  { background: rgba(255, 215, 0, 0.12); border-color: #ffd700; }
.final-sb-row.second { background: rgba(192, 192, 192, 0.12); border-color: #c0c0c0; }
.final-sb-row.third  { background: rgba(205, 127, 50, 0.12); border-color: #cd7f32; }
.final-sb-row.me     { outline: 2px solid var(--green); outline-offset: 2px; }

.final-rank { font-size: 1.4rem; flex-shrink: 0; width: 36px; }
.final-name { flex: 1; font-weight: 700; font-size: 1rem; }
.final-score { font-weight: 800; font-size: 1rem; color: var(--green); }

/* ===== MULTIPLAYER: HOST ACTION ROW ===== */
.host-action-row {
  margin-top: 8px;
}

/* ===== COUNTDOWN ===== */
.countdown-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.countdown-display.hidden {
  display: none !important;
}

#countdown-num, #player-countdown-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--green);
  min-width: 20px;
  text-align: center;
}

/* ===== PLAYER CARD SMALL ===== */
.player-card-sm {
  padding: 16px 20px;
}

.player-card-sm .player-controls {
  margin-bottom: 0;
}

.yt-wrapper-sm .yt-overlay .play-btn {
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
}

.volume-row-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  margin-left: 12px;
}

.volume-row-inline .volume-slider {
  flex: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 400px) {
  .card {
    padding: 20px;
  }
  .logo h1 {
    font-size: 2rem;
  }
  .final-score {
    font-size: 3rem;
  }
}
