/* Arcade da casa — visual comum a todos os jogos e às duas telas. */
:root {
  --bg:#0b0e17; --bg2:#121728; --panel:#182036; --line:#2a3350; --txt:#f3f4f6; --mut:#9aa6c0;
  --acc:#f59e0b; --ok:#16a34a; --no:#dc2626; --info:#2563eb;
  --r:18px;
}
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { margin:0; background:var(--bg); color:var(--txt); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; }
body { background:radial-gradient(1200px 700px at 20% -10%, #1b2440 0%, var(--bg) 60%); }
h1,h2,h3 { margin:0; letter-spacing:-.5px; }
p { margin:0; }
.sub { color:#cbd5e1; font-size:17px; line-height:1.4; }
.mut { color:var(--mut); }
.center { text-align:center; }
.box { background:var(--panel); border:1px solid var(--line); border-radius:var(--r); padding:16px; }
.box.hi { border-color:#fff; }
.box.warn { border-color:var(--acc); background:#3b2f00; }
.box.info { border-color:var(--info); }
.row { display:flex; gap:10px; }
.row > * { flex:1; }

/* botões */
.btn { width:100%; border:0; border-radius:16px; padding:20px; font-size:22px; font-weight:800; color:#fff; background:#334155; cursor:pointer; transition:transform .08s; font-family:inherit; }
.btn:active { transform:scale(.98); }
.btn:disabled { opacity:.35; }
.btn.big { padding:26px; font-size:26px; }
.btn.ok { background:var(--ok); } .btn.no { background:var(--no); }
.btn.warn { background:var(--acc); color:#111; } .btn.blue { background:var(--info); }
.btn.ghost { background:transparent; border:1px solid var(--line); color:#e5e7eb; font-weight:700; padding:16px; font-size:18px; }

input { width:100%; padding:16px; border-radius:14px; border:1px solid var(--line); background:#0b0e17; color:#fff; font-size:20px; font-family:inherit; }

/* jogadores */
.dot { width:20px; height:20px; border-radius:50%; border:2px solid #fff; box-shadow:0 0 0 1px #0006; display:inline-block; flex:none; }
.nm { font-weight:900; padding:2px 10px; border-radius:9px; white-space:nowrap; display:inline-block; }
.players { display:flex; flex-direction:column; gap:8px; }
.pl { display:flex; align-items:center; gap:10px; padding:12px; border-radius:12px; background:#0b0e17; border:2px solid transparent; font-size:19px; }
.pl b { flex:1; font-weight:700; }
.pl span { color:#cbd5e1; font-size:15px; font-variant-numeric:tabular-nums; }
.pl.me { background:#1a2340; }
.kick { color:#ef4444; font-weight:900; padding:0 8px; font-size:24px; cursor:pointer; }

/* cronômetro */
.timer { font-size:34px; font-weight:900; font-variant-numeric:tabular-nums; text-align:center; line-height:1; }
.timer.low { color:#ef4444; animation:pulse .5s infinite alternate; }
@keyframes pulse { to { transform:scale(1.06); } }
.tbar { height:8px; border-radius:99px; background:#0b0e17; overflow:hidden; margin-top:8px; }
.tbar i { display:block; height:100%; background:var(--ok); transition:width .4s linear; }

/* biblioteca de jogos (estilo prateleira) */
.shelf { display:grid; gap:16px; }
.card { position:relative; border-radius:20px; overflow:hidden; cursor:pointer; border:3px solid transparent; transition:transform .15s, border-color .15s; min-height:150px; display:flex; flex-direction:column; justify-content:flex-end; padding:18px; text-align:left; }
.card:active { transform:scale(.98); }
.card.sel { border-color:#fff; transform:scale(1.02); }
.card .art { position:absolute; inset:0; opacity:.95; }
.card .emoji { position:absolute; right:-6px; top:-14px; font-size:96px; opacity:.28; line-height:1; }
.card .t { position:relative; font-size:26px; font-weight:900; color:#fff; text-shadow:0 2px 8px #0008; }
.card .d { position:relative; font-size:15px; color:#ffffffdd; margin-top:4px; text-shadow:0 2px 6px #0008; }
.card .n { position:relative; font-size:14px; color:#ffffffcc; margin-top:8px; font-weight:700; }
.card.off { opacity:.45; cursor:default; }

/* avisos e transições */
.toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:var(--no); color:#fff; padding:14px 20px; border-radius:14px; font-weight:800; opacity:0; transition:.3s; pointer-events:none; max-width:90vw; text-align:center; z-index:70; }
.toast.show { opacity:1; }
.conn { position:fixed; top:4px; right:8px; font-size:13px; color:var(--mut); z-index:5; }
.conn.off { color:#ef4444; font-weight:700; }
.turnover { position:fixed; inset:0; z-index:60; background:#070a12ee; backdrop-filter:blur(6px); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:22px; padding:24px; text-align:center; animation:fade .25s; }
.turnover .round { font-size:20px; font-weight:900; color:var(--mut); letter-spacing:3px; text-transform:uppercase; }
.turnover small { display:block; font-size:17px; color:var(--mut); font-weight:800; letter-spacing:1px; margin-bottom:10px; }
.turnover .who2 { display:inline-block; padding:14px 30px; border-radius:20px; font-size:44px; font-weight:900; }
.turnover .who2.sm { font-size:32px; padding:10px 22px; }
.turnover .mine { font-size:22px; font-weight:900; color:#22c55e; }
@keyframes fade { from { opacity:0; } }
.big-emoji { font-size:72px; text-align:center; line-height:1; }
.badge { display:inline-block; padding:8px 18px; border-radius:99px; font-weight:900; font-size:19px; }

/* ---------- telefone ---------- */
body.phone { font-size:18px; }
body.phone #app { max-width:560px; margin:0 auto; padding:14px 14px 46px; display:flex; flex-direction:column; gap:12px; min-height:100vh; }
body.phone .colors { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
body.phone .color { aspect-ratio:1; border-radius:14px; display:flex; flex-direction:column; align-items:center; justify-content:center; font-weight:900; color:#111; border:4px solid transparent; font-size:14px; }
body.phone .color.sel { border-color:#fff; box-shadow:0 0 0 3px #0008; }
body.phone .color.dk { color:#fff; }
body.phone .shelf { grid-template-columns:1fr; }
body.phone .head { display:flex; align-items:center; justify-content:space-between; gap:10px; }

/* ---------- TV ---------- */
body.tv { overflow:hidden; height:100%; }
body.tv #tv { display:grid; grid-template-columns:1fr 460px; gap:20px; height:100vh; padding:20px; }
body.tv .stage { position:relative; display:flex; align-items:center; justify-content:center; min-width:0; }
body.tv .side { display:flex; flex-direction:column; gap:12px; min-height:0; overflow:hidden; }
body.tv .side .sub { font-size:15px; }
body.tv .pl { font-size:17px; padding:9px 12px; }
body.tv .shelf { grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); width:100%; align-content:center; gap:22px; }
body.tv .card { min-height:min(46vh,340px); padding:26px; }
body.tv .card .emoji { font-size:150px; right:-10px; top:-24px; }
body.tv .card .t { font-size:38px; }
body.tv .card .d { font-size:17px; }
body.tv .logo { font-size:44px; font-weight:900; letter-spacing:-1.5px; }
body.tv .logo span { color:var(--acc); }
body.tv .qrbox { background:#fff; padding:8px; border-radius:14px; width:190px; }
body.tv .qrbox svg { display:block; width:100%; height:auto; }
body.tv .url { font-size:22px; font-weight:800; word-break:break-all; }
body.tv .event { font-size:17px; text-align:center; color:#fff; line-height:1.35; min-height:36px; }

/* TV em telas estreitas (notebook, monitor em pé): empilha o palco e o painel */
@media (max-width: 1100px) {
  body.tv #tv { grid-template-columns:1fr; grid-template-rows:1fr auto; overflow:auto; }
  body.tv .side { max-height:46vh; overflow:auto; }
  body.tv .shelf { grid-template-columns:1fr; }
  body.tv .card { min-height:150px; }
}

/* sala */
body.tv .roomcode { font-size:54px; font-weight:900; letter-spacing:8px; line-height:1; color:var(--acc); }
body.phone input.code { text-align:center; font-size:34px; font-weight:900; letter-spacing:10px; text-transform:uppercase; }
body.tv .qrs { display:flex; gap:14px; justify-content:center; }
body.tv .qrs > div { flex:1 1 0; min-width:0; max-width:210px; text-align:center; }
body.tv .qrs .qrbox { width:auto; }
body.tv .qrs .url { font-size:14px; opacity:.8; }
body.tv .qrlabel { font-size:16px; font-weight:800; margin:8px 0 2px; }
