:root{
  --bg: #000;                /* fundo preto */
  --topbar: #0ea5e9;         /* barra azul */
  --panel: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.12);
  --text: #e5e7eb;
  --muted:#9ca3af;
  --accent:#10b981;

  /* tamanhos cartas (ajusto nos breakpoints) */
  --card-w: 200px;   --card-h: 300px;   /* 5 cartas abertas */
  --card-sm-w: 60px; --card-sm-h: 90px; /* grade 47 */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg); color:var(--text);
}

.topbar{
  position:sticky; top:0; z-index:10;
  background:var(--topbar); border-bottom:1px solid rgba(0,0,0,.25);
}
.topbar .inner{
  max-width:1200px; margin:0 auto; padding:10px 16px;
  display:flex; align-items:center; gap:12px;
}
.topbar .logo img{ height:42px; display:block }

.wrap{max-width:1200px; margin:14px auto 32px; padding:0 12px; display:flex; flex-direction:column; gap:12px}

/* painéis */
.panel{
  background:var(--panel); border:1px solid var(--border);
  border-radius:14px; padding:12px;
}

/* KPIs topo */
.kpis{display:grid; gap:10px; grid-template-columns:repeat(4,1fr)}
.kpi{background:rgba(255,255,255,.04); border:1px solid var(--border); border-radius:12px; padding:10px; text-align:center}
.kpi small{display:block; color:var(--muted); margin-bottom:4px}
.kpi strong{font-variant-numeric:tabular-nums; letter-spacing:.3px}

/* paytable */
.section-title{margin:0 0 8px 0; font-weight:700}
.paytable{display:grid; gap:8px}
.pay-row{
  display:flex; justify-content:space-between; align-items:center;
  background:rgba(255,255,255,.04); border:1px solid var(--border);
  border-radius:10px; padding:8px 10px;
}

/* grade 47 cartas */
.deck{overflow:auto}
.grid47{
  display:grid; grid-template-columns:repeat(13, var(--card-sm-w)); gap:6px;
  width:max-content; margin:auto;
}
.cardwrap{ position:relative; width:var(--card-w); height:var(--card-h); }
.cardwrap.sm{ width:var(--card-sm-w); height:var(--card-sm-h); }
.cardimg{
  position:absolute; inset:0; border-radius:10px; background-size:cover; background-position:center;
  border:1px solid rgba(255,255,255,.14); box-shadow:0 6px 20px rgba(0,0,0,.35);
}
.idx{ position:absolute; top:4px; right:6px; font-size:11px; background:rgba(0,0,0,.45); color:#fff; padding:2px 6px; border-radius:6px }

/* mensagem */
.msgbar{ background:#fff7ed; color:#7c2d12; border:1px solid #fed7aa; border-radius:10px; padding:10px }

/* mão 5 cartas */
.grid5{ display:grid; grid-template-columns:repeat(5, 1fr); gap:12px; justify-content:center }
.cardlabel{ position:absolute; left:8px; bottom:8px; background:rgba(0,0,0,.55); color:#fff; padding:2px 6px; border-radius:6px; font-size:13px }

/* ações */
.actions{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap }
.btn{
  padding:12px 18px; border:none; border-radius:12px; cursor:pointer; font-weight:700;
  background:var(--accent); color:#062e24; box-shadow:0 4px 14px rgba(16,185,129,.35)
}
.btn.secondary{ background:#38bdf8; color:#083344; box-shadow:0 4px 14px rgba(56,189,248,.3) }
.btn.warn{ background:#f59e0b; color:#3b0b04; box-shadow:0 4px 14px rgba(245,158,11,.3) }

/* breakpoints */
@media (max-width:900px){
  :root{ --card-w:170px; --card-h:255px; }
}
@media (max-width:700px){
  :root{ --card-w:140px; --card-h:210px; --card-sm-w:48px; --card-sm-h:72px; }
  .kpis{ grid-template-columns:repeat(2,1fr) }
}
@media (max-width:420px){
  :root{ --card-w:120px; --card-h:180px; --card-sm-w:42px; --card-sm-h:63px; }
  .kpis{ grid-template-columns:1fr }
}
