/* ==================== THEME VARIABLES ==================== */
:root,
[data-theme="classic"] {
  --bg-top: #3c0e2f;
  --bg-mid: #28081e;
  --bg-bottom: #180412;
  --shape-stroke: rgba(255, 255, 255, 0.06);
  --card-bg: rgba(20, 4, 16, 0.56);
  --card-border: rgba(255, 255, 255, 0.11);
  --text-primary: #ffffff;
  --text-muted: rgba(236, 224, 236, 0.72);
  --hud-bg: rgba(14, 3, 12, 0.52);
  --drawer-bg: #17081c;
  --drawer-border: #f5c542;
}

[data-theme="synthwave"] {
  --bg-top: #2b1055;
  --bg-mid: #1a0b3b;
  --bg-bottom: #0d0626;
  --shape-stroke: rgba(255, 64, 180, 0.14);
  --card-bg: rgba(18, 8, 42, 0.65);
  --card-border: rgba(190, 96, 255, 0.28);
  --text-primary: #ffffff;
  --text-muted: rgba(224, 212, 255, 0.76);
  --hud-bg: rgba(12, 6, 32, 0.68);
  --drawer-bg: #140830;
  --drawer-border: #ff4fd8;
}

[data-theme="focus"] {
  --bg-top: #1a2a3a;
  --bg-mid: #12202d;
  --bg-bottom: #0b151f;
  --shape-stroke: rgba(255, 255, 255, 0.05);
  --card-bg: rgba(10, 22, 34, 0.65);
  --card-border: rgba(255, 255, 255, 0.12);
  --text-primary: #f5f9fc;
  --text-muted: rgba(204, 220, 236, 0.75);
  --hud-bg: rgba(8, 17, 26, 0.7);
  --drawer-bg: #0f1b28;
  --drawer-border: #38bdf8;
}

[data-theme="dark"] {
  --bg-top: #17171d;
  --bg-mid: #111116;
  --bg-bottom: #09090d;
  --shape-stroke: rgba(255, 255, 255, 0.04);
  --card-bg: rgba(28, 28, 36, 0.78);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-muted: rgba(210, 210, 224, 0.72);
  --hud-bg: rgba(16, 16, 22, 0.8);
  --drawer-bg: #15151c;
  --drawer-border: #f5c542;
}

[data-theme="light"] {
  --bg-top: #f4eef8;
  --bg-mid: #ebe1f2;
  --bg-bottom: #e2d5ec;
  --shape-stroke: rgba(98, 32, 118, 0.08);
  --card-bg: rgba(255, 255, 255, 0.86);
  --card-border: rgba(70, 24, 90, 0.12);
  --text-primary: #1e1326;
  --text-muted: #5a4668;
  --hud-bg: rgba(255, 255, 255, 0.82);
  --drawer-bg: #ffffff;
  --drawer-border: #d99b18;
}

/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: "Quicksand", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: linear-gradient(155deg, var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* ==================== BACKGROUND SHAPES ==================== */
.bg-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-shapes {
  width: 100%;
  height: 100%;
  color: var(--shape-stroke);
}

/* ==================== SCREENS ==================== */
.screen {
  display: none;
  position: relative;
  z-index: 1;
  min-height: 100dvh;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: #14141d;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

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

/* ==================== TOP BAR & BUTTONS ==================== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.top-bar-right {
  display: flex;
  gap: 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-primary-green {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 22px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(180deg, #3bbf78 0%, #2b9d5f 100%);
  box-shadow: 0 5px 0 #1f7445, 0 10px 24px rgba(0, 0, 0, 0.3);
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn-primary-green:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-primary-green:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #1f7445;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  background: #ffffff;
  color: #1f1628;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn-white:hover {
  background: #f5effa;
  transform: translateY(-1px);
}

.btn-white:active {
  transform: translateY(2px);
}

.btn-outline-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.12s ease;
}

.btn-outline-dark:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-sm {
  padding: 9px 14px;
  font-size: 0.88rem;
}

/* ==================== START SCREEN ==================== */
.start-container {
  width: 100%;
  max-width: 640px;
  margin: auto;
  padding: 8px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-banner-card {
  padding: 32px 26px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.hero-logo-wrap {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #ff4fd8, #3dc2b8);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.hero-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.quiz-title-hero {
  font-size: clamp(1.85rem, 4.4vw, 2.75rem);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.quiz-meta-hero {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
}

.required-badge {
  color: #ff6bd6;
  font-size: 0.78rem;
  margin-left: 6px;
}

.field-error {
  color: #ff8080;
  font-size: 0.86rem;
  font-weight: 700;
  margin-top: 2px;
}

#input-player-name.input-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
  animation: shakeInput 0.32s ease;
}

@keyframes shakeInput {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.loading-logo-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  animation: pulsePop 0.9s ease infinite alternate;
}

.hud-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

.summary-logo-img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.stopwatch-pill {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.4);
  color: #bae6fd;
  font-variant-numeric: tabular-nums;
}

.start-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 16px;
}

.quiz-info-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.quiz-title {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
}

.quiz-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.action-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.player-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#input-player-name {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease;
}

[data-theme="light"] #input-player-name {
  background: rgba(255, 255, 255, 0.9);
}

#input-player-name:focus {
  border-color: #3bbf78;
}

.secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-card,
.selector-card {
  padding: 18px 22px;
}

.section-heading {
  font-size: 1.04rem;
  font-weight: 700;
}

.settings-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 0;
}

.setting-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.96rem;
}

.setting-icon {
  font-size: 1.1rem;
}

/* Custom Switch */
.switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.18s ease;
  flex-shrink: 0;
}

[data-theme="light"] .switch-track {
  background: rgba(40, 20, 60, 0.22);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.switch-input:checked + .switch-track {
  background: #3bbf78;
}

.switch-input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch-sm {
  width: 38px;
  height: 22px;
}

.switch-sm::after {
  width: 16px;
  height: 16px;
}

.switch-input:checked + .switch-sm::after {
  transform: translateX(16px);
}

.selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.meme-options,
.theme-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.choice-chip,
.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--card-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.choice-chip:hover,
.theme-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

.choice-chip.active,
.theme-chip.active {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.24);
}

.theme-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.swatch-classic { background: linear-gradient(135deg, #521440, #23061a); }
.swatch-synthwave { background: linear-gradient(135deg, #6d28d9, #ec4899); }
.swatch-focus { background: linear-gradient(135deg, #1e3a5f, #0f172a); }
.swatch-dark { background: linear-gradient(135deg, #27272a, #09090b); }
.swatch-light { background: linear-gradient(135deg, #f8fafc, #d8b4fe); }
.swatch-random { background: conic-gradient(#a6ad00, #9b4dff, #f27b2d, #3dc2b8, #a6ad00); }

/* ==================== LOADING / PRE-GAME SCREEN ==================== */
#screen-loading {
  justify-content: space-between;
  align-items: center;
}

.pink-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
}

.pink-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff4fd8, #ff2d95);
  box-shadow: 0 0 12px rgba(255, 45, 149, 0.7);
  transition: width 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.loading-center {
  text-align: center;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.loading-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  transform: rotate(-8deg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  animation: pulsePop 0.9s ease infinite alternate;
}

@keyframes pulsePop {
  from { transform: rotate(-8deg) scale(1); }
  to { transform: rotate(-4deg) scale(1.06); }
}

.loading-title {
  font-size: 1.45rem;
  font-weight: 700;
}

.loading-sub {
  color: var(--text-muted);
  font-weight: 600;
}

.protip-banner {
  width: 100%;
  background: #0a060c;
  color: #f4eef8;
  text-align: center;
  padding: 15px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==================== GAMEPLAY HUD ==================== */
#screen-game {
  height: 100dvh;
  overflow: hidden;
}

.game-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--hud-bg);
  border-bottom: 1px solid var(--card-border);
  gap: 10px;
  z-index: 10;
  transition: padding-right 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.game-hud-top.drawer-open,
.game-hud-bottom.drawer-open {
  padding-right: 356px;
}

.hud-left,
.hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wayground-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff4fd8, #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-7deg);
  flex-shrink: 0;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  font-weight: 700;
  font-size: 0.92rem;
}

.streak-pill.streak-0 {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

.streak-pill.streak-1 {
  background: rgba(249, 115, 22, 0.28);
  border-color: rgba(249, 115, 22, 0.6);
  color: #fdba74;
}

.streak-pill.streak-2 {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(59, 130, 246, 0.65);
  color: #93c5fd;
}

.streak-pill.streak-3 {
  background: rgba(168, 85, 247, 0.34);
  border-color: rgba(192, 132, 252, 0.75);
  color: #e9d5ff;
}

.bonus-pill {
  gap: 8px;
}

.bonus-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.bonus-track {
  width: 72px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.bonus-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  transition: width 0.35s ease;
}

.score-pill {
  background: rgba(255, 255, 255, 0.1);
}

.score-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==================== GAME STAGE ==================== */
.game-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 16px 20px;
  overflow-y: auto;
  gap: 16px;
  transition: padding-right 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.game-stage.drawer-open {
  padding-right: 356px;
}

.question-area {
  flex: 1;
  min-width: 0;
  max-width: 1120px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.28s ease;
}

.question-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 36px 28px 28px;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.question-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #23112b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.question-badge.redemption {
  background: linear-gradient(90deg, #dc2626, #f97316);
  border-color: #fde047;
}

.question-text {
  font-size: clamp(1.08rem, 2.2vw, 1.48rem);
  line-height: 1.5;
  font-weight: 600;
  max-width: 900px;
}

/* ==================== OPTION CARDS ==================== */
.options-grid {
  flex: 1;
  display: grid;
  gap: 14px;
  min-height: 220px;
}

.options-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.options-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.option-card {
  position: relative;
  border: none;
  border-radius: 16px;
  padding: 24px 18px;
  color: #ffffff;
  font-size: clamp(0.98rem, 1.55vw, 1.18rem);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: transform 0.14s ease, opacity 0.22s ease, filter 0.15s ease, box-shadow 0.14s ease;
}

/* Specular top highlight */
.option-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.32);
}

.option-card.opt-0 {
  background: linear-gradient(180deg, #a8b000 0%, #838a00 100%);
  box-shadow: 0 6px 0 #5f6500, 0 10px 22px rgba(0, 0, 0, 0.26);
}

.option-card.opt-1 {
  background: linear-gradient(180deg, #9d50ff 0%, #752bbf 100%);
  box-shadow: 0 6px 0 #541d8c, 0 10px 22px rgba(0, 0, 0, 0.26);
}

.option-card.opt-2 {
  background: linear-gradient(180deg, #f27b2d 0%, #d15a13 100%);
  box-shadow: 0 6px 0 #993f0a, 0 10px 22px rgba(0, 0, 0, 0.26);
}

.option-card.opt-3 {
  background: linear-gradient(180deg, #32c0b5 0%, #179188 100%);
  box-shadow: 0 6px 0 #0f6861, 0 10px 22px rgba(0, 0, 0, 0.26);
}

.option-card:hover:not(:disabled) {
  transform: translateY(-3px);
  filter: brightness(1.06);
}

.option-card:active:not(:disabled) {
  transform: translateY(3px);
}

.option-card:disabled {
  cursor: default;
}

.option-key {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-card.eliminated {
  opacity: 0.14;
  pointer-events: none;
  filter: grayscale(0.8);
}

.option-card.fade-out {
  display: none;
}

.option-card.is-correct {
  background: linear-gradient(180deg, #27c76f 0%, #1a9b53 100%) !important;
  box-shadow: 0 6px 0 #126d3a, 0 0 28px rgba(39, 199, 111, 0.55) !important;
  transform: scale(1.02);
}

.option-card.is-wrong {
  background: linear-gradient(180deg, #e53945 0%, #b91c28 100%) !important;
  box-shadow: 0 6px 0 #7f121b, 0 0 24px rgba(229, 57, 69, 0.5) !important;
}

.points-popup {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 14px;
  border-radius: 999px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  animation: floatUpPop 0.9s ease forwards;
  pointer-events: none;
}

@keyframes floatUpPop {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.8); }
  25% { opacity: 1; transform: translate(-50%, 0px) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -18px) scale(1); }
}

/* ==================== ANSWER EXPLANATION DRAWER ==================== */
.explanation-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 92vw);
  background: var(--drawer-bg);
  border-left: 4px solid var(--drawer-border);
  box-shadow: -12px 0 36px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  padding: 22px;
  gap: 16px;
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 30;
}

.explanation-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drawer-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--drawer-border);
}

.drawer-status-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
}

.drawer-status-chip.correct { background: #1fa95b; }
.drawer-status-chip.wrong { background: #dc2626; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.drawer-footer {
  display: flex;
  justify-content: flex-end;
}

.btn-next {
  min-width: 150px;
}

/* ==================== FEEDBACK BANNER ==================== */
.feedback-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 66px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease, right 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 20;
}

.feedback-banner.drawer-open {
  right: min(340px, 92vw);
}

.feedback-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.feedback-banner.correct { background: #1fa95b; }
.feedback-banner.wrong { background: #dc2626; }

/* ==================== BOTTOM HUD ==================== */
.game-hud-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--hud-bg);
  border-top: 1px solid var(--card-border);
  gap: 12px;
  z-index: 10;
  transition: padding-right 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.player-name-label {
  font-weight: 700;
  font-size: 0.96rem;
}

.powerups-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.powerup-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.powerup-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.powerup-btn.active {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.24);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
}

.powerup-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.powerup-btn.consumed {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.08);
  opacity: 0.3;
}

.powerup-btn.consumed .pu-icon,
.powerup-btn.consumed .pu-name {
  opacity: 0;
}

/* ==================== REDEMPTION SELECTOR ==================== */
#screen-redemption {
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.redemption-stage {
  width: 100%;
  max-width: 720px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.redemption-badge {
  background: linear-gradient(90deg, #dc2626, #f97316);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid #fde047;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.redemption-title {
  font-size: clamp(1.2rem, 2.8vw, 1.7rem);
  font-weight: 700;
}

.redemption-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.redemption-pick {
  background: linear-gradient(160deg, #33144a 0%, #1d092b 100%);
  border: 2px solid rgba(251, 191, 36, 0.45);
  border-radius: 18px;
  padding: 36px 16px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.redemption-pick:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: #fde047;
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.35);
}

.redemption-dots {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: #fde047;
}

.redemption-phoenix {
  font-size: 2.8rem;
}

.redemption-label {
  font-weight: 700;
  font-size: 1.02rem;
}

@media (max-width: 560px) {
  .redemption-cards {
    grid-template-columns: 1fr;
  }
  .redemption-pick {
    padding: 20px 16px;
    flex-direction: row;
    justify-content: center;
  }
}

.hud-bottom-spacer {
  width: 80px;
}

/* ==================== MEME INTERSTITIAL ==================== */
#screen-meme {
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.meme-stage {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.meme-card {
  width: 100%;
  background: linear-gradient(160deg, #21102e 0%, #12091c 100%);
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
  color: #ffffff;
}

.meme-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f5c542;
  background: rgba(245, 197, 66, 0.14);
  padding: 4px 12px;
  border-radius: 999px;
}

.meme-emoji {
  font-size: 4rem;
  line-height: 1.1;
}

.meme-top {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.meme-bottom {
  font-size: 1.02rem;
  font-weight: 700;
  color: #a5f3fc;
}

.meme-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.meme-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.meme-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.meme-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.dot.active {
  background: #ffffff;
}

/* ==================== SUMMARY SCREEN ==================== */
.summary-container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto 48px;
  padding: 0 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-hero {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.summary-hero-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-quiz-title {
  font-size: 1.2rem;
  font-weight: 700;
  word-wrap: break-word;
}

.summary-banner {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fde047;
  background: rgba(253, 224, 71, 0.12);
  border: 1px solid rgba(253, 224, 71, 0.28);
  padding: 8px 12px;
  border-radius: 10px;
  width: fit-content;
  max-width: 100%;
}

[data-theme="light"] .summary-banner {
  color: #92400e;
  background: #fef3c7;
  border-color: #fcd34d;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.metric-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.accuracy-card,
.stats-card,
.review-card {
  padding: 20px 22px;
}

.card-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.accuracy-pill {
  background: #1fa95b;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 4px 12px;
  border-radius: 999px;
}

.accuracy-bar-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #ef4444;
  overflow: hidden;
}

.accuracy-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.muted-small {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-pills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat-pill {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
}

.stat-green { background: rgba(34, 197, 94, 0.16); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.stat-red { background: rgba(239, 68, 68, 0.16); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.stat-blue { background: rgba(56, 189, 248, 0.16); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.3); }
.stat-amber { background: rgba(245, 158, 11, 0.16); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }

[data-theme="light"] .stat-green { color: #15803d; }
[data-theme="light"] .stat-red { color: #b91c1c; }
[data-theme="light"] .stat-blue { color: #0369a1; }
[data-theme="light"] .stat-amber { color: #b45309; }

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-item {
  background: #ffffff;
  color: #1f1628;
  border-radius: 14px;
  padding: 16px 18px;
  border-left: 6px solid #22c55e;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.review-item.wrong {
  border-left-color: #ef4444;
}

.review-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.review-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #6b5b7b;
}

.review-item-prompt {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 10px;
}

.review-item-answer {
  font-size: 0.86rem;
  font-weight: 700;
  color: #15803d;
  background: #ecfdf5;
  padding: 7px 11px;
  border-radius: 8px;
}

/* ==================== MODALS ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 16, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.review-modal {
  width: 100%;
  max-width: 680px;
  max-height: 88dvh;
  background: #ffffff;
  color: #1f1628;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.review-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #ede9f2;
  gap: 10px;
}

.review-modal-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rm-status {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.rm-correct { background: #22c55e; }
.rm-wrong { background: #ef4444; }

.rm-pill {
  font-size: 0.82rem;
  font-weight: 700;
  background: #f3f0f7;
  color: #4b3d59;
  padding: 4px 10px;
  border-radius: 7px;
}

.rm-close {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  color: #6b5b7b;
  cursor: pointer;
  padding: 4px 8px;
}

.review-modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rm-prompt {
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.5;
}

.rm-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rm-opt {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid #e5e0ec;
  background: #faf9fc;
  font-size: 0.94rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rm-opt.opt-correct {
  border-color: #22c55e;
  background: #ecfdf5;
  color: #14532d;
}

.rm-opt.opt-wrong-picked {
  border-color: #ef4444;
  background: #fef2f2;
  color: #7f1d1d;
}

.rm-opt-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.tag-correct { background: #22c55e; color: #fff; }
.tag-yours { background: #7c3aed; color: #fff; }

.rm-explanation {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 12px 14px;
  border-radius: 8px;
}

.rm-exp-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #b45309;
  margin-bottom: 4px;
}

.rm-exp-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #3f2e15;
}

.review-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid #ede9f2;
  gap: 10px;
  flex-wrap: wrap;
}

.rm-toggles {
  display: flex;
  gap: 14px;
}

.rm-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #4b3d59;
  cursor: pointer;
}

.rm-check input {
  accent-color: #7c3aed;
  width: 16px;
  height: 16px;
}

.rm-nav {
  display: flex;
  gap: 8px;
}

.rm-nav-btn {
  padding: 9px 16px;
  border-radius: 9px;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.rm-prev { background: #e5e0ec; color: #362945; }
.rm-next { background: #7c3aed; color: #ffffff; }
.rm-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== FLASHCARDS MODAL ==================== */
.flashcard-modal {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.fc-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.fc-card {
  perspective: 1200px;
  height: 340px;
  cursor: pointer;
}

.fc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}

.fc-card.flipped .fc-inner {
  transform: rotateY(180deg);
}

.fc-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  background: #ffffff;
  color: #1f1628;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
}

.fc-back {
  transform: rotateY(180deg);
  background: #f5f3ff;
}

.fc-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7c3aed;
  background: #ede9fe;
  padding: 4px 12px;
  border-radius: 999px;
}

.fc-label-green {
  color: #15803d;
  background: #dcfce7;
}

.fc-text {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.5;
}

.fc-hint {
  font-size: 0.82rem;
  color: #7b6c8c;
  font-weight: 600;
}

.fc-answer {
  font-size: 1.15rem;
  font-weight: 700;
  color: #14532d;
}

.fc-exp {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #4b3d59;
}

.fc-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ==================== WAITING ROOM & HOST & LEADERBOARD ==================== */
.lobby-container {
  width: 100%;
  max-width: 540px;
  margin: auto;
  padding: 24px 16px;
}

.lobby-card {
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.lobby-player-badge {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #bae6fd;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
}

.lobby-heading {
  font-size: clamp(1.3rem, 3.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
}

.lobby-countdown {
  font-size: 4.5rem;
  font-weight: 700;
  color: #4ade80;
  text-shadow: 0 0 28px rgba(74, 222, 128, 0.65);
  animation: pulsePop 0.55s ease infinite alternate;
}

.lobby-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 1rem;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  animation: pingDot 1.4s infinite;
}

@keyframes pingDot {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.host-main {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 40px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.host-status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.74rem;
}

.host-lobby-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
}

.host-join-card,
.host-start-card,
.host-board-card {
  padding: 24px;
}

.host-join-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.host-join-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.host-join-url {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fde047;
  word-break: break-all;
}

.host-qr-img {
  width: 190px;
  height: 190px;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.host-start-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.host-big-count {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.host-big-count span {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  color: #4ade80;
}

.host-big-count small {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 6px;
}

.host-start-btn {
  max-width: 380px;
  padding: 18px 24px;
  font-size: 1.22rem;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-weight: 600;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lb-row.lb-me {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
}

.lb-row.lb-top-1 {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.24), rgba(255, 255, 255, 0.06));
  border-color: rgba(250, 204, 21, 0.55);
}

.lb-row.lb-top-2 {
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.2), rgba(255, 255, 255, 0.06));
  border-color: rgba(203, 213, 225, 0.45);
}

.lb-row.lb-top-3 {
  background: linear-gradient(90deg, rgba(251, 146, 60, 0.22), rgba(255, 255, 255, 0.06));
  border-color: rgba(251, 146, 60, 0.5);
}

.lb-rank {
  width: 38px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  flex-shrink: 0;
}

.lb-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lb-chip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text-muted);
}

.lb-score {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fde047;
  min-width: 62px;
  text-align: right;
}

@media (max-width: 760px) {
  .host-lobby-grid {
    grid-template-columns: 1fr;
  }
  .lb-meta {
    display: none;
  }
}

/* ==================== RESPONSIVE (MOBILE FOR 400 PARTICIPANTS) ==================== */
@media (max-width: 820px) {
  .start-grid {
    grid-template-columns: 1fr;
  }

  .options-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-pills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hud-bottom-spacer,
  .pu-name,
  .bonus-pill {
    display: none;
  }

  .summary-hero {
    flex-direction: column-reverse;
    text-align: center;
  }

  .summary-hero-left {
    align-items: center;
    width: 100%;
  }

  .summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .summary-cta-row {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .summary-hero,
  .accuracy-card,
  .stats-card,
  .review-card {
    padding: 16px;
  }

  .review-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .game-stage {
    padding: 12px 12px 16px;
  }

  .game-stage.drawer-open,
  .game-hud-top.drawer-open,
  .game-hud-bottom.drawer-open {
    padding-right: 12px;
  }

  .feedback-banner.drawer-open {
    right: 0;
  }

  .question-card {
    padding: 28px 16px 18px;
    min-height: 130px;
  }

  .options-grid.cols-4,
  .options-grid.cols-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .option-card {
    padding: 16px 14px;
    min-height: 62px;
  }

  .option-key {
    display: none;
  }

  .explanation-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 60px;
    width: 100%;
    max-height: 56dvh;
    border-left: none;
    border-top: 4px solid var(--drawer-border);
    transform: translateY(115%);
  }

  .explanation-drawer.open {
    transform: translateY(0);
  }

  .secondary-actions {
    grid-template-columns: 1fr;
  }
}
