/* ==========================================================================
   PBX COMMANDER LIVE ARENA — Kahoot-Style Multiplayer Styles
   Shared by Host Big Screen (host.html) and Mobile Controller (play.html)
   ========================================================================== */

:root {
  --bg-deep: #070b18;
  --bg-panel: rgba(15, 23, 42, 0.88);
  --bg-card: rgba(20, 31, 56, 0.92);
  --border: rgba(148, 163, 184, 0.2);

  --text-main: #f8fafc;
  --text-sub: #94a3b8;

  /* Iconic 4-Shape Kahoot Arcade Colors */
  --tile-0: #e11d48;
  --tile-0-dark: #9f1239;
  --tile-1: #0284c7;
  --tile-1-dark: #075985;
  --tile-2: #d97706;
  --tile-2-dark: #92400e;
  --tile-3: #059669;
  --tile-3-dark: #065f46;

  --gold: #fbbf24;
  --cyan: #38bdf8;
  --emerald: #10b981;
  --violet: #a855f7;
  --rose: #f43f5e;

  --font-ui: 'Prompt', 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-ui);
  line-height: 1.5;
  overflow-x: hidden;
}

button, input, select { font-family: inherit; }
.hidden { display: none !important; }

/* Background */
.arena-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 15%, rgba(14, 165, 233, 0.22), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(168, 85, 247, 0.2), transparent 45%),
    radial-gradient(circle at 50% 95%, rgba(245, 158, 11, 0.15), transparent 45%),
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: auto, auto, auto, 42px 42px, 42px 42px;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 90;
}

/* ==================== TOP BAR ==================== */
.arena-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 11, 24, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
}

.arena-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.arena-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.arena-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(56, 189, 248, 0.3));
  border: 1px solid rgba(168, 85, 247, 0.55);
}

.arena-brand-title {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, #fde047, #38bdf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.arena-brand-sub {
  font-size: 0.72rem;
  color: var(--text-sub);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.82);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
}

.pill-btn:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.pin-mini-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fde047;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
}

/* ==================== HOST SHELL ==================== */
.host-shell {
  position: relative;
  z-index: 2;
  max-width: 1260px;
  margin: 0 auto;
  padding: 22px 20px 60px;
}

.phase-view { display: none; animation: fadeIn 0.26s ease; }
.phase-view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== HOST LOBBY ==================== */
.lobby-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 22px;
  align-items: start;
}

.qr-panel {
  background: var(--bg-panel);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 22px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 24px 55px rgba(2, 6, 23, 0.6);
}

.scan-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.qr-frame {
  display: inline-block;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 0 36px rgba(56, 189, 248, 0.3);
  margin-bottom: 14px;
}

.qr-frame svg {
  display: block;
  width: 228px;
  height: 228px;
}

.pin-box {
  background: rgba(7, 11, 24, 0.78);
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.pin-label {
  font-size: 0.75rem;
  color: #fde68a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pin-code {
  font-family: var(--font-mono);
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fde047;
  line-height: 1.15;
}

.join-url-box {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 8px 10px;
  word-break: break-all;
  margin-bottom: 12px;
}

.ip-selector {
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-sub);
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.qr-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Lobby Right Side */
.lobby-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-card, .players-wall-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 22px;
}

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

.card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
}

.field-group label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-sub);
  margin-bottom: 5px;
}

.arena-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(7, 11, 24, 0.9);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
}

.player-count-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.players-wall {
  min-height: 150px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  padding: 8px 0 18px;
}

.empty-wall {
  width: 100%;
  text-align: center;
  color: var(--text-sub);
  padding: 36px 12px;
  border: 1.5px dashed rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  font-size: 0.92rem;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(51, 65, 85, 0.8));
  border: 1px solid rgba(56, 189, 248, 0.38);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  animation: popIn 0.25s cubic-bezier(0.2, 1.3, 0.4, 1);
  transition: all 0.16s;
}

.player-chip:hover {
  border-color: var(--rose);
  background: rgba(244, 63, 94, 0.2);
}

.player-chip .bot-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.lobby-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.big-start-btn {
  padding: 15px 34px;
  border-radius: 15px;
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.42);
  transition: all 0.2s;
}

.big-start-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
}

.big-start-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.accent-btn {
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
  transition: all 0.18s;
}

.accent-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

.gold-action-btn {
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #fbbf24, #ea580c);
  color: #1c1917;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
}

/* ==================== HOST LIVE QUESTION ==================== */
.q-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.q-meta-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.q-num-pill {
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #bae6fd;
}

.q-double-pill {
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.55);
  animation: pulseBadge 1.4s infinite;
}

.q-double-pill.boss {
  background: linear-gradient(135deg, #e11d48, #f59e0b);
  box-shadow: 0 0 26px rgba(244, 63, 94, 0.65);
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.q-live-metrics {
  display: flex;
  align-items: center;
  gap: 14px;
}

.timer-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.95);
  border: 4px solid var(--cyan);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.35);
}

.timer-ring.urgent {
  border-color: var(--rose);
  color: #fda4af;
  box-shadow: 0 0 26px rgba(244, 63, 94, 0.6);
  animation: pulseBadge 0.6s infinite;
}

.answered-counter {
  text-align: center;
  padding: 8px 16px;
  border-radius: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.answered-num {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--emerald);
  line-height: 1.1;
}

.answered-lbl {
  font-size: 0.72rem;
  color: var(--text-sub);
}

/* Host Question Stage */
.q-stage-card {
  background: var(--bg-panel);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 22px;
  padding: 28px 30px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.55);
}

.q-stage-card.is-hard {
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 42px rgba(245, 158, 11, 0.2);
}

.q-stage-card.is-boss {
  border-color: rgba(244, 63, 94, 0.85);
  box-shadow: 0 0 48px rgba(244, 63, 94, 0.25);
}

.q-stage-text {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.38;
}

.q-stage-sub {
  margin-top: 8px;
  font-size: 1rem;
  color: #7dd3fc;
}

/* 4-Color Kahoot Grid */
.kahoot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.k-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 22px;
  border-radius: 16px;
  border: none;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: left;
  position: relative;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

.k-tile-0 { background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 6px 0 var(--tile-0-dark); }
.k-tile-1 { background: linear-gradient(135deg, #0ea5e9, #0369a1); box-shadow: 0 6px 0 var(--tile-1-dark); }
.k-tile-2 { background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: 0 6px 0 var(--tile-2-dark); }
.k-tile-3 { background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 6px 0 var(--tile-3-dark); }

.k-shape {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  background: rgba(0, 0, 0, 0.24);
}

.k-text {
  flex: 1;
  line-height: 1.35;
}

.k-text-sub {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.88;
  margin-top: 3px;
}

.k-tile.dimmed {
  opacity: 0.32;
  filter: grayscale(0.45);
}

.k-tile.is-correct {
  outline: 4px solid #fde047;
  transform: scale(1.015);
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.55);
}

.k-check {
  font-size: 1.65rem;
  flex-shrink: 0;
}

/* ==================== REVEAL BAR CHART & FASTEST ==================== */
.reveal-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 18px;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  height: 150px;
  align-items: end;
  max-width: 680px;
  margin: 10px auto 18px;
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 6px;
}

.bar-count {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1rem;
}

.bar-fill {
  width: 100%;
  min-height: 10px;
  border-radius: 10px 10px 4px 4px;
  transition: height 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.bar-fill-0 { background: var(--tile-0); }
.bar-fill-1 { background: var(--tile-1); }
.bar-fill-2 { background: var(--tile-2); }
.bar-fill-3 { background: var(--tile-3); }

.bar-label {
  font-size: 0.92rem;
  font-weight: 700;
}

.reveal-highlights {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.fastest-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fde68a;
  font-weight: 700;
}

.tip-strip {
  flex: 1;
  min-width: 260px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 0.92rem;
  color: #e0f2fe;
}

/* ==================== SCOREBOARD ==================== */
.scoreboard-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-panel);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 22px;
  padding: 26px;
}

.sb-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 22px;
}

.sb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--border);
}

.sb-row.top1 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(30, 41, 59, 0.9));
  border-color: rgba(251, 191, 36, 0.65);
}

.sb-rank {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.25rem;
  width: 38px;
  text-align: center;
}

.sb-avatar { font-size: 1.6rem; }
.sb-info { flex: 1; }
.sb-name { font-weight: 800; font-size: 1.08rem; }
.sb-meta { font-size: 0.78rem; color: var(--text-sub); }
.sb-delta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #6ee7b7;
  margin-right: 10px;
}
.sb-score {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--gold);
}

/* ==================== TOP 3 PODIUM ==================== */
.podium-stage {
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}

.podium-title {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 6px;
  background: linear-gradient(90deg, #fde047, #fb923c, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.podium-sub {
  color: var(--text-sub);
  margin: 0 0 28px;
}

.podium-columns {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 26px;
  padding-top: 12px;
}

.podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: riseUp 0.7s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

.podium-slot.rank-2 { animation-delay: 0.35s; }
.podium-slot.rank-1 { animation-delay: 0.7s; }
.podium-slot.rank-3 { animation-delay: 0.08s; }

@keyframes riseUp {
  from { opacity: 0; transform: translateY(45px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.podium-avatar {
  font-size: 3rem;
  margin-bottom: 4px;
}

.podium-slot.rank-1 .podium-avatar {
  font-size: 3.7rem;
  filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.7));
}

.podium-name {
  font-weight: 800;
  font-size: 1.18rem;
  margin-bottom: 2px;
}

.podium-score {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.podium-block {
  width: 100%;
  border-radius: 18px 18px 8px 8px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
}

.podium-slot.rank-1 .podium-block {
  min-height: 195px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.42), rgba(180, 83, 9, 0.45));
  border-color: var(--gold);
  box-shadow: 0 0 38px rgba(251, 191, 36, 0.3);
}

.podium-slot.rank-2 .podium-block {
  min-height: 155px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.34), rgba(51, 65, 85, 0.55));
  border-color: #cbd5e1;
}

.podium-slot.rank-3 .podium-block {
  min-height: 125px;
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.35), rgba(120, 53, 15, 0.5));
  border-color: #f59e0b;
}

.podium-medal {
  font-size: 2.2rem;
}

.podium-stats {
  font-size: 0.78rem;
  color: #f1f5f9;
  line-height: 1.45;
}

.speed-award-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #bae6fd;
  font-weight: 700;
  margin-bottom: 22px;
}

/* ==================== MOBILE PLAYER CONTROLLER (play.html) ==================== */
.player-shell {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.join-card {
  margin: auto 0;
  background: var(--bg-panel);
  border: 1.5px solid rgba(56, 189, 248, 0.38);
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: 0 24px 55px rgba(2, 6, 23, 0.6);
}

.join-title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  text-align: center;
}

.join-sub {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--text-sub);
  text-align: center;
}

.input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.big-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 13px;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  background: rgba(7, 11, 24, 0.9);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
  outline: none;
}

.big-input:focus { border-color: var(--cyan); }
.pin-input { font-family: var(--font-mono); font-size: 1.55rem; letter-spacing: 0.16em; color: #fde047; }

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.avatar-opt {
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: rgba(30, 41, 59, 0.7);
  font-size: 1.45rem;
  cursor: pointer;
  transition: all 0.15s;
}

.avatar-opt.selected {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.22);
  transform: scale(1.08);
}

.err-msg {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.84rem;
  margin-bottom: 12px;
  text-align: center;
}

/* Mobile Player Active Question */
.p-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.p-hud-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.p-hud-score {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--gold);
  font-size: 1.05rem;
}

.p-timer-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
  margin-bottom: 12px;
}

.p-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--cyan), var(--gold));
  transition: width 0.15s linear;
}

.p-question-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  text-align: center;
}

.p-question-text {
  font-weight: 700;
  font-size: 1.02rem;
  margin-top: 6px;
}

.player-pad {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
  flex: 1;
}

.pad-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px;
  border-radius: 15px;
  border: none;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 0.1s;
}

.pad-btn:active { transform: translateY(3px); }
.pad-btn:disabled { opacity: 0.55; cursor: default; }

.status-card {
  margin: auto 0;
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 30px 22px;
  text-align: center;
}

.status-card.win { border-color: var(--emerald); background: rgba(16, 185, 129, 0.14); }
.status-card.double-win { border-color: var(--gold); background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(16, 185, 129, 0.15)); }
.status-card.lose { border-color: var(--rose); background: rgba(244, 63, 94, 0.14); }

.big-emoji { font-size: 3.4rem; margin-bottom: 8px; }
.points-pop {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: #fde047;
  margin: 8px 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 960px) {
  .lobby-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .kahoot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .podium-columns { grid-template-columns: 1fr; }
  .podium-slot.rank-1 { order: -1; }
}
