:root { color-scheme: dark; --ink:#f6fbff; --muted:#9cb6c8; --deep:#05131c; --panel:#0a2431; --line:rgba(129,229,217,.22); --mint:#31e6c1; --gold:#ffcf4a; --pink:#ff6b8a; }
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin:0; font-family:Inter,ui-rounded,"Trebuchet MS",system-ui,sans-serif; color:var(--ink); background:radial-gradient(circle at 12% 10%,rgba(49,230,193,.15),transparent 28rem),linear-gradient(145deg,#071a26,#020c12); }
button { font:inherit; touch-action:manipulation; }
.back { position:fixed; z-index:10; left:18px; top:14px; min-height:40px; display:flex; align-items:center; padding:0 12px; color:var(--muted); background:rgba(3,16,24,.8); border:1px solid var(--line); border-radius:999px; text-decoration:none; }
.host-shell { width:min(1600px,100%); margin:0 auto; padding:clamp(66px,7vw,92px) clamp(14px,3vw,44px) 28px; }
.host-header { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:16px; }
.header-status { display:flex; align-items:center; gap:8px; }
.screen-role { padding:8px 12px; border-radius:999px; color:#bcd0ff; background:rgba(117,167,255,.13); border:1px solid rgba(117,167,255,.34); font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.eyebrow { margin:0 0 6px; color:var(--mint); font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.17em; }
.host-header h1 { margin:0; font-size:clamp(38px,5vw,72px); line-height:.9; letter-spacing:-.06em; }
.host-header h1 em { color:var(--gold); font-style:normal; }
.server-status { padding:8px 12px; border:1px solid var(--line); border-radius:999px; color:var(--muted); font-size:13px; }
.server-status.online { color:var(--mint); }
.server-status.problem { color:#ff9aaa; }
.game-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,340px); gap:18px; align-items:start; }
.stage-wrap { position:relative; min-width:0; aspect-ratio:16/9; overflow:hidden; border:1px solid var(--line); border-radius:24px; background:#071c29; box-shadow:0 30px 90px rgba(0,0,0,.35); }
canvas { width:100%; height:100%; display:block; background:#0b3042; }
.stage-overlay { position:absolute; inset:0; display:grid; place-items:center; padding:22px; background:rgba(2,12,18,.65); backdrop-filter:blur(5px); }
.stage-overlay[hidden] { display:none; }
.overlay-card { max-width:560px; padding:30px; border:1px solid var(--line); border-radius:24px; text-align:center; background:rgba(7,27,39,.95); }
.overlay-card h2 { margin:4px 0 10px; font-size:clamp(30px,4vw,54px); }
.overlay-card p:last-child { color:var(--muted); line-height:1.5; }
.host-panel { display:flex; flex-direction:column; gap:12px; }
.join-panel,.roster-panel,.host-actions { padding:18px; border:1px solid var(--line); border-radius:20px; background:rgba(10,36,49,.9); }
.join-panel { text-align:center; }
.join-panel > p:last-of-type { margin:3px 0 12px; color:var(--muted); font-size:12px; }
.join-panel strong { color:var(--ink); }
.room-code { margin:-3px 0 0; color:var(--gold); font-size:clamp(42px,5vw,64px); line-height:1; font-weight:1000; letter-spacing:.16em; text-shadow:0 0 22px rgba(255,207,74,.24); }
.qr-code { width:148px; height:148px; margin:0 auto; padding:8px; display:grid; place-items:center; background:white; border-radius:12px; }
.qr-code:empty { background:rgba(255,255,255,.08); }
.qr-code svg { width:100%; height:100%; display:block; }
.share-screen { width:100%; min-height:38px; margin-top:10px; border:1px solid rgba(117,167,255,.45); border-radius:10px; color:#dce6ff; background:rgba(117,167,255,.12); font-size:12px; font-weight:900; cursor:pointer; }
.share-screen:disabled { opacity:.4; }
.screen-count { margin:7px 0 0!important; color:#8fa8ba!important; }
.display-mode #startButton,.display-mode #pauseButton,.display-mode #endButton { display:none; }
.display-mode .setup-panel { display:none; }
.display-mode .back { opacity:.72; }
.panel-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.panel-heading h2 { margin:0; font-size:20px; }
.panel-heading span { color:var(--muted); font-size:12px; }
.roster { max-height:275px; margin:12px 0 0; padding:0; list-style:none; overflow:auto; }
.roster li { min-height:38px; display:flex; align-items:center; gap:9px; padding:7px 2px; border-top:1px solid rgba(255,255,255,.07); }
.roster .dot { width:12px; height:12px; flex:0 0 auto; border-radius:50%; box-shadow:0 0 12px currentColor; }
.roster strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.roster .score { margin-left:auto; color:var(--gold); font-weight:900; }
.roster .queued,.roster .offline { color:var(--muted); font-size:11px; }
.setup-panel { padding:12px 14px; border:1px solid var(--line); border-radius:16px; background:rgba(10,36,49,.9); }
.setup-panel summary { cursor:pointer; font-weight:900; }
.setup-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
.setup-panel label { color:var(--muted); font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.setup-panel select { width:100%; min-height:34px; margin-top:3px; padding:4px 6px; border:1px solid rgba(255,255,255,.15); border-radius:8px; color:var(--ink); background:#102f3e; }
.mode-help { margin:7px 0 0; color:var(--muted); font-size:10px; line-height:1.35; }
.accessibility-toggle { display:flex; align-items:center; gap:7px; margin-top:9px; text-transform:none!important; letter-spacing:0!important; }
.accessibility-toggle input { accent-color:var(--mint); }
#quickStartButton { width:100%; min-height:34px; margin-top:8px; border:1px solid rgba(49,230,193,.35); border-radius:9px; color:var(--mint); background:rgba(49,230,193,.08); font-weight:900; }
.host-actions { display:grid; gap:9px; }
.host-actions button { min-height:46px; border:1px solid rgba(255,255,255,.13); border-radius:12px; color:var(--ink); background:rgba(255,255,255,.07); font-weight:900; cursor:pointer; }
.host-actions button.primary { color:#06211c; background:var(--mint); border:0; }
.host-actions button.danger { color:#ffb0bc; border-color:rgba(255,107,138,.28); }
.host-actions button:disabled { opacity:.4; cursor:not-allowed; }
.error { min-height:18px; margin:0; color:#ff9aaa; font-size:13px; }
@media (max-width:1000px) { .game-layout { grid-template-columns:1fr; } .host-panel { display:grid; grid-template-columns:1fr 1fr; } .host-actions,.error { grid-column:1/-1; } .roster { max-height:200px; } }
@media (max-width:620px) { .host-header { align-items:start; flex-direction:column; } .game-layout { gap:12px; } .host-panel { grid-template-columns:1fr; } .host-actions,.error { grid-column:auto; } .stage-wrap { border-radius:15px; } }
@media (min-width:1001px) and (max-height:820px) {
  .host-shell { padding-top:64px; padding-bottom:14px; }
  .host-header { margin-bottom:10px; }
  .host-header h1 { font-size:54px; }
  .join-panel,.roster-panel,.host-actions { padding:11px 14px; border-radius:16px; }
  .room-code { font-size:48px; }
  .join-panel > p:last-of-type { margin-bottom:7px; }
  .qr-code { width:104px; height:104px; padding:5px; }
  .roster { max-height:108px; margin-top:6px; }
  .roster li { min-height:31px; padding:4px 2px; }
  .host-actions { gap:6px; }
  .host-actions button { min-height:38px; }
  .setup-panel { padding:8px 11px; }
  .setup-grid { margin-top:7px; gap:5px; }
  .setup-panel select { min-height:29px; }
  .accessibility-toggle,#quickStartButton { margin-top:5px; }
}
@media (prefers-reduced-motion:reduce) { * { animation:none!important; transition:none!important; } }
