/* Parlour — game-show theme. Modern CSS, no framework, no build step. */
:root {
  --bg: #0b1020;
  --panel: #141a2e;
  --panel-2: #1c2440;
  --fg: #f3f4f8;
  --muted: #93a0c0;
  --gold: #ffcb45;
  --accent: #4f7cff;
  --good: #3ddc84;
  --bad: #ff5d5d;
  --rule: #2a3358;
  --radius: 12px;
  --font: "Helvetica Neue", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
/* The hidden attribute must win over class display rules (e.g. .join-screen
   sets display:grid, which would otherwise override [hidden]'s display:none). */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #1a2240, var(--bg));
  color: var(--fg); font-family: var(--font); min-height: 100vh;
}
h1, h2, h3 { margin: 0 0 .3em; line-height: 1.15; }
a { color: var(--accent); text-decoration: none; }
.muted { color: var(--muted); }
.error { color: var(--bad); }
button {
  font: inherit; cursor: pointer; border: 1px solid var(--rule);
  background: var(--panel-2); color: var(--fg);
  border-radius: var(--radius); padding: 12px 18px; font-weight: 600;
}
button:hover { border-color: var(--accent); }
button:disabled { opacity: .35; cursor: not-allowed; }
button.primary { background: var(--gold); color: #1a1300; border-color: var(--gold); }
button.ghost { background: transparent; }
input {
  font: inherit; color: var(--fg); background: var(--panel);
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; width: 100%;
}

/* Lobby */
.lobby { max-width: 980px; margin: 0 auto; padding: 6vh 24px; }
.lobby-header h1 { font-size: 56px; color: var(--gold); letter-spacing: -1px; }
.game-list { list-style: none; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.game-card { display: block; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; transition: transform .1s, border-color .1s; }
.game-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.game-card h2 { color: var(--gold); }
.game-card .players { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.join-hint { margin-top: 30px; }

/* Host big screen */
.topbar { display: flex; align-items: center; gap: 20px; padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--rule); }
.topbar .brand { color: var(--gold); font-weight: 800; font-size: 20px; }
.topbar .room strong { font-size: 22px; letter-spacing: 4px; color: var(--gold); }
.topbar .spacer { flex: 1; }
.stage { padding: 28px; max-width: 1100px; margin: 0 auto; }
.banner { font-size: 30px; text-align: center; margin: 10px 0 24px; min-height: 1.2em; }
.banner.small { font-size: 20px; }
.big { font-size: 32px; text-align: center; }
.round { text-align: center; margin: 18px 0; }

/* Shared host lobby (pre-start) */
.lobby-stage { text-align: center; padding-top: 4vh; }
.lobby-prompt { font-size: 24px; color: var(--muted); margin-bottom: 12px; }
.lobby-code { font-size: 96px; font-weight: 800; letter-spacing: 12px; color: var(--gold); line-height: 1.1; }
.lobby-players { list-style: none; padding: 0; margin: 28px auto 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 700px; }
.lobby-chip { background: var(--panel-2); border: 1px solid var(--gold); border-radius: 999px; padding: 10px 20px; font-weight: 600; font-size: 18px; }

/* Wheel of Fortune board */
.wof-cat { text-align: center; text-transform: uppercase; letter-spacing: 3px; color: var(--gold); margin-bottom: 18px; }
.wof-board { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.wof-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wof-cell { width: 48px; height: 60px; display: grid; place-items: center; font-size: 30px; font-weight: 700;
  background: #0a1f4a; border: 2px solid #2b56b0; border-radius: 6px; }
.wof-cell.shown { background: #fff; color: #0a1f4a; }
.wof-cell.punct { background: transparent; border-color: transparent; color: var(--muted); }
.wheel { font-size: 64px; text-align: center; margin: 16px; }
.wheel.spinning { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.landed { text-align: center; font-size: 36px; color: var(--gold); font-weight: 800; margin: 16px; }

/* Standings (shared by all modes) */
.standings { list-style: none; padding: 0; max-width: 520px; margin: 24px auto 0; display: grid; gap: 8px; }
.standings li { display: flex; justify-content: space-between; padding: 12px 16px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); }
.standings li.active { border-color: var(--gold); background: var(--panel-2); }
.standings li.offline { opacity: .45; }
.standings li.offline .pname { text-decoration: line-through; }
.pscore { color: var(--gold); font-weight: 700; }

/* Phone play (shared by all modes) */
.play { max-width: 520px; margin: 0 auto; padding: 24px; }
.join-screen { display: grid; gap: 16px; padding-top: 8vh; }
.join-screen h1 { color: var(--gold); font-size: 40px; }
.play-pad { display: grid; gap: 16px; }
.actions { display: grid; gap: 12px; }
.actions button { padding: 18px; font-size: 18px; }
.keypad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.keypad button { padding: 14px 0; }
.vowel-tray { margin-top: 8px; }
.solve-input { margin-top: 8px; }

/* Quiz modes (Chase, Hard Quiz) — shared option/buzzer styles */
.options { display: grid; gap: 12px; }
.options button { padding: 16px; text-align: left; }
.options button.correct { background: var(--good); color: #04210f; border-color: var(--good); }
.options button.wrong { background: var(--bad); color: #2a0000; border-color: var(--bad); }
.qtext { font-size: 26px; text-align: center; margin: 20px 0; }
.buzzer { width: 100%; padding: 40px; font-size: 26px; border-radius: 50%; aspect-ratio: 1; background: var(--bad); color: #fff; border: none; }
.ladder { display: grid; gap: 6px; max-width: 360px; margin: 20px auto; }
.ladder .rung { display: flex; justify-content: space-between; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 8px; }
.ladder .rung.contestant { border-color: var(--accent); }
.ladder .rung.chaser { border-color: var(--bad); }
.timer { text-align: center; font-size: 22px; color: var(--gold); }
