/* Gamezi — plataforma de jogos. Mesmas cores e fonte do Topzi: vermelho, preto e creme. Ver brand.html */
:root {
  --accent: #FF4D3D; --accent-ink: #D93A2B; --accent-soft: #FFE1D4; --on-accent: #171717;
  --bg: #FFF4DE; --surface: #F7E7C8; --fg: #171717; --muted: #6B6151; --line: #E8D5B0;
  --r: 16px;
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-ink: #FF6B5D; --accent-soft: #3B1F1A;
    --bg: #171717; --surface: #232120; --fg: #FFF4DE; --muted: #B5AA93; --line: #38342F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent-ink: #FF6B5D; --accent-soft: #3B1F1A;
  --bg: #171717; --surface: #232120; --fg: #FFF4DE; --muted: #B5AA93; --line: #38342F;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Nada passa da largura da tela no celular (nem animação de entrada), senão o navegador afasta o zoom. */
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); line-height: 1.45; min-height: 100vh; transition: background-color .25s, color .25s; }
a { color: inherit; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* marca nos dois temas */
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }

/* topo */
.top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 0; }
.top .logo { height: 32px; width: auto; display: block; }
.top-actions { display: flex; gap: 6px; align-items: center; }
.lang-select {
  appearance: none; font: inherit; font-weight: 700; font-size: .85rem; color: var(--fg);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: .45rem .8rem; min-height: 40px; cursor: pointer;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer;
  color: var(--fg); background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
}
.icon-btn svg { width: 20px; height: 20px; }
.lang-select:hover, .icon-btn:hover { border-color: var(--fg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* início: uma coluna, uma frase e uma linha por jogo (no jeito do Contexto) */
.portal { max-width: 460px; margin: 0 auto; padding: 18px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.portal-tag { margin: 0 0 6px; text-align: center; font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.game-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; text-decoration: none;
  background: var(--surface); border: 2px solid transparent; border-radius: 20px; transition: border-color .15s;
}
.game-row:hover { border-color: var(--accent); }
.game-icon { width: 64px; height: 64px; flex: none; border-radius: 16px; background: var(--bg); display: grid; place-items: center; }
.game-icon img { width: 44px; height: auto; }
.game-icon img[src*="patozi"] { width: 50px; }
.game-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.game-text b { font-stretch: 75%; font-weight: 800; font-size: 1.6rem; line-height: 1.05; }
.game-text small { color: var(--muted); font-size: .88rem; }
.game-text .game-daily { color: var(--accent-ink); font-weight: 700; font-size: .78rem; }
.play { flex: none; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 11px 22px; font-weight: 700; }
@media (max-width: 380px) {
  .game-row { gap: 10px; padding: 10px; }
  .game-icon { width: 52px; height: 52px; border-radius: 14px; }
  .game-icon img { width: 36px; }
  .game-icon img[src*="patozi"] { width: 40px; }
  .play { padding: 10px 16px; }
}
.game-row:hover .play { filter: brightness(1.08); }
.soon { margin: 4px 0 0; text-align: center; color: var(--muted); font-size: .9rem; }
.portal-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; font-weight: 700; font-size: .95rem; }
.portal-links label { display: flex; align-items: center; gap: 8px; }
.theme-link { display: inline-flex; align-items: center; gap: 6px; font: inherit; color: var(--fg); background: none; border: 0; padding: 6px 0; cursor: pointer; }
.theme-link svg { width: 18px; height: 18px; }

/* como funciona */
.points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 720px) { .points { grid-template-columns: 1fr; } }
.points li { background: var(--surface); border-radius: var(--r); padding: 18px; }
.points b { display: block; font-stretch: 75%; font-weight: 800; font-size: 1.5rem; line-height: 1; margin-bottom: 8px; color: var(--accent-ink); }
.points p { margin: 0; font-size: .95rem; }

/* rodapé */
.foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 20px; margin: 28px 0 0; padding: 12px 0 32px; font-size: .78rem; }
.foot a { color: var(--muted); font-weight: 600; text-underline-offset: 3px; }
.foot a:hover { color: var(--fg); }
.foot span { color: var(--muted); }
@media (max-width: 480px) { .top .logo { height: 27px; } }

/* conta Gamezi: botão no topo do portal e página conta.html */
:root { --good: #1F8A4C; }
:root[data-theme="dark"] { --good: #5BD68F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --good: #5BD68F; } }
.account-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: .45rem .95rem .45rem .7rem;
  border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 700; font-size: .85rem; text-decoration: none; white-space: nowrap;
}
.account-chip svg { width: 18px; height: 18px; flex: none; }
.account-chip.on { background: var(--surface); color: var(--fg); border: 1.5px solid var(--line); }
.account-chip:hover { filter: brightness(1.1); }
.account-chip.on:hover { border-color: var(--fg); filter: none; }
@media (max-width: 359px) { .account-chip { padding: 0; width: 40px; justify-content: center; } .account-chip span { display: none; } }

.account-page { max-width: 560px; margin: 0 auto; padding: 12px 0 0; display: grid; gap: 14px; }
.account-page .points { grid-template-columns: 1fr; }
.back-link { justify-self: start; color: var(--muted); font-weight: 700; text-underline-offset: 3px; }
.back-link::before { content: "← "; }
.back-link:hover { color: var(--fg); }
.panel { background: var(--surface); border-radius: 22px; padding: 24px; }
.panel h1 { margin: 0 0 10px; font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; line-height: .95; font-size: clamp(2.3rem, 10vw, 3.4rem); }
.panel > p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.panel #status b { color: var(--fg); }
.field { display: grid; gap: 6px; margin: 0 0 12px; font-weight: 700; font-size: .9rem; }
.field input {
  width: 100%; min-height: 48px; padding: .7rem .9rem; font: inherit; font-size: 1rem; font-weight: 500;
  color: var(--fg); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 96px; }
.pass-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 12px;
  font: inherit; font-size: .85rem; font-weight: 700; color: var(--fg); background: var(--surface); border: 0; border-radius: 999px; cursor: pointer;
}
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.btn {
  min-height: 48px; padding: 12px 28px; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  color: var(--on-accent); background: var(--accent); border: 1.5px solid var(--accent); border-radius: 999px;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { color: var(--fg); background: transparent; border-color: var(--fg); }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.link-btn { margin-top: 10px; padding: 6px 0; font: inherit; font-weight: 600; color: var(--muted); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--fg); }
.feedback { margin: 12px 0 0; font-weight: 600; }
.feedback:empty { display: none; }
.feedback.good { color: var(--good); }
.feedback.bad { color: var(--accent-ink); }
.my-games { display: grid; gap: 8px; margin: 0 0 16px; }
.my-game { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg); border: 2px solid transparent; border-radius: 16px; text-decoration: none; }
.my-game:hover { border-color: var(--accent); }
.my-game .game-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); }
.my-game .game-icon img { width: 34px; }
.my-game b { display: block; line-height: 1.2; }
.my-game small { color: var(--muted); font-size: .88rem; }
.my-game-play { margin-left: auto; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .9rem; }

/* nível e conquistas (portal e conta) */
.portal-level { justify-self: center; margin: -4px 0 4px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: .85rem; text-decoration: none; }
.level-panel { display: grid; gap: 10px; }
.level-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.level-head b { font-stretch: 75%; font-weight: 800; font-size: 2rem; line-height: 1; }
.level-head span { color: var(--muted); font-size: .88rem; font-weight: 600; }
.level-bar { height: 12px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.level-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.badges-title { margin: 8px 0 0; font-stretch: 75%; font-weight: 800; font-size: 1.4rem; }
.badges-title small { color: var(--muted); font-size: .9rem; font-stretch: 100%; font-weight: 600; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.badge { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border-radius: 14px; background: var(--bg); opacity: .6; }
.badge b { font-size: .92rem; line-height: 1.2; }
.badge span { font-size: .78rem; color: var(--muted); line-height: 1.25; }
.badge small { font-size: .7rem; font-weight: 700; color: var(--accent-ink); }
.badge.done { opacity: 1; box-shadow: inset 0 0 0 2px var(--accent); }
.badge.done b::before { content: "★ "; color: var(--accent); }


/* ranking do dia (portal e ranking.html; as linhas vêm de gamezi-ranking.js) */
.portal-rank { justify-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--accent); color: var(--fg); font-weight: 700; text-decoration: none; }
.portal-rank:hover { background: var(--accent-soft); }
.portal-rank svg { width: 20px; height: 20px; color: var(--accent-ink); }
.rank-page .panel > p { margin-bottom: 14px; }
.rank-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.rank-tab { font: inherit; font-weight: 700; font-size: .9rem; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
.rank-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rank-head b { display: block; font-stretch: 75%; font-weight: 800; font-size: 1.8rem; line-height: 1; }
.rank-head small { color: var(--muted); font-size: .85rem; }
.rank-head .btn { text-decoration: none; min-height: 0; padding: 10px 20px; }
.rank-box .leaderboard { margin: 16px 0 0; }
.leaderboard h3 { margin: 0 0 10px; }
.lb-pos { margin: 0 0 10px; font-weight: 800; font-size: 1.1rem; color: var(--accent-ink); }
.lb-row { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; }
.lb-row:nth-child(odd) { background: var(--bg); }
.lb-row.me { box-shadow: inset 0 0 0 2px var(--accent); }
.lb-row span { font-stretch: 75%; font-weight: 800; font-size: 1.2rem; color: var(--muted); text-align: center; }
.lb-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row em { font-style: normal; font-stretch: 75%; font-weight: 800; font-size: 1.3rem; color: var(--accent-ink); }
.lb-time { font-style: normal; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-note { margin: 8px 0 0; text-align: center; font-size: .85rem; }
.small { font-size: .85rem; }
