/* Página de jogo/plataforma sem tema definido no admin (body.mx-gx).
   Cada jogo ganha a própria cor: --gx-accent vem da capa do jogo (script no fim de categories/games.ejs).
   Referências: 21st.dev (cards densos, chips), cta.gallery (ação principal clara), 60fps.design (movimento curto). */
body.mx-gx {
    --gx-accent: #2563eb;
    --gx-soft: color-mix(in srgb, var(--gx-accent) 12%, transparent);
    --gx-line: var(--border-color, rgba(15, 23, 42, .1));
    --gx-card: var(--card-color, #fff);
    --gx-text: var(--text-primary, #0f172a);
    --gx-muted: var(--text-secondary, #64748b);
    --gx-surface: color-mix(in srgb, var(--gx-card) 94%, var(--gx-text) 6%);
}
body.mx-gx .app > .container { max-width: 1240px; margin-top: 0 !important; padding-top: 24px !important; }
@media (max-width: 991.98px) { body.mx-gx .app > .container { padding-top: 12px !important; } }

/* ---------- hero ---------- */
.gx-hero { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--gx-line); background: var(--gx-card); margin-top: 8px; isolation: isolate; }
.gx-hero__bg { position: absolute; inset: -40px; z-index: -1; background: var(--gx-img) center / cover no-repeat; filter: blur(48px) saturate(1.5); opacity: .45; transform: scale(1.1); }
.gx-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, var(--gx-card) 30%, color-mix(in srgb, var(--gx-card) 55%, transparent) 70%, color-mix(in srgb, var(--gx-accent) 20%, transparent)); }
.gx-hero__inner { display: flex; align-items: center; gap: 24px; padding: 28px 28px 20px; }
.gx-hero__cover { width: 120px; height: 120px; border-radius: 24px; object-fit: cover; flex: 0 0 auto; box-shadow: 0 16px 40px color-mix(in srgb, var(--gx-accent) 35%, transparent), 0 0 0 1px rgba(255, 255, 255, .25) inset; background: var(--gx-surface); }
.gx-hero__text { min-width: 0; flex: 1 1 auto; }
.gx-crumbs { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--gx-muted); margin-bottom: 6px; }
.gx-crumbs a { color: var(--gx-muted); text-decoration: none; font-weight: 500; }
.gx-crumbs a:hover { color: var(--gx-accent); }
.gx-crumbs i { font-size: .6rem; opacity: .6; }
.gx-hero h1 { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -.02em; line-height: 1.1; margin: 0 0 8px; color: var(--gx-text); text-wrap: balance; }
.gx-hero__text > p { margin: 0 0 14px; color: var(--gx-muted); font-size: .95rem; max-width: 58ch; }
.gx-stats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.gx-stats li { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--gx-card) 70%, transparent); border: 1px solid var(--gx-line); font-size: .82rem; color: var(--gx-muted); backdrop-filter: blur(6px); }
.gx-stats b { font-family: 'Manrope', sans-serif; font-size: 1rem; color: var(--gx-text); font-variant-numeric: tabular-nums; }
.gx-sell { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; background: var(--gx-accent); color: #fff !important; font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; box-shadow: 0 10px 24px -10px var(--gx-accent); transition: transform .15s, filter .15s; flex: 0 0 auto; }
.gx-sell:hover { transform: translateY(-1px); filter: brightness(1.08); }
.gx-sell:focus-visible { outline: 3px solid color-mix(in srgb, var(--gx-accent) 50%, transparent); outline-offset: 2px; }
.gx-trust { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 12px 28px; border-top: 1px solid var(--gx-line); background: color-mix(in srgb, var(--gx-card) 80%, transparent); font-size: .82rem; color: var(--gx-muted); }
.gx-trust li { display: inline-flex; align-items: center; gap: 8px; }
.gx-trust i { color: var(--gx-accent); }

/* ---------- categorias ---------- */
.gx-cats { display: flex; gap: 8px; margin: 18px 0 12px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.gx-cat { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 8px 14px 8px 8px; border-radius: 14px; border: 1px solid var(--gx-line); background: var(--gx-card); color: var(--gx-text); text-decoration: none; font-weight: 600; font-size: .9rem; transition: border-color .15s, background-color .15s, transform .15s; }
.gx-cat img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.gx-cat b { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--gx-surface); color: var(--gx-muted); font-size: .75rem; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.gx-cat:hover { border-color: var(--gx-accent); transform: translateY(-1px); color: var(--gx-text); }
.gx-cat.is-active { border-color: var(--gx-accent); background: var(--gx-soft); color: var(--gx-accent); box-shadow: inset 0 0 0 1px var(--gx-accent); }
.gx-cat.is-active b { background: var(--gx-accent); color: #fff; }
.gx-cat.is-empty:not(.is-active) { opacity: .6; }
.gx-cat:focus-visible { outline: 3px solid color-mix(in srgb, var(--gx-accent) 45%, transparent); outline-offset: 2px; }

/* ---------- busca e ordenação ---------- */
.gx-search { position: relative; display: block; margin: 0; }
.gx-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--gx-muted); font-size: .9rem; pointer-events: none; }
.gx-search input { width: 100%; height: 50px; padding: 0 16px 0 44px; border-radius: 14px; border: 1px solid var(--gx-line); background: var(--gx-card); color: var(--gx-text); font-size: .95rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.gx-search input:focus { border-color: var(--gx-accent); box-shadow: 0 0 0 4px var(--gx-soft); }
body.mx-gx .mx-sortbar { gap: 10px; }
body.mx-gx .mx-sortbar #results .text-muted { font-weight: 600; color: var(--gx-muted) !important; font-size: .88rem; }
body.mx-gx .mx-sortbar > .d-flex { gap: 4px !important; padding: 4px; border-radius: 12px; border: 1px solid var(--gx-line); background: var(--gx-surface); }
body.mx-gx .mx-sortbar > .d-flex > .text-muted { padding: 0 8px; font-size: .8rem; margin: 0 !important; }
body.mx-gx .mx-sortbar .form-check-inline { margin: 0; padding: 0; position: relative; }
body.mx-gx .mx-sortbar .form-check-input { position: absolute; opacity: 0; pointer-events: none; }
body.mx-gx .mx-sortbar .form-check-label { display: inline-block; padding: 6px 12px; border-radius: 9px; font-size: .84rem; font-weight: 600; color: var(--gx-muted); cursor: pointer; transition: background-color .15s, color .15s; }
body.mx-gx .mx-sortbar .form-check-input:checked + .form-check-label { background: var(--gx-card); color: var(--gx-accent); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
body.mx-gx .mx-sortbar .form-check-input:focus-visible + .form-check-label { outline: 2px solid var(--gx-accent); }

/* ---------- cartões ---------- */
.gx-card { position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 16px; border-radius: 16px; border: 1px solid var(--gx-line); background: var(--gx-card); color: var(--gx-text); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.gx-card:hover { color: var(--gx-text); border-color: color-mix(in srgb, var(--gx-accent) 55%, var(--gx-line)); transform: translateY(-2px); box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--gx-accent) 70%, transparent); }
.gx-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--gx-accent) 45%, transparent); outline-offset: 2px; }
.gx-card .card-title { white-space: normal; overflow-wrap: anywhere; font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1rem; line-height: 1.35; margin: 0; color: var(--gx-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gx-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--gx-soft); color: var(--gx-accent); font-size: .74rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-chip i { font-size: .65rem; }
.gx-meta { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.gx-meta li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: var(--gx-surface); font-size: .76rem; color: var(--gx-muted); font-variant-numeric: tabular-nums; }
.gx-meta i { font-size: .7rem; color: var(--gx-accent); }
.gx-offer__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--gx-line); }
.gx-seller { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.gx-seller .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.gx-ava { position: relative; flex: 0 0 auto; }
.gx-ava img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: color-mix(in srgb, var(--gx-accent) 30%, var(--gx-surface)); }
.gx-ava i { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #94a3b8; border: 2px solid var(--gx-card); }
.gx-ava i.is-on { background: #16a34a; }
.gx-price { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.gx-price small { font-size: .74rem; color: var(--gx-muted); margin-right: 2px; }
.gx-price b { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--gx-text); font-variant-numeric: tabular-nums; }
.gx-price em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--gx-muted); }
.gx-server { padding-right: 56px; }
.gx-server__ico img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.gx-muted { font-size: .82rem; color: var(--gx-muted); }
.gx-server .gx-price { margin-top: auto; }
.gx-server .gx-price b { font-size: 1.3rem; }
.gx-go { position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gx-surface); color: var(--gx-muted); transition: background-color .15s, color .15s, transform .15s; }
.gx-card:hover .gx-go { background: var(--gx-accent); color: #fff; transform: translateX(2px); }

/* ---------- vazio e sobre ---------- */
.gx-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 20px; border-radius: 18px; border: 1px dashed var(--gx-line); background: var(--gx-card); }
.gx-empty img { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; opacity: .9; margin-bottom: 6px; }
.gx-empty h3 { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.15rem; margin: 0; color: var(--gx-text); }
.gx-empty p { margin: 0 0 8px; color: var(--gx-muted); font-size: .9rem; max-width: 48ch; }
.gx-about { margin: 40px 0 24px; padding: 22px 24px; border-radius: 18px; border: 1px solid var(--gx-line); background: var(--gx-card); color: var(--gx-text); }
.gx-about h2 { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.15rem; margin: 0 0 10px; }
.gx-about > div { color: var(--gx-muted); font-size: .92rem; line-height: 1.65; max-width: 80ch; }

/* ---------- carregando: mesmos cartões, sem o cinza chapado ---------- */
body.mx-gx .skeleton-offer { border-radius: 16px; border: 1px solid var(--gx-line); background: var(--gx-card); }

/* ---------- celular ---------- */
@media (max-width: 767.98px) {
    .gx-hero__inner { flex-wrap: wrap; gap: 16px; padding: 20px 18px 16px; }
    .gx-hero__cover { width: 80px; height: 80px; border-radius: 18px; }
    .gx-hero__text { flex-basis: calc(100% - 96px); }
    .gx-sell { width: 100%; justify-content: center; }
    .gx-trust { padding: 10px 18px; gap: 6px 14px; }
    .gx-about { padding: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
    .gx-card { animation: gx-in .3s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes gx-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gx-card, .gx-cat, .gx-sell, .gx-go { transition: none; } }

/* ---------- foto do anúncio no topo do cartão (todas as categorias menos moedas) ---------- */
.gx-offer__media { position: relative; margin: -16px -16px 2px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 15px 15px 0 0; background: var(--gx-surface); }
.gx-offer__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.gx-offer__media.is-fallback img { filter: saturate(.85) brightness(.92); }
.gx-offer__media::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(to top, rgba(15, 23, 42, .35), transparent); pointer-events: none; }
.gx-offer__media .gx-chip { position: absolute; top: 10px; left: 10px; z-index: 1; background: rgba(15, 23, 42, .72); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gx-card:hover .gx-offer__media img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .gx-offer__media img { transition: none; } }

