/*
 * ZentaPlay custom styles, layered on top of Bootstrap 5 (dark theme via
 * data-bs-theme="dark"). Bootstrap is vendored via AssetMapper — nothing
 * here or there loads from a CDN.
 */

@font-face {
    font-family: 'Manrope';
    /* WOFF2 (font-specific compression, ~53KB vs the 165KB raw TTF) is tried
       first; the TTF stays as a fallback for the rare UA without WOFF2. The
       woff2 is also <link rel="preload">-ed in base.html.twig so text paints
       in the brand font without a swap flash on the critical path. */
    src: url("../fonts/Manrope-Variable-Za_22-d.woff2") format('woff2-variations'),
         url("../fonts/Manrope-Variable-Za_22-d.woff2") format('woff2'),
         url("../fonts/Manrope-Variable-Jplj-P0.ttf") format('truetype-variations'),
         url("../fonts/Manrope-Variable-Jplj-P0.ttf") format('truetype');
    font-weight: 200 800;
    font-display: swap;
}

/* --- Design tokens: deepen the default Bootstrap dark into a branded
   navy surface system with one accent gradient used site-wide. --- */
:root,
[data-bs-theme="dark"] {
    --zp-accent: #6c8cff;
    --zp-accent-2: #9b6cff;
    --zp-gradient: linear-gradient(135deg, var(--zp-accent), var(--zp-accent-2));
    --bs-body-bg: #161a2a;
    --bs-body-bg-rgb: 22, 26, 42;
    --bs-secondary-bg: #212639;
    --bs-tertiary-bg: #293049;
    --bs-border-color: rgba(255, 255, 255, 0.12);
    --bs-border-color-translucent: rgba(255, 255, 255, 0.08);
    --bs-card-bg: #1b2032;
}

body {
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Sticky "glass" header: keeps nav + login reachable while scrolling long
   grids, translucent + blurred so it feels layered, not pasted on. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(22, 26, 42, 0.82);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bs-border-color) !important;
}

.brand-accent {
    background: var(--zp-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero {
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    inset: -3rem -20% 0;
    background: radial-gradient(60% 100% at 50% 0%, rgba(108, 140, 255, 0.14), transparent 70%);
    pointer-events: none;
    z-index: -1;
}
.hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    letter-spacing: -0.02em;
    font-weight: 800;
}

.game-card {
    color: inherit;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.9rem;
    overflow: hidden;
    background-color: var(--bs-card-bg);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.game-card:hover,
.game-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(108, 140, 255, 0.45);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(108, 140, 255, 0.15);
}

.game-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: var(--bs-secondary-bg);
}
.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.game-card:hover .game-thumb img,
.game-card:focus-visible .game-thumb img {
    transform: scale(1.05);
}
/* Hover "Play" affordance — pure CSS, keyboard-visible via :focus-visible. */
.game-thumb::after {
    content: '▶ Play';
    position: absolute;
    left: 50%;
    bottom: 0.6rem;
    transform: translate(-50%, 0.5rem);
    background: var(--zp-gradient);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.4);
}
.game-card:hover .game-thumb::after,
.game-card:focus-visible .game-thumb::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
    .game-card,
    .game-thumb img,
    .game-thumb::after,
    .ach-progress-fill {
        transition: none;
    }
    .game-card:hover .game-thumb img {
        transform: none;
    }
}

.game-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.game-frame,
#ruffle-player {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 0.5rem;
    background: #000;
}

.share-embed .form-control[readonly] {
    cursor: pointer;
}

/* --- Game stage: maximize the playable area, add immersive play --- */

/* Fullscreen toggle lives in the title bar ABOVE the stage, never over the
   canvas, so it can't block gameplay on any game. */
.game-fs-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.game-fs-icon { flex: 0 0 auto; }

/* On phones the stage breaks out of the container gutters so the game fills
   the full screen width instead of wasting it on padding. */
@media (max-width: 575.98px) {
    .stage-wrap {
        margin-left: calc(-1 * var(--bs-gutter-x, 1.5rem) * 0.5);
        margin-right: calc(-1 * var(--bs-gutter-x, 1.5rem) * 0.5);
    }
    .stage-wrap .game-frame,
    .stage-wrap #ruffle-player { border-radius: 0; }
}

/* Exit button only shown in the CSS focus-mode fallback (below). */
.game-focus-exit {
    display: none;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 7;
}

/* Native Fullscreen API: letterbox the fixed-aspect game to fit the screen. */
.game-stage:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none !important;
    background: #000;
}
.game-stage:fullscreen .game-frame,
.game-stage:fullscreen #ruffle-player {
    width: auto !important;
    max-width: 100%;
    height: 100%;
    border-radius: 0;
}

/* CSS focus-mode fallback (no Fullscreen API): pin the stage over the viewport. */
.game-stage.is-focus {
    position: fixed;
    inset: 0;
    z-index: 1060;
    max-width: none !important;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}
.game-stage.is-focus .game-frame,
.game-stage.is-focus #ruffle-player {
    width: auto !important;
    max-width: 100%;
    height: 100%;
    border-radius: 0;
}
.game-stage.is-focus .game-focus-exit { display: inline-block; }
body.game-focus-lock { overflow: hidden; }

/* Comfortable tap targets on touch devices (>= ~44px tall). */
@media (max-width: 575.98px) {
    .btn-sm { padding: 0.5rem 0.75rem; }
    .breadcrumb { --bs-breadcrumb-divider-color: var(--bs-secondary-color); }
}

#consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: var(--bs-dark, #1a1d29);
    border-top: 1px solid var(--bs-border-color, #2a2e3d);
    box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.35);
}
#consent-banner p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #9aa0b4);
    max-width: 640px;
}
#consent-banner a { color: var(--bs-primary, #6c8cff); }
#consent-banner .consent-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Ad slots: reserve height up front (no CLS when the unit fills), visibly
   label + separate them from content (AdSense "distinguishable from content"
   guidance), and keep the empty state quiet rather than a black hole. */
.ad-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 106px; /* 90px unit + label */
    margin: 1.75rem auto;
    padding: 0.35rem 0.5rem 0.5rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.015);
    overflow: hidden;
}
.ad-slot::before {
    content: 'Advertisement';
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    opacity: 0.6;
    margin-bottom: 0.25rem;
}
.ad-slot .adsbygoogle {
    width: 100%;
}

/* Ad-placement wrapper: holds the real AdSense box and the first-party
   "house ad" fallback card. The wrapper + card use neutral class names (no
   `ad`/`ads`) so cosmetic ad-block filters, which do hide `.ad-slot` and
   `.adsbygoogle`, leave the fallback visible. See _ads/slot.html.twig. */
.spotlight {
    margin: 1.75rem auto;
}
.spotlight .ad-slot {
    margin: 0;
}
/* Our CSS sets display on these, which would otherwise beat the [hidden] UA
   rule — force it so house-ads.js can reliably toggle either child. */
.spotlight [hidden] {
    display: none !important;
}
.spotlight-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    max-width: 728px;
    min-height: 106px;
    margin: 0 auto;
    padding: 0.7rem 1rem;
    text-decoration: none;
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 0.75rem;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(108, 140, 255, 0.12), transparent 55%),
        rgba(255, 255, 255, 0.02);
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.spotlight-card:hover,
.spotlight-card:focus-visible {
    border-color: rgba(108, 140, 255, 0.55);
    transform: translateY(-1px);
    color: var(--bs-body-color);
}
.spotlight-thumb {
    flex-shrink: 0;
    width: 96px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.03);
}
.spotlight-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.spotlight-kicker {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-primary, #6c8cff);
}
.spotlight-title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.spotlight-cta {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

/* "Unblocked games" SEO landing page: readable prose + collapsible FAQ. */
.unblocked-copy {
    max-width: 70ch;
    color: var(--bs-secondary-color);
    line-height: 1.6;
}
.unblocked-copy a { color: var(--bs-primary, #6c8cff); }
.unblocked-faq {
    max-width: 70ch;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.unblocked-faq details {
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 0.6rem;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 255, 255, 0.015);
}
.unblocked-faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--bs-body-color);
}
.unblocked-faq details[open] summary {
    margin-bottom: 0.4rem;
}
.unblocked-faq p {
    margin: 0;
    color: var(--bs-secondary-color);
    line-height: 1.55;
}

/* Polite, dismissable ad-block notice (house-ads.js). Only shown to visitors
   who opted into ads but whose blocker prevents them — never a content wall. */
#support-note {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    max-width: min(560px, calc(100vw - 24px));
    padding: 0.7rem 0.85rem 0.7rem 1.1rem;
    background: rgba(18, 20, 28, 0.96);
    border: 1px solid rgba(108, 140, 255, 0.45);
    border-radius: 0.75rem;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
    color: var(--bs-body-color, #e7e9f0);
    font-size: 0.85rem;
    line-height: 1.35;
}
#support-note .support-note-close {
    flex-shrink: 0;
    border: 0;
    border-radius: 0.5rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f1117;
    background: #6c8cff;
    cursor: pointer;
}
@media (max-width: 575.98px) {
    .spotlight-title { font-size: 0.95rem; }
    #support-note { flex-direction: column; align-items: stretch; text-align: center; }
}

.game-stage {
    position: relative;
}

/* Mobile "About this game" collapse toggle — caret flips when expanded. */
.about-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.about-toggle .about-caret {
    transition: transform 0.15s ease;
}
.about-toggle:not(.collapsed) .about-caret {
    transform: rotate(180deg);
}

.ad-interstitial {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 17, 23, 0.85);
    border-radius: 0.5rem;
}
.ad-interstitial-card {
    position: relative;
    max-width: 90%;
    background: var(--bs-dark, #1a1d29);
    border: 1px solid var(--bs-border-color, #2a2e3d);
    border-radius: 0.5rem;
    padding: 2rem 1rem 1rem;
}
.ad-interstitial-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* --- Homepage sections: Daily banner, Featured/Latest rows, Top players --- */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}
.section-title::before {
    content: '';
    width: 0.3rem;
    height: 1.15em;
    border-radius: 999px;
    background: var(--zp-gradient);
    flex: 0 0 auto;
}

.daily-banner {
    padding: 0.85rem 1rem;
    border: 1px solid rgba(108, 140, 255, 0.35);
    border-radius: 0.9rem;
    background:
        radial-gradient(80% 160% at 0% 0%, rgba(108, 140, 255, 0.16), transparent 60%),
        var(--bs-card-bg);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.daily-banner:hover,
.daily-banner:focus-visible {
    border-color: rgba(108, 140, 255, 0.7);
    box-shadow: 0 0 0 1px rgba(108, 140, 255, 0.2), 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
}
.daily-banner-thumb {
    border-radius: 0.5rem;
    object-fit: cover;
    flex: 0 0 auto;
}
.daily-banner-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--zp-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.top-players {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.9rem;
    background: var(--bs-card-bg);
    overflow: hidden;
    max-width: 34rem;
}
.top-player {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
}
.top-player + .top-player { border-top: 1px solid var(--bs-border-color-translucent); }
.top-player-rank {
    flex: 0 0 1.9rem;
    height: 1.9rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    font-weight: 700;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}
.top-player-1 .top-player-rank { background: linear-gradient(135deg, #f6c945, #e08b1d); color: #201400; }
.top-player-2 .top-player-rank { background: linear-gradient(135deg, #d7dee9, #9aa6b8); color: #10151d; }
.top-player-3 .top-player-rank { background: linear-gradient(135deg, #d99a6c, #a05f2c); color: #1d0f02; }
.top-player-podium .top-player-name { font-weight: 700; }
.top-player-name { min-width: 0; }
.top-player-points {
    margin-left: auto;
    font-weight: 700;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    color: var(--zp-accent);
    background: rgba(108, 140, 255, 0.12);
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
    flex-shrink: 0;
}

/* --- Homepage discovery: hero lead, search + genre chips, card clamp --- */
.hero-lead {
    max-width: 46rem;
    color: var(--bs-secondary-color);
}

.game-search {
    max-width: 22rem;
    border-radius: 999px;
    padding-left: 1rem;
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-border-color);
}
.game-search:focus {
    border-color: var(--zp-accent);
    box-shadow: 0 0 0 0.2rem rgba(108, 140, 255, 0.18);
}

.game-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.genre-chip {
    background-color: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    padding: 0.4em 0.85em;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.genre-chip:hover,
.genre-chip:focus-visible {
    background: var(--zp-gradient);
    border-color: transparent;
    color: #fff;
}
.genre-chip-active {
    background: var(--zp-gradient);
    border-color: transparent;
    color: #fff;
}
.genre-chip-count {
    opacity: 0.6;
    font-weight: 400;
    margin-left: 0.15em;
}

/* --- Header nav + footer links --- */
.site-nav-link {
    color: var(--bs-secondary-color);
    text-decoration: none;
}
.site-nav-link:hover,
.site-nav-link:focus-visible {
    color: var(--bs-primary);
}
.site-footer {
    background: linear-gradient(0deg, rgba(108, 140, 255, 0.05), transparent);
}

/* --- Achievements page (/achievements) --- */
.ach-hero { max-width: 44rem; }
.ach-progress {
    position: relative;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--bs-secondary-bg);
    overflow: hidden;
    flex: 1 1 8rem;
    min-width: 6rem;
}
.ach-progress-lg { height: 1.4rem; }
.ach-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bs-primary), #9b6cff);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.ach-progress-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bs-body-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.ach-section {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    background: var(--bs-body-bg);
    overflow: hidden;
}
.ach-section-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(0deg, rgba(108, 140, 255, 0.06), transparent);
    border-bottom: 1px solid var(--bs-border-color);
}
.ach-game-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.ach-game-link img { border-radius: 0.4rem; object-fit: cover; }
.ach-game-link:hover h2 { color: var(--bs-primary); }
.ach-count {
    font-variant-numeric: tabular-nums;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
    margin-left: auto;
}
.ach-list { list-style: none; margin: 0; padding: 0; }
.ach-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 1rem;
    transition: background-color 0.15s ease;
}
.ach-row + .ach-row { border-top: 1px solid var(--bs-border-color-translucent); }
.ach-row:hover { background: rgba(108, 140, 255, 0.05); }
.ach-icon { flex: 0 0 48px; height: 48px; }
.ach-icon img { display: block; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25)); }
.ach-icon-fallback { font-size: 1.8rem; line-height: 48px; display: block; text-align: center; }
.ach-body { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.ach-name { font-weight: 600; }
.ach-desc { color: var(--bs-secondary-color); font-size: 0.88rem; }
.ach-meta {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    flex-shrink: 0;
}
.ach-points {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--bs-primary);
    background: rgba(108, 140, 255, 0.12);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
}
.ach-date, .ach-locked-label { font-size: 0.78rem; color: var(--bs-secondary-color); }
.ach-row.is-locked .ach-icon { filter: grayscale(1) brightness(0.55); opacity: 0.7; }
.ach-row.is-locked .ach-name { color: var(--bs-secondary-color); }
.ach-row.is-locked .ach-points { color: var(--bs-secondary-color); background: var(--bs-secondary-bg); }
.ach-row.is-unlocked .ach-icon { animation: none; }
@media (max-width: 575.98px) {
    .ach-desc { font-size: 0.8rem; }
    .ach-row { padding: 0.6rem 0.75rem; gap: 0.65rem; }
    .ach-icon { flex-basis: 40px; height: 40px; }
    .ach-icon img { width: 40px; height: 40px; }
}

/* --- Homepage redesign (July 2026): hero feature, category tiles, scroll rows --- */
.hero-feature {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.9rem;
    overflow: hidden;
    background-color: var(--bs-card-bg);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.hero-feature:hover,
.hero-feature:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(108, 140, 255, 0.45);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.45);
}
.hero-feature-thumb {
    aspect-ratio: 16 / 8;
    overflow: hidden;
    background-color: var(--bs-secondary-bg);
}
.hero-feature-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.hero-feature:hover .hero-feature-thumb img { transform: scale(1.03); }
.hero-feature-body { padding: 1rem 1.25rem 1.25rem; }
.hero-feature-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8fa7ff;
    margin-bottom: 0.25rem;
}
.hero-feature-title { color: var(--bs-body-color); font-weight: 800; }

.side-panel {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.9rem;
    background-color: var(--bs-card-bg);
    padding: 1rem 1.1rem;
}

.cat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 0.75rem;
}
.cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.9rem 0.5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.9rem;
    background-color: var(--bs-card-bg);
    color: var(--bs-body-color);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.cat-tile:hover,
.cat-tile:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(108, 140, 255, 0.45);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
    color: var(--bs-body-color);
}
.cat-tile-icon { width: 1.75rem; height: 1.75rem; color: #8fa7ff; margin-bottom: 0.3rem; }
.cat-tile-name { font-weight: 700; font-size: 0.9rem; }
.cat-tile-count { font-size: 0.75rem; color: var(--bs-secondary-color); }

.hscroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(11.5rem, 14rem);
    gap: 0.75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}
.hscroll-item { scroll-snap-align: start; min-width: 0; }
.hscroll-item .game-card { height: 100%; }

.game-badge-new {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(135deg, #34d399, #059669);
    color: #04241a;
    font-weight: 800;
    letter-spacing: 0.05em;
}

@media (prefers-reduced-motion: reduce) {
    .hero-feature,
    .hero-feature-thumb img,
    .cat-tile {
        transition: none;
    }
    .hero-feature:hover .hero-feature-thumb img { transform: none; }
}
