/* TigroPlay · melhorias da home (26/10/2026)
   Descoberta, selos de modo, biblioteca em grade, carteira fixa, vitrine e "Aprenda Jogando". */

/* ── Barra de filtros ─────────────────────────────────────────────── */
.game-filters { display: grid; gap: .65rem; margin: 0 0 1.25rem; }
.filter-row { display: flex; gap: .5rem; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.filter-row::-webkit-scrollbar { height: 6px; }
.filter-row::-webkit-scrollbar-thumb { background: #ffffff22; border-radius: 6px; }
.filter-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .45rem .95rem;
  border-radius: 999px; border: 1px solid var(--border-color, #2a2a40); background: #14142066; color: var(--text-primary, #f0f0f0);
  font: 600 .86rem/1 'DM Sans', system-ui, sans-serif; cursor: pointer; transition: background .2s, border-color .2s, transform .15s;
}
.filter-chip:hover { border-color: var(--accent-orange, #ff6b00); transform: translateY(-1px); }
.filter-chip[aria-pressed="true"] { background: linear-gradient(135deg, #ff6b00, #ffa500); border-color: transparent; color: #1a0f00; box-shadow: 0 4px 16px #ff6b0040; }
.filter-chip--cat { min-height: 44px; padding: .35rem .8rem; font-weight: 500; font-size: .8rem; color: var(--text-secondary, #8888aa); }
.filter-chip--cat[aria-pressed="true"] { color: #1a0f00; }
.filter-chip:focus-visible, .filter-reset:focus-visible { outline: 3px solid #ffd600; outline-offset: 2px; }
.filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 28px; color: var(--text-secondary, #8888aa); font-size: .85rem; }
.filter-reset { border: 0; background: transparent; color: #ffa500; font: 600 .85rem/1 'DM Sans', system-ui, sans-serif; text-decoration: underline; cursor: pointer; padding: .4rem .2rem; }
.no-results .filter-reset { margin-top: .75rem; }

/* ── Selos de modo e faixas sobre as capas ────────────────────────── */
.game-thumb-cover { object-fit: cover; padding: 0; }
.game-thumb-image { transition: transform .5s ease; }
.mode-badges { position: absolute; left: .55rem; top: .55rem; z-index: 3; display: flex; flex-wrap: wrap; gap: .3rem; max-width: calc(100% - 1.1rem); pointer-events: none; }
.mode-badge {
  display: inline-flex; align-items: center; gap: .28rem; padding: .22rem .5rem; border-radius: 999px; font: 700 .68rem/1 'DM Sans', system-ui, sans-serif;
  letter-spacing: .02em; color: #fff; background: #0b0c14d9; border: 1px solid #ffffff2e; backdrop-filter: blur(6px);
}
.mode-badge--online { background: #0c3b55e6; border-color: #5cc8ff66; }
.mode-badge--vip { background: #4a3300e6; border-color: #ffd60099; color: #ffe27a; }
.mode-badge--local { background: #1d3a22e6; border-color: #7be49555; }
.game-ribbons { position: absolute; right: .55rem; bottom: .55rem; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; pointer-events: none; }
.game-ribbon { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .55rem; border-radius: 6px; font: 700 .66rem/1 'DM Sans', system-ui, sans-serif; background: #0f2d1fe6; color: #bff2c9; border: 1px solid #7be49555; }
.game-ribbon--edu { background: #2b1f4ee6; color: #d8c8ff; border-color: #a98bff66; }
.game-thumb .game-play-overlay { z-index: 4; }

/* ── Biblioteca completa em grade ─────────────────────────────────── */
.full-library-details > summary { cursor: pointer; font-weight: 600; margin-bottom: 1rem; }
.library-groups { display: grid; gap: 2rem; }
.lib-group__title { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .85rem; font: 400 1.5rem/1.1 'Bebas Neue', 'Marcellus', sans-serif; letter-spacing: .04em; color: var(--accent, #ff6b00); }
.lib-group__title small { font: 500 .78rem/1 'DM Sans', system-ui, sans-serif; color: var(--text-secondary, #8888aa); letter-spacing: 0; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.lib-card { display: grid; gap: .55rem; text-decoration: none; color: inherit; border-radius: 12px; }
.lib-card__thumb { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color, #2a2a40); background: #1a1a2e; transition: transform .25s, border-color .25s, box-shadow .25s; }
.lib-card__thumb .game-thumb-image { width: 100%; height: 100%; padding: 8px; object-fit: contain; }
.lib-card__thumb .game-thumb-cover { padding: 0; object-fit: cover; }
.lib-card__thumb .mode-badges { left: .4rem; top: .4rem; }
.lib-card__thumb .mode-badge { font-size: .62rem; padding: .18rem .42rem; }
.lib-card:hover .lib-card__thumb, .lib-card:focus-visible .lib-card__thumb { transform: translateY(-3px); border-color: var(--accent, #ff6b00); box-shadow: 0 10px 28px #0008; }
.lib-card:focus-visible { outline: 3px solid #ffd600; outline-offset: 3px; }
.lib-card__name { font: 600 .92rem/1.25 'DM Sans', system-ui, sans-serif; }

/* ── Carteira fixa no cabeçalho (o cabeçalho já é sticky) ─────────── */
.wallet-chip {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .25rem .8rem .25rem .3rem; border-radius: 999px;
  text-decoration: none; color: var(--text-primary, #f0f0f0); background: #ffffff0d; border: 1px solid #ffd60044;
  font: 700 .9rem/1 'DM Sans', system-ui, sans-serif; transition: background .2s, border-color .2s;
}
.wallet-chip:hover { background: #ffd6000f; border-color: #ffd600; }
.wallet-chip:focus-visible { outline: 3px solid #ffd600; outline-offset: 2px; }
.wallet-chip__avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #2a2a40; display: grid; place-items: center; font: 700 .95rem/1 'DM Sans', sans-serif; color: #ffd600; border: 2px solid #ffd60066; overflow: hidden; flex: 0 0 auto; }
.wallet-chip__coins { display: inline-flex; align-items: center; gap: .3rem; color: #ffe27a; font-variant-numeric: tabular-nums; }
.wallet-chip__coins::before { content: '🪙'; font-size: .95rem; }
.wallet-chip--guest { padding: .25rem .95rem; color: #1a0f00; background: linear-gradient(135deg, #ff6b00, #ffa500); border-color: transparent; }
.wallet-chip[data-loading="true"] .wallet-chip__coins { opacity: .5; }
@media (max-width: 720px) { .wallet-chip { padding-right: .6rem; } .wallet-chip__avatar { width: 30px; height: 30px; } .wallet-chip--guest { padding: .25rem .75rem; font-size: .8rem; } }
@media (max-width: 380px) { .wallet-chip__avatar { display: none; } .wallet-chip { padding-left: .65rem; } }

/* ── Cupom com resgate em um toque ────────────────────────────────── */
.welcome-promo__actions .welcome-promo__redeem {
  border: 0; cursor: pointer; font-weight: 800; border-radius: 10px; padding: .85rem 1.1rem; min-height: 46px;
  background: linear-gradient(135deg, #ffd600, #ff9f1a); color: #1a0f00; box-shadow: 0 6px 20px #ffb30040;
}
.welcome-promo__actions .welcome-promo__redeem[disabled] { opacity: .65; cursor: progress; }
.welcome-promo__status[data-tone="ok"] { color: #8be9a1; }
.welcome-promo__status[data-tone="error"] { color: #ff9a9a; }

/* ── Vitrine de conquistas ────────────────────────────────────────── */
.showcase { margin-bottom: 3rem; }
.showcase__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.showcase-card { background: var(--bg-card, #1a1a2e); border: 1px solid var(--border-color, #2a2a40); border-radius: 14px; padding: 1rem 1.1rem; display: grid; gap: .5rem; }
.showcase-card__rank { font: 400 1.7rem/1 'Bebas Neue', sans-serif; color: #ffd600; }
.showcase-card--first { border-color: #ffd60088; background: linear-gradient(160deg, #2a2208, #1a1a2e 60%); }
.showcase-card__who { display: flex; align-items: center; gap: .65rem; }
.showcase-card__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #2a2a40; display: grid; place-items: center; font-weight: 800; color: #ffd600; overflow: hidden; flex: 0 0 auto; }
.showcase-card h3 { margin: 0; font: 700 1rem/1.2 'DM Sans', sans-serif; overflow-wrap: anywhere; }
.showcase-card small { color: var(--text-secondary, #8888aa); }
.showcase-seals { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .15rem; }
.showcase-seal { font-size: .72rem; font-weight: 700; padding: .2rem .5rem; border-radius: 6px; background: #ffffff10; border: 1px solid #ffffff1f; }
.showcase__empty { padding: 1.25rem; border: 1px dashed #ffffff30; border-radius: 14px; color: var(--text-secondary, #8888aa); }
.showcase__cta { display: inline-block; margin-top: 1rem; color: #ffa500; font-weight: 700; }

/* ── Aprenda Jogando ──────────────────────────────────────────────── */
.learn { margin-bottom: 3rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: 20px; border: 1px solid #7be49533; background: radial-gradient(ellipse at 15% 0, #1d4a3055, transparent 60%), linear-gradient(160deg, #0f2a1f, #12121a 70%); }
.learn__kicker { margin: 0 0 .4rem; font: 700 .72rem/1 'DM Sans', sans-serif; letter-spacing: .14em; color: #7be495; }
.learn h2 { margin: 0 0 .6rem; font: 400 clamp(1.8rem, 4vw, 2.6rem)/1.05 'Bebas Neue', 'Marcellus', sans-serif; }
.learn__lead { max-width: 62ch; color: #c9d6cc; margin: 0 0 1.4rem; line-height: 1.6; }
.learn__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.learn-card { display: grid; grid-template-rows: auto 1fr auto; gap: .75rem; padding: 1.1rem; border-radius: 16px; background: #0b1812cc; border: 1px solid #ffffff18; }
.learn-card__head { display: flex; align-items: center; gap: .75rem; }
.learn-card__img { width: 64px; height: 64px; border-radius: 12px; object-fit: contain; background: #ffffff0a; padding: 4px; flex: 0 0 auto; }
.learn-card h3 { margin: 0; font: 700 1.05rem/1.2 'DM Sans', sans-serif; }
.learn-card ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; color: #d7e2da; font-size: .92rem; line-height: 1.5; }
.learn-card__cta { justify-self: start; color: #ffd600; font-weight: 700; text-decoration: none; }
.learn-card__cta:hover { text-decoration: underline; }
.learn__note { margin: 1.1rem 0 0; font-size: .82rem; color: #9fb2a6; line-height: 1.5; max-width: 80ch; }

@media (prefers-reduced-motion: reduce) {
  .filter-chip, .lib-card__thumb, .game-thumb-image { transition: none; }
}

/* Correções após teste visual */
.game-thumb-image { box-sizing: border-box; }
.game-tags-inline { display: none; }
@media (max-width: 600px) {
  .game-thumb > .mode-badges, .game-thumb > .game-ribbons, .lib-card__thumb .mode-badges { display: none; }
  .game-tags-inline { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
  .game-tags-inline .mode-badges, .game-tags-inline .game-ribbons { position: static; display: contents; }
  .game-tags-inline .mode-badge, .game-tags-inline .game-ribbon { font-size: .62rem; padding: .2rem .4rem; }
  .lib-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
}

/* Cartões e controles cabem também em aparelhos de 320 px. */
.learn__grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.showcase__grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.filter-reset { min-height: 44px; }
@media (max-width: 600px) {
  .filter-row { scrollbar-width: none; }
  .filter-row::-webkit-scrollbar { display: none; }
  .wallet-chip--guest { max-width: 105px; text-align: center; line-height: 1.15; }
}
@media (max-width: 360px) {
  .wallet-chip--guest { max-width: 76px; padding-inline: .55rem; font-size: .72rem; }
}

.wallet-slot { min-width: 0; }
.wallet-chip--unavailable { font: inherit; cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .wallet-chip--unavailable { max-width: 105px; padding: .35rem .5rem; font-size: .72rem; line-height: 1.15; }
}
@media (max-width: 360px) {
  .wallet-chip--unavailable { max-width: 76px; }
}

@media (max-width: 600px) { .header .member-btn { display: none; } }

@media (max-width: 600px) { .section-header { flex-wrap: wrap; gap: .75rem; } .section-title { min-width: 0; max-width: 100%; overflow-wrap: anywhere; } }
