/* Mini-jogos: catálogo e página do jogo. Usa o kit de ui.css (panel, chip, progress, list, badge)
   e os tokens de theme.css, então segue o claro e o escuro do site. */

/* ------------------------------ catálogo ------------------------------ */
.games-hero { position: relative; display: grid; gap: 18px; padding: 24px 22px; margin-bottom: 20px; border-radius: 22px; overflow: hidden; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, hsl(300 70% 48% / .85), transparent 55%), radial-gradient(90% 120% at 0% 100%, hsl(200 80% 45% / .8), transparent 60%), linear-gradient(135deg, #2b1d6e, #5b2a9b); box-shadow: var(--shadow-lg, 0 16px 40px rgba(20, 10, 60, .35)); }
.games-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: radial-gradient(rgba(255,255,255,.22) 1.2px, transparent 1.4px); background-size: 22px 22px; mask-image: linear-gradient(120deg, transparent 30%, #000); -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000); }
.games-hero > * { position: relative; z-index: 1; min-width: 0; }
.games-hero-kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: .78rem; font-weight: 800; letter-spacing: 0; text-transform: none; }
.games-hero-kicker .icon { width: 16px; height: 16px; }
.games-hero-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 5.5vw, 2.3rem); line-height: 1.1; overflow-wrap: anywhere; }
.games-hero-sub { margin: 8px 0 0; max-width: 52ch; color: rgba(255,255,255,.86); line-height: 1.5; }
.games-hero-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.games-hero-actions .btn { background: #fff; color: #2b1d6e; border-color: transparent; }
.games-hero-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; }
.games-hero-stats li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.22); }
.games-hero-stats strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.games-hero-stats span { font-size: .78rem; color: rgba(255,255,255,.8); }
@media (min-width: 820px) {
  .games-hero { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; padding: 30px 32px; }
  .games-hero-stats { grid-template-columns: 1fr; }
  .games-hero-stats li { grid-template-columns: auto 1fr; align-items: baseline; gap: 10px; }
}

.games-filter { display: flex; gap: 8px; margin: 0 0 20px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.games-filter::-webkit-scrollbar { display: none; }
.games-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 700; font-size: .92rem; text-decoration: none; }
.games-tab:hover { border-color: var(--accent); }
.games-tab .count { padding: 1px 8px; border-radius: 999px; background: var(--surface-3); font-size: .78rem; font-variant-numeric: tabular-nums; }
.games-tab.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast, #fff); }
.games-tab.is-active .count { background: rgba(255,255,255,.22); color: inherit; }

.games-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.gh-0 { --gh: 262; } .gh-1 { --gh: 200; } .gh-2 { --gh: 330; } .gh-3 { --gh: 150; }
.gh-4 { --gh: 28; }  .gh-5 { --gh: 290; } .gh-6 { --gh: 175; } .gh-7 { --gh: 8; }
.game-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.game-card:hover { transform: translateY(-3px); border-color: hsl(var(--gh) 70% 60% / .7); box-shadow: 0 14px 30px hsl(var(--gh) 70% 40% / .22); }
.game-cover { position: relative; display: grid; place-items: center; height: 118px; text-decoration: none; color: #fff; overflow: hidden;
  background: radial-gradient(80% 120% at 85% 0%, hsl(calc(var(--gh) + 50) 85% 62% / .9), transparent 60%), linear-gradient(135deg, hsl(var(--gh) 72% 40%), hsl(calc(var(--gh) + 35) 70% 28%)); }
.game-cover::before { content: ""; position: absolute; inset: 0; opacity: .35; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.16) 0 2px, transparent 2px 14px); }
.game-cover-glyph { position: relative; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); box-shadow: 0 8px 20px rgba(0,0,0,.25); transition: transform .25s ease; }
.game-cover-glyph .icon { width: 32px; height: 32px; }
.game-card:hover .game-cover-glyph { transform: scale(1.08) rotate(-6deg); }
.game-cover-points { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.35); font-size: .78rem; font-weight: 800; }
.game-cover-points .icon { width: 14px; height: 14px; }
.game-card-body { flex: 1; display: grid; align-content: start; gap: 10px; padding: 16px 18px 6px; min-width: 0; }
.game-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.game-card-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.15; overflow-wrap: anywhere; }
.game-card-title a { color: inherit; text-decoration: none; }
.game-card-title a:hover { color: var(--accent-text); }
.game-card-text { margin: 0; color: var(--text-soft); font-size: .92rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.game-card-foot { padding: 12px 18px 18px; }
.game-card-foot .btn { width: 100%; justify-content: center; }

/* Partidas do dia (catálogo e página do jogo) */
.game-daily { display: grid; gap: 8px; }
.game-daily-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.game-daily-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0; }
.game-daily-count { font-size: .95rem; font-variant-numeric: tabular-nums; }

/* ------------------------------ página do jogo ------------------------------ */
.game-panel { display: block; }
.game-panel-head { align-items: flex-start; }
.game-panel-title { display: grid; gap: 4px; min-width: 0; }
.game-kicker { margin: 0; font-size: .8rem; font-weight: 700; color: var(--accent-text); text-transform: none; letter-spacing: 0; }
.game-panel-body { display: grid; gap: 18px; }
.game-rules { margin: 0; color: var(--text-soft); line-height: 1.55; }
.game-meta { margin: 0; font-size: .9rem; }
.game-meta:empty { display: none; }

.game-summary { display: grid; gap: 18px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.game-scoring { display: grid; gap: 8px; min-width: 0; }
.game-score-list .list-item { padding: 10px 0; gap: 12px; }
.game-score-list .list-item:first-child { padding-top: 4px; }
.game-score-item.is-off { opacity: .6; }
.game-score-item .list-sub { display: block; }
.game-score-item .list-amount { white-space: nowrap; }
@media (min-width: 760px) {
  .game-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
}

/* Área da rodada */
.game-board { display: grid; gap: 16px; min-height: 40px; }
.game-board:empty { display: none; }
.game-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.game-actions:empty { display: none; }
.game-panel.is-busy .game-board { opacity: .6; pointer-events: none; }

.game-status { min-height: 1.4em; font-weight: 700; line-height: 1.45; }
.game-status:empty { display: none; }
.game-status.is-ok { color: var(--success); }
.game-status.is-partial { color: var(--accent-text); }
.game-status.is-error { color: var(--danger); }

.game-hint { margin: 0; color: var(--text-soft); }
.game-result { margin: 0; font-weight: 700; }

/* Progresso da rodada */
.game-progress { display: grid; gap: 6px; }
.game-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .9rem; }
.game-progress-label { color: var(--text-soft); font-weight: 600; }
.game-progress-count { font-variant-numeric: tabular-nums; }

/* Quiz */
.game-quiz { display: grid; gap: 14px; }
.game-question { margin: 0; min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: grid; gap: 8px; }
.game-question-title { font-weight: 700; padding: 0; margin-bottom: 2px; line-height: 1.4; }
.game-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.game-option:hover { background: var(--hover); }
.game-option input { accent-color: var(--accent); }
.game-option-text { min-width: 0; overflow-wrap: anywhere; }
.game-option.is-correct { background: var(--ui-success-soft); border-color: var(--success); }
.game-option.is-wrong { background: var(--ui-danger-soft); border-color: var(--danger); text-decoration: line-through; }
.game-submit { align-self: flex-start; }

/* Adivinhe o número */
.game-guess { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.game-input { width: 140px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--ui-input-bg); color: var(--text); font: inherit; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.game-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.game-history { margin: 0; padding-left: 20px; color: var(--text-soft); display: grid; gap: 4px; }

/* Forca */
.game-word { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0; font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: 0; }
.game-letter { min-width: 1em; min-height: 1.2em; text-align: center; border-bottom: 3px solid var(--border-strong); padding: 0 4px; }
.game-keyboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.game-key { min-height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.game-key:hover:not(:disabled) { background: var(--hover); }
.game-key:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.game-key:disabled { opacity: .35; cursor: default; }
.game-key.is-used { text-decoration: line-through; }

/* Qual é o título? */
.game-overview { margin: 0; padding: 14px 18px; border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface-2); font-style: italic; line-height: 1.6; color: var(--text); }
.game-options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.game-choice { justify-content: center; text-align: center; white-space: normal; min-height: 52px; }
.game-choice.is-correct { background: var(--ui-success-soft); border-color: var(--success); color: var(--success); }

/* Ordem de lançamento */
.game-order { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.game-order-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); flex-wrap: wrap; }
.game-order-item.is-correct { border-color: var(--success); background: var(--ui-success-soft); }
.game-order-item.is-wrong { border-color: var(--danger); background: var(--ui-danger-soft); }
.game-order-pos { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; }
.game-order-title { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.game-move { min-height: 36px; padding: 0 12px; font-size: .85rem; }

@media (max-width: 600px) {
  .game-word { font-size: 1.5rem; gap: 8px; }
  .game-keyboard { grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); }
  .game-card-body { padding: 18px; }
  .game-actions .btn { width: 100%; justify-content: center; }
  .game-submit { align-self: stretch; width: 100%; justify-content: center; }
  .game-guess .btn { flex: 1; justify-content: center; }
  .game-input { width: 100%; }
}

/* ------------------------------ Memória de cinema ------------------------------ */
.game-memory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 420px; margin: 0 auto; }
.game-card-tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; min-width: 0; padding: 0; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: clamp(1.6rem, 7vw, 2.4rem); line-height: 1; cursor: pointer; }
.game-card-tile.is-hidden { background-color: var(--surface-3); background-image: repeating-linear-gradient(45deg, transparent 0 8px, var(--hover) 8px 16px); }
.game-card-tile.is-hidden:hover { border-color: var(--accent); }
.game-card-tile.is-open { background: var(--surface-2); border-color: var(--accent); }
.game-card-tile.is-matched { background: var(--ui-success-soft); border-color: var(--success); }
.game-card-tile:disabled { cursor: default; }
.game-card-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------ Jogo da velha ------------------------------ */
.game-ttt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 320px; margin: 0 auto; }
.game-ttt-cell { aspect-ratio: 1 / 1; min-width: 0; padding: 0; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-family: var(--font-display); font-size: clamp(2rem, 11vw, 3.2rem); font-weight: 800; line-height: 1; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.game-ttt-cell:not(:disabled):hover { border-color: var(--accent); transform: translateY(-1px); }
.game-ttt-cell:disabled { cursor: default; }
.game-ttt-cell.is-x { color: var(--accent-text); }
.game-ttt-cell.is-o { color: var(--text-soft); }
.game-ttt-cell.is-line { background: var(--accent-soft); border-color: var(--accent); }
.game-ttt-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------ Campo minado ------------------------------ */
.game-mines-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 8px; font-variant-numeric: tabular-nums; font-weight: 700; }
.game-mines { display: grid; grid-template-columns: repeat(var(--mines-size, 8), minmax(0, 1fr)); gap: 4px; width: 100%; max-width: 420px; margin: 0 auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.game-mines.is-flag-mode .game-mine-cell.is-hidden { border-color: var(--danger); }
.game-mine-cell { aspect-ratio: 1 / 1; min-width: 0; padding: 0; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text); font: inherit; font-weight: 800; font-size: clamp(.8rem, 3.6vw, 1.05rem); line-height: 1; cursor: pointer; -webkit-touch-callout: none; }
.game-mine-cell.is-hidden:hover, .game-mine-cell.is-flag:hover { border-color: var(--accent); }
.game-mine-cell.is-open { background: var(--surface); border-color: var(--border); cursor: default; }
.game-mine-cell.is-boom { background: var(--danger); border-color: var(--danger); }
.game-mine-cell.is-mine, .game-mine-cell.is-wrong { background: var(--surface-2); }
.game-mine-cell:disabled { cursor: default; }
.game-mine-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.game-mine-cell.n1 { color: #2F6FDB; }
.game-mine-cell.n2 { color: #1A7A4E; }
.game-mine-cell.n3 { color: #CA363C; }
.game-mine-cell.n4 { color: #6B3FC4; }
.game-mine-cell.n5, .game-mine-cell.n6, .game-mine-cell.n7, .game-mine-cell.n8 { color: #93600E; }
:root[data-theme="dark"] .game-mine-cell.n1 { color: #7FA8F5; }
:root[data-theme="dark"] .game-mine-cell.n2 { color: #5BCB93; }
:root[data-theme="dark"] .game-mine-cell.n3 { color: #F07C80; }
:root[data-theme="dark"] .game-mine-cell.n4 { color: #B79AF0; }
:root[data-theme="dark"] .game-mine-cell.n5, :root[data-theme="dark"] .game-mine-cell.n6, :root[data-theme="dark"] .game-mine-cell.n7, :root[data-theme="dark"] .game-mine-cell.n8 { color: #F5B942; }

/* ------------------------------ Masmorra por turnos ------------------------------ */
.game-fighters { display: grid; gap: 12px; }
.game-fighter { display: grid; gap: 6px; min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.game-fighter.is-foe { border-color: var(--border-strong); }
.game-fighter-name { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.game-fighter-sub { margin: 0; color: var(--text-soft); font-size: .9rem; }
.game-log { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-soft); line-height: 1.45; }
.game-combat { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.game-combat-btn { min-height: 48px; justify-content: center; }
@media (min-width: 600px) {
  .game-fighters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ------------------------------ Cobrinha ------------------------------ */
.game-snake { display: grid; gap: 12px; min-width: 0; }
.game-snake-canvas { justify-self: center; width: 100%; max-width: 360px; height: auto; aspect-ratio: 1 / 1; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface-2); touch-action: none; }
.game-snake-meta { display: flex; justify-content: center; font-variant-numeric: tabular-nums; }
.game-snake-timer { font-size: 1.05rem; }
.game-snake-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.game-dpad { display: none; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 56px); gap: 6px; justify-content: center; }
.game-dpad-btn { border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 1.1rem; cursor: pointer; }
.game-dpad-btn:hover { background: var(--hover); }
.game-dpad-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.game-dpad-up { grid-column: 2; grid-row: 1; }
.game-dpad-left { grid-column: 1; grid-row: 2; }
.game-dpad-down { grid-column: 2; grid-row: 2; }
.game-dpad-right { grid-column: 3; grid-row: 2; }
@media (pointer: coarse) {
  .game-dpad { display: grid; }
}
@media (max-width: 600px) {
  .game-memory { gap: 8px; }
  .game-combat-btn { width: 100%; }
}

/* ------------------------------ Força do computador (velha e quatro em linha) ------------------------------ */
.game-power { display: grid; gap: 6px; max-width: 320px; margin: 0 auto; width: 100%; }
.game-power-label { font-size: .85rem; font-weight: 700; color: var(--text-soft); }
.game-power-meter { display: block; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.game-power-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--success), var(--accent), var(--danger)); }

/* ------------------------------ Forca: desenho e dica ------------------------------ */
.game-hang { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: center; }
.game-gallows { width: 140px; height: auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.game-gallows-wood { stroke: var(--border-strong); stroke-width: 5; }
.game-gallows-man { stroke: var(--accent-text); stroke-width: 4; animation: game-pop .35s ease both; }
.game-gallows.is-lost .game-gallows-man { stroke: var(--danger); }
.game-hang-side { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.game-hint-card { margin: 0; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--text); line-height: 1.45; }
@keyframes game-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) {
  .game-hang { grid-template-columns: 1fr; justify-items: center; }
  .game-hang-side { justify-items: stretch; width: 100%; }
}

/* ------------------------------ Quatro em linha ------------------------------ */
.game-c4 { --c4-size: min(100%, 460px); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: var(--c4-size); margin: 0 auto; padding: 10px; border-radius: 18px; background: linear-gradient(160deg, #2F5FD0, #1B3A8F); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .25), var(--shadow-sm, 0 4px 14px rgba(0, 0, 0, .18)); }
.game-c4-col { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; touch-action: manipulation; }
.game-c4-col:not(:disabled):hover { background: rgba(255, 255, 255, .12); }
.game-c4-col:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.game-c4-col:disabled { cursor: default; }
.game-c4-slot { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 50%; background: rgba(8, 14, 40, .55); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .45); }
.game-c4-disc { position: absolute; inset: 7%; border-radius: 50%; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), inset 0 3px 4px rgba(255, 255, 255, .35); }
.game-c4-disc.is-red { background: radial-gradient(circle at 35% 30%, #FF8A8A, #D7263D 70%); }
.game-c4-disc.is-yellow { background: radial-gradient(circle at 35% 30%, #FFF1A6, #F2B84B 70%); }
.game-c4-disc.is-new { animation: c4-drop .45s cubic-bezier(.3, .1, .4, 1.2) both; }
.game-c4-disc.is-line { animation: c4-win .9s ease-in-out infinite alternate; box-shadow: 0 0 0 3px #fff, 0 0 16px 4px rgba(255, 255, 255, .7); }
@keyframes c4-drop { from { transform: translateY(calc(var(--drop, 6) * -110%)); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes c4-win { from { transform: scale(1); } to { transform: scale(1.12); } }

/* ------------------------------ 2048 ------------------------------ */
.game-2048-bar { display: flex; justify-content: center; gap: 12px; }
.game-2048-score { display: grid; gap: 2px; min-width: 96px; padding: 8px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.game-2048-score small { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0; }
.game-2048-score strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.game-2048 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 380px; margin: 0 auto; padding: 8px; border-radius: 16px; background: var(--surface-3); touch-action: none; user-select: none; -webkit-user-select: none; }
.game-2048-tile { aspect-ratio: 1 / 1; display: grid; place-items: center; min-width: 0; border-radius: 10px; background: var(--surface-2); font-family: var(--font-display); font-weight: 800; font-size: clamp(1.2rem, 6vw, 1.9rem); font-variant-numeric: tabular-nums; color: #3A2E12; }
.game-2048-tile.is-small { font-size: clamp(.95rem, 4.6vw, 1.4rem); }
.game-2048-tile.is-spawn { animation: t2048-spawn .22s ease-out both; }
.game-2048-tile.is-merge { animation: t2048-merge .22s ease-out both; }
.t-2 { background: #EEE4DA; }
.t-4 { background: #EDE0C8; }
.t-8 { background: #F2B179; color: #fff; }
.t-16 { background: #F59563; color: #fff; }
.t-32 { background: #F67C5F; color: #fff; }
.t-64 { background: #F65E3B; color: #fff; }
.t-128 { background: #EDCF72; color: #fff; }
.t-256 { background: #EDCC61; color: #fff; }
.t-512 { background: #EDC850; color: #fff; }
.t-1024 { background: #EDC53F; color: #fff; }
.t-2048, .t-4096 { background: linear-gradient(135deg, #F2B84B, #E0562E); color: #fff; box-shadow: 0 0 18px rgba(242, 184, 75, .6); }
@keyframes t2048-spawn { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes t2048-merge { 0% { transform: scale(1); } 50% { transform: scale(1.18); } 100% { transform: scale(1); } }
.game-dpad--always { display: grid; }

/* ------------------------------ Quebra-cabeça do pôster ------------------------------ */
.game-puzzle-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; align-items: flex-start; }
.game-puzzle-model { margin: 0; width: 96px; display: grid; gap: 4px; text-align: center; font-size: .78rem; color: var(--muted); }
.game-puzzle-model img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.game-puzzle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; width: min(100%, 300px); aspect-ratio: 2 / 3; padding: 4px; border-radius: 14px; background: var(--surface-3); }
.game-puzzle-tile { position: relative; min-width: 0; padding: 0; border: 2px solid transparent; border-radius: 8px; background-color: var(--surface); background-repeat: no-repeat; color: #fff; cursor: default; transition: transform .12s ease, border-color .12s ease; }
.game-puzzle-tile.is-blank { background: transparent; border: 2px dashed var(--border-strong); }
.game-puzzle-tile.is-movable { cursor: pointer; border-color: var(--accent); }
.game-puzzle-tile.is-movable:hover { transform: scale(.97); }
.game-puzzle-tile.is-placed { border-color: var(--success); }
.game-puzzle-tile.is-plain { background-image: linear-gradient(135deg, hsl(var(--hue), 70%, 55%), hsl(calc(var(--hue) + 40), 70%, 40%)); font-size: 2rem; }
.game-puzzle-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.game-puzzle-num { position: absolute; left: 4px; top: 4px; min-width: 20px; padding: 1px 5px; border-radius: 99px; background: rgba(0, 0, 0, .6); font-size: .72rem; font-weight: 800; line-height: 1.4; }
.game-puzzle-tile.is-plain .game-puzzle-num { position: static; background: none; font-size: 2rem; }

/* ------------------------------ Filmes em emojis ------------------------------ */
.game-emoji-card { display: grid; gap: 6px; justify-items: center; padding: 22px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(160deg, var(--surface-2), var(--surface)); text-align: center; }
.game-emoji-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: center; }
.game-emoji-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.game-emoji-tag { padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.game-emoji-tag--site { border-color: var(--accent); color: var(--accent); }
.game-emoji-log-link { margin-left: auto; flex: none; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.game-emoji-count { margin: 0; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0; }
.game-emoji-clue { margin: 0; font-size: clamp(2.4rem, 12vw, 3.6rem); line-height: 1.2; letter-spacing: 0; animation: game-pop .4s ease both; }
.game-emoji-log { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.game-emoji-log li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.game-emoji-log li.is-right { border-color: var(--success); background: var(--ui-success-soft); }
.game-emoji-log li.is-wrong { border-color: var(--danger); background: var(--ui-danger-soft); }
.game-emoji-log-title { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }

/* ------------------------------ Pedra, papel e tesoura ------------------------------ */
.game-rps-score { display: flex; align-items: center; justify-content: center; gap: 18px; }
.game-rps-side { display: grid; gap: 2px; min-width: 96px; text-align: center; }
.game-rps-side small { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0; }
.game-rps-side strong { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.game-rps-x { font-size: 1.4rem; color: var(--muted); }
.game-rps-arena { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.game-rps-arena.is-you { border-color: var(--success); background: var(--ui-success-soft); }
.game-rps-arena.is-cpu { border-color: var(--danger); background: var(--ui-danger-soft); }
.game-rps-hand { font-size: clamp(3rem, 16vw, 4.6rem); line-height: 1; animation: rps-shake .55s ease both; }
.game-rps-hand--cpu { transform: scaleX(-1); animation-name: rps-shake-cpu; }
@keyframes rps-shake { 0% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-14px) rotate(-12deg); } 50% { transform: translateY(0) rotate(8deg); } 75% { transform: translateY(-8px) rotate(-6deg); } 100% { transform: none; } }
@keyframes rps-shake-cpu { 0% { transform: scaleX(-1) translateY(0) rotate(0); } 25% { transform: scaleX(-1) translateY(-14px) rotate(-12deg); } 50% { transform: scaleX(-1) translateY(0) rotate(8deg); } 75% { transform: scaleX(-1) translateY(-8px) rotate(-6deg); } 100% { transform: scaleX(-1); } }
.game-rps-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.game-rps-btn { display: grid; gap: 4px; justify-items: center; min-height: 92px; padding: 10px 6px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.game-rps-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.game-rps-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.game-rps-emoji { font-size: 2.4rem; line-height: 1; }

/* ------------------------------ Caça-palavras ------------------------------ */
.game-ws { display: grid; gap: 16px; }
.game-ws-grid { display: grid; grid-template-columns: repeat(var(--ws-size, 10), minmax(0, 1fr)); gap: 2px; width: 100%; max-width: 420px; margin: 0 auto; padding: 6px; border-radius: 14px; background: var(--surface-3); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.game-ws-cell { aspect-ratio: 1 / 1; min-width: 0; padding: 0; border: 0; border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-weight: 800; font-size: clamp(.78rem, 3.6vw, 1.05rem); cursor: pointer; }
.game-ws-cell:not(:disabled):hover { background: var(--hover); }
.game-ws-cell.is-start { background: var(--accent); color: #fff; transform: scale(1.1); }
.game-ws-cell.is-found, .game-ws-cell.is-reveal { color: #fff; }
.game-ws-cell.is-reveal { opacity: .75; }
.game-ws-cell.h0 { background: #2F6FDB; } .game-ws-cell.h1 { background: #1A7A4E; } .game-ws-cell.h2 { background: #B8501E; }
.game-ws-cell.h3 { background: #6B3FC4; } .game-ws-cell.h4 { background: #B02E6B; } .game-ws-cell.h5 { background: #7A6A12; }
.game-ws-cell:disabled { cursor: default; }
.game-ws-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 1; }
.game-ws-side { display: grid; gap: 8px; align-content: start; justify-items: start; }
.game-ws-words { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.game-ws-words li { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 700; font-size: .85rem; letter-spacing: .03em; }
.game-ws-words li.is-found { text-decoration: line-through; opacity: .55; border-color: var(--success); }
@media (min-width: 760px) {
  .game-ws { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
  .game-ws-grid { margin: 0; }
}
@media (max-width: 600px) {
  .game-rps-btn { min-height: 84px; }
  .game-c4 { gap: 4px; padding: 6px; }
  .game-c4-col { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-c4-disc.is-new, .game-c4-disc.is-line, .game-2048-tile.is-spawn, .game-2048-tile.is-merge,
  .game-gallows-man, .game-emoji-clue, .game-rps-hand { animation: none; }
}

@media (max-width: 600px) {
  .games-hero { padding: 20px 16px; border-radius: 18px; }
  .game-cover { height: 84px; }
  .game-cover-glyph { width: 48px; height: 48px; border-radius: 16px; }
  .game-cover-glyph .icon { width: 26px; height: 26px; }
}

/* Página do jogo: cabeçalho com a cor do jogo */
.game-panel { overflow: hidden; border-radius: 20px; }
.game-panel-head { position: relative; padding: 20px 22px; color: #fff; border-bottom: 0;
  background: radial-gradient(80% 140% at 90% 0%, hsl(calc(var(--gh, 262) + 50) 85% 62% / .85), transparent 60%), linear-gradient(135deg, hsl(var(--gh, 262) 72% 38%), hsl(calc(var(--gh, 262) + 35) 70% 26%)); }
.game-panel-head .game-kicker { color: rgba(255,255,255,.85); }
.game-panel-head .panel-title { color: #fff; font-size: clamp(1.3rem, 5vw, 1.8rem); }
.game-board { padding: 4px 0; }
.game-summary { background: var(--surface-2); }

/* Jogando pela sala: aviso no topo da página do jogo */
.game-room-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.game-room-banner > span { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.game-room-banner .icon { width: 20px; height: 20px; color: var(--accent-text); flex: none; }

/* ==================================================================
   Página de jogos — refinamento (alpha.115 revisão 7): hero com
   gradiente mais firme na cor da marca, cards com hover suave e
   título com marquinha. Só visual, nada no HTML.
   ================================================================== */
.games-hero {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #000) 0, color-mix(in srgb, var(--accent) 72%, #000) 60%, color-mix(in srgb, var(--accent) 55%, #000) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 30px 54px -32px color-mix(in srgb, var(--accent) 60%, rgba(0, 0, 0, .5));
}
.games-hero-kicker { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.games-hero-actions .btn {
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .35);
  transition: transform .15s ease, box-shadow .2s ease;
}
.games-hero-actions .btn:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(0, 0, 0, .4); }

.games-filter { gap: 10px; }
.games-filter a, .games-filter button {
  padding: 8px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.games-filter a:hover, .games-filter button:hover {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2, transparent));
  border-color: color-mix(in srgb, var(--accent) 36%, var(--border));
  color: var(--accent-text);
}

/* título de seção com marquinha */
.games-section-title, .games-page h2 {
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -.005em;
}
.games-section-title::before, .games-page h2::before {
  content: ""; flex: none; width: 5px; height: .9em;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 45%, transparent));
}

/* cartão do jogo */
.game-card, .games-grid > a, .games-grid > article {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.game-card:hover, .games-grid > a:hover, .games-grid > article:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -24px color-mix(in srgb, var(--accent) 40%, rgba(0, 0, 0, .4));
  border-color: color-mix(in srgb, var(--accent) 36%, var(--border));
}

@media (prefers-reduced-motion: reduce) {
  .game-card, .games-grid > a, .feed-side-links a, .games-hero-actions .btn { transition: none; }
}

/* Pads dos novos jogos: Par ou ímpar e Duelo de dados */
.game-oe-sides, .game-dice-pad { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0 8px; }
.game-oe-btn, .game-dice-btn {
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700; cursor: pointer;
  transition: background .14s ease, border-color .14s ease, transform .1s ease;
}
.game-oe-btn:hover, .game-dice-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.game-oe-btn.is-on, .game-oe-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.game-oe-nums { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 420px; margin: 0 auto 10px; }
.game-oe-num {
  min-height: 56px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; cursor: pointer;
  transition: background .14s ease, border-color .14s ease, transform .1s ease;
}
.game-oe-num:hover { background: var(--accent-soft); border-color: var(--accent); }
.game-oe-num.is-on, .game-oe-num[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.game-oe-num:active { transform: scale(.95); }
.game-dice-arena {
  display: flex; justify-content: center; gap: 20px; padding: 20px;
  background: var(--surface-2); border-radius: 20px; margin: 10px 0;
  font-size: 4.5rem; line-height: 1;
}
.game-dice-arena.is-you { background: color-mix(in srgb, var(--success, #1f8a58) 20%, var(--surface-2)); }
.game-dice-arena.is-cpu { background: color-mix(in srgb, var(--danger, #d93a40) 15%, var(--surface-2)); }
.game-dice-face { display: inline-block; animation: dice-roll .5s ease-out; }
@keyframes dice-roll { from { transform: rotate(-30deg) scale(.8); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .game-dice-face { animation: none; } }

/* ==================================================================
   alpha.115 revisão 11: jogos — página com destaque mais rico e as
   peças dos novos jogos (cara ou coroa, alto ou baixo, copo da sorte).
   ================================================================== */
.games-hero { background:
  radial-gradient(360px 180px at 90% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
  linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface)) 0, var(--surface) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  border-radius: 22px; padding: 22px 24px; margin-bottom: 18px;
}
.games-hero-kicker { color: var(--accent); font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin: 0; }
.games-hero-title { margin: 4px 0 2px; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.games-hero-text { margin: 0; color: var(--muted); max-width: 60ch; }

.games-card:hover { transform: translateY(-3px); }
.games-card .games-card-meta { display: inline-flex; gap: 10px; color: var(--muted); font-size: .78rem; }

/* Cara ou coroa */
.game-coin-arena { display: flex; align-items: center; justify-content: center; padding: 24px; min-height: 160px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface-2)), var(--surface-2)); margin: 10px 0; }
.game-coin-face { font-size: 4rem; line-height: 1; filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); animation: game-coin-roll .6s ease; }
.game-coin-arena.is-you  { box-shadow: inset 0 0 0 2px color-mix(in srgb, #0e8f6d 70%, transparent); }
.game-coin-arena.is-cpu  { box-shadow: inset 0 0 0 2px color-mix(in srgb, #c23b4a 70%, transparent); }
@keyframes game-coin-roll {
  0% { transform: rotateY(0) scale(.9); opacity: .4; }
  60% { transform: rotateY(540deg) scale(1.06); opacity: 1; }
  100% { transform: rotateY(720deg) scale(1); }
}
.game-coin-pad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.game-coin-btn { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-weight: 800; cursor: pointer; transition: background .15s, transform .15s, border-color .15s; }
.game-coin-btn:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); transform: translateY(-1px); }

/* Alto ou baixo */
.game-hl-arena { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 20px; min-height: 160px; border-radius: 18px; background: linear-gradient(135deg, #0f2231, #162e40); margin: 10px 0; }
.game-hl-card { display: grid; place-items: center; width: 90px; height: 128px; border-radius: 10px; background: linear-gradient(135deg, #fff, #e5e7eb); color: #0f172a; font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; box-shadow: 0 10px 22px -10px rgba(0,0,0,.5), inset 0 0 0 2px rgba(0,0,0,.08); }
.game-hl-card.is-next { animation: game-card-in .35s ease both; }
@keyframes game-card-in { from { transform: translateX(14px) rotate(2deg); opacity: 0; } to { transform: none; opacity: 1; } }
.game-hl-arena.is-you { box-shadow: inset 0 0 0 2px color-mix(in srgb, #0e8f6d 70%, transparent); }
.game-hl-arena.is-cpu { box-shadow: inset 0 0 0 2px color-mix(in srgb, #c23b4a 70%, transparent); }
.game-hl-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.game-hl-btn { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-weight: 800; cursor: pointer; transition: background .15s, border-color .15s; }
.game-hl-btn:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

/* Copo da sorte */
.game-cups-arena { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 24px; min-height: 160px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface-2)), var(--surface-2)); margin: 10px 0; }
.game-cups-cup { display: grid; place-items: center; aspect-ratio: 1; border-radius: 18px; font-size: 2.6rem; background: var(--surface); border: 1px solid var(--border); transition: transform .18s; }
.game-cups-cup.is-pick { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); transform: translateY(-4px); }
.game-cups-cup.is-coin { background: linear-gradient(135deg, #ffe4a0, #c99b2d); }
.game-cups-arena.is-you  .game-cups-cup.is-pick.is-coin { box-shadow: 0 0 0 3px #0e8f6d; }
.game-cups-arena.is-cpu  .game-cups-cup.is-coin { box-shadow: 0 0 0 3px #c23b4a; }
.game-cups-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.game-cups-btn { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-weight: 800; cursor: pointer; transition: background .15s; }
.game-cups-btn:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
