/* Plataforma Games — componentes do site (formularios, carteira, tabelas, pagina de jogo). Usa as variaveis do lobby.css */

body.bare { display: grid; place-items: center; min-height: 100vh; background: var(--ink); color: var(--ivory); font-family: var(--font-body); }
.err-page { text-align: center; padding: 40px 20px; }
.err-code { font-family: var(--font-display); font-size: 84px; font-weight: 700; color: var(--orange); margin: 0; line-height: 1; }
.err-page h1 { font-family: var(--font-display); margin: 8px 0 12px; }
.err-page .btn { margin-top: 18px; }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.muted { color: var(--steel); font-size: 13px; }
.pos { color: #4ade80; } .neg { color: #f87171; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* mensagens */
.flash { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel); font-size: 14px; }
.flash-ok { border-color: rgba(74, 222, 128, .5); color: #bbf7d0; background: rgba(74, 222, 128, .08); }
.flash-err { border-color: rgba(248, 113, 113, .5); color: #fecaca; background: rgba(248, 113, 113, .08); }
.demo-banner { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; background: var(--orange-dim); border: 1px dashed rgba(255, 106, 0, .5); color: var(--orange-bright); font-size: 13px; }
.demo-banner .ico { width: 16px; height: 16px; flex: none; }

/* formularios */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--steel); font-weight: 500; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=tel], .form input[type=number], .form select, .form textarea, .pix-code {
  background: var(--ink); border: 1px solid var(--line-strong); color: var(--ivory); border-radius: 9px; padding: 11px 12px;
  font: 500 14px var(--font-body); width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-dim); }
.form .check { flex-direction: row; align-items: flex-start; gap: 8px; color: var(--ivory); font-weight: 400; line-height: 1.45; }
.form .check input { margin-top: 3px; accent-color: var(--orange); flex: none; }
.form .check > span { flex: 1; min-width: 0; }
.form .check a { display: inline; color: var(--orange-bright); text-underline-offset: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-danger { background: transparent; border: 1px solid rgba(248, 113, 113, .5); color: #fca5a5; }
.btn-danger:hover { background: rgba(248, 113, 113, .12); }

.auth-card { max-width: 440px; margin: 10px auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-family: var(--font-display); font-size: 30px; margin: 0; }
.auth-card h1 b, .page-head h1 b { color: var(--orange); }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); margin: 0; }
.auth-alt { text-align: center; font-size: 13px; color: var(--steel); margin: 0; }
.auth-alt a { color: var(--orange-bright); }

/* paginas */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-size: 30px; margin: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--gap); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel h2 { font-family: var(--font-display); font-size: 20px; margin: 0; }
.panel > p { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }
.stat-val { font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.stat-sub { font-size: 12px; color: var(--steel); }
.bar { height: 6px; background: var(--ink); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--orange-deep), var(--orange)); border-radius: 99px; }

.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--ink); border: 1px solid var(--line-strong); color: var(--ivory); border-radius: 99px; padding: 6px 14px; font: 600 13px var(--font-body); cursor: pointer; }
.chip:hover, .chip.is-active { border-color: var(--orange); color: var(--orange-bright); }

.pix-box { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.pix-head { display: flex; gap: 10px; align-items: center; }
.pix-qr { display: flex; justify-content: center; background: #fff; border-radius: 12px; padding: 12px; }
.pix-qr[hidden] { display: none; }
.pix-qr img { display: block; width: 220px; height: 220px; image-rendering: pixelated; }
.pix-qr-cap { margin: 0; text-align: center; font-size: 13px; color: var(--steel); }
.pix-code { font-family: var(--font-mono); font-size: 11px; resize: none; }

.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; border: 1px solid var(--line-strong); color: var(--steel); }
.badge.ok { color: #86efac; border-color: rgba(74, 222, 128, .4); background: rgba(74, 222, 128, .08); }
.badge.bad { color: #fca5a5; border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .08); }
.badge.warn { color: #fcd34d; border-color: rgba(252, 211, 77, .4); background: rgba(252, 211, 77, .08); }
.badge.mute { color: var(--steel); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; font-size: 13px; color: var(--steel); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--steel); } .kv dd { margin: 0; }

/* lobby: card de jogo com meta */
.game-card .goal { position: absolute; right: 10px; top: 10px; z-index: 2; background: rgba(10, 10, 13, .82); border: 1px solid var(--orange); color: var(--orange-bright); font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; }
.game-card.is-soon { opacity: .55; pointer-events: none; filter: grayscale(.4); }

/* pagina de jogo */
.play-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; }
.stage { position: relative; background: #000; border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; aspect-ratio: 9 / 14; max-height: 78vh; width: 100%; margin: 0 auto; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.stage-veil { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 10, 13, .88); z-index: 3; text-align: center; padding: 20px; }
.stage-veil[hidden] { display: none; }
.stage-veil h2 { font-family: var(--font-display); font-size: 28px; margin: 0 0 8px; }
.stage-veil p { color: var(--steel); margin: 0 0 14px; }
.stage-veil .result-win { color: #4ade80; } .stage-veil .result-loss { color: #f87171; }
.stage-veil .veil-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stage-veil .veil-actions .btn { min-width: 200px; justify-content: center; }
.hud { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--bar-h) + 16px); }
.hud h1 { font-family: var(--font-display); font-size: 26px; margin: 0; }
.hud-goal { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hud-goal b { font-family: var(--font-display); font-size: 28px; color: var(--orange-bright); }
.stake-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stake-row .chip.is-active { background: var(--orange-dim); }
.progress { height: 14px; border-radius: 99px; background: var(--ink); border: 1px solid var(--line-strong); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange-deep), var(--orange), #ffd166); transition: width .25s ease; }
.hud-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--steel); }
.hud-line b { color: var(--ivory); font-variant-numeric: tabular-nums; }
.events-list { max-height: 180px; overflow: auto; font-size: 12.5px; color: var(--steel); margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.events-list li { display: flex; justify-content: space-between; gap: 8px; }
.combo-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.combo-table td { padding: 3px 0; color: var(--steel); }
.combo-table td:last-child { text-align: right; color: var(--ivory); font-variant-numeric: tabular-nums; }
details.combos summary { cursor: pointer; font-size: 13px; color: var(--orange-bright); }
.toast-fx { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 12px); background: #1c1d24; color: #f3f1ea; border: 1px solid rgba(255, 106, 0, .5); border-radius: 10px; padding: 10px 16px; font-size: 13px; z-index: 90; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: min(360px, 88vw); text-align: center; }
.toast-fx.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) {
  .play-wrap { grid-template-columns: 1fr; }
  .hud { position: static; order: -1; }
  .stage { aspect-ratio: 9 / 15; max-height: 70vh; }
  .grid2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { overflow-wrap: anywhere; margin-bottom: 8px; }
  .auth-card { padding: 20px 16px; }
  .page-head h1, .auth-card h1 { font-size: 26px; }
}

/* Partida no celular: o jogo ocupa o que sobra, o placar fica compacto. */
@media (max-width: 900px) {
  body.is-play { height: 100dvh; overflow: hidden; }
  body.is-play .shell { height: 100dvh; min-height: 0; }
  body.is-play .content-col { height: 100dvh; min-height: 0; }
  body.is-play .site-footer { display: none; }
  body.is-play .content-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    gap: 8px;
    padding: 8px 8px calc(70px + env(safe-area-inset-bottom));
  }
  body.is-play .demo-banner { display: none; }
  body.is-play .play-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  body.is-play .hud { flex: none; padding: 8px 10px; gap: 6px; }
  body.is-play .hud h1 { font-size: 20px; }
  body.is-play .hud .eyebrow { display: none; }
  body.is-play .hud-goal b { font-size: 20px; }
  body.is-play .hud > .hud-line,
  body.is-play .hud > div:first-child .muted,
  body.is-play .hud > p.muted,
  body.is-play .events-list { display: none; }
  body.is-play .hud .btn { padding: 8px 12px; }
  body.is-play .stake-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  body.is-play .stake-row .chip { flex: none; min-height: 40px; }
  body.is-play .stage {
    flex: 1;
    min-height: 0;
    width: 100%;
    aspect-ratio: auto;
    max-height: none;
    height: auto;
  }
}
