/* ============================================================
   GAMING THEME — Design System: the rules every page shares
   ============================================================
   The first paint waits for this file, so it holds only what two or more
   kinds of page use: tokens, the header, buttons, cards, the footer, the
   sign-in dialog. Rules of one page live in page-<name>.css, which only
   that page loads before painting (Helpers/PageStyles.cs picks it by the
   address; the other sheets load afterwards, for the next navigation):

     page-game.css      /games/{slug}
     page-listing.css   /listing/games
     page-home.css      /
     page-releases.css  /releases
     page-deals.css     /deals
     page-more.css      every other page (hubs, history, account, legal)

   A class that a second kind of page starts using moves here with its
   rules; PageStylesTests fails until it does. A page sheet comes after
   this file, so a rule there beats a rule here of the same weight: a few
   page rules that must lose to a later rule of this file stay here and
   say so.
   ============================================================ */

/* --- Fonts ------------------------------------------------- */
/* Fonts are self-hosted (wwwroot/fonts) and declared inline in App.razor's <head>, not @import-ed here: an @import only starts after this file has downloaded. */

/* --- Tokens ------------------------------------------------ */
:root {
    --bg-base:        #09090b;
    --bg-surface:     #111116;
    --bg-elevated:    #18181f;
    --bg-card:        #1c1c28;

    --accent:         #7c3aed;
    --accent-dim:     #6d28d9;
    --accent-glow:    rgba(124, 58, 237, 0.25);
    --accent-cyan:    #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.2);

    --score-great:    #22c55e;
    --score-good:     #84cc16;
    --score-mixed:    #eab308;
    --score-poor:     #f97316;
    --score-bad:      #ef4444;

    --text-primary:   #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted:     #8a8a96;   /* 4.9:1 on the card background, 5.8:1 on the page: WCAG AA for small text */

    --border:         rgba(255, 255, 255, 0.07);
    --border-bright:  rgba(255, 255, 255, 0.14);

    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;
    --radius-xl:  20px;

    --transition: all 0.2s ease;
}

/* --- Reset / Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

body.gn-body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', 'Inter Fallback', 'Inter Fallback Roboto', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* --- Site header ------------------------------------------ */
/* Logo, search, sections, account. The search field is the one bold element:
   it sits right after the logo and its button is the only solid colour in the
   bar (cyan for "find"; violet stays the account colour). Everything in here
   except the account island is static HTML, opened and closed by <html
   data-nav|data-search="open"> (the inline script in App.razor), so no control
   waits for the Blazor circuit.

   The blur lives on a pseudo-element: a backdrop-filter on the header itself
   would make it the containing block of its fixed children (the drawer, the
   phone search sheet and the sign-in dialog). */
.gn-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.gn-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(9, 9, 11, 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.gn-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 60px;
    padding: 0 2rem;
}

.gn-nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.gn-nav-logo:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 4px; border-radius: var(--radius-sm); }
.gn-nav-logo-mark { display: block; flex-shrink: 0; }

/* Scoped to the wordmark so the monogram's inner <text> isn't recolored. */
.gn-nav-logo-text span { color: var(--accent-cyan); }

/* The search field takes the room the links leave. */
.gn-nav-search {
    flex: 1 1 22rem;
    min-width: 0;
    max-width: 38rem;
}

/* Sections: full-height links, the current one marked on the header's bottom
   edge in the logo's own gradient. */
.gn-nav-links {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    flex: none;
    margin-left: auto;
}

.gn-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.8rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease;
}

.gn-nav-link:hover,
.gn-nav-link.active { color: var(--text-primary); }

.gn-nav-link.active::after {
    content: "";
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent));
}

.gn-nav-link:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: -6px;
    border-radius: var(--radius-md);
}

/* "Browse": a <details>, so it opens with no script. */
.gn-nav-more { position: relative; display: flex; }
.gn-nav-more > summary { list-style: none; user-select: none; }
.gn-nav-more > summary::-webkit-details-marker { display: none; }
.gn-nav-more > summary svg { transition: transform 0.15s ease; }
.gn-nav-more[open] > summary { color: var(--text-primary); }
.gn-nav-more[open] > summary svg { transform: rotate(180deg); }

.gn-nav-more-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 17rem;
    padding: 0.375rem;
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    animation: gn-slide-down 0.14s ease;
}

.gn-nav-more-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
}

.gn-nav-more-item:hover,
.gn-nav-more-item:focus-visible { background: var(--bg-elevated); outline: none; }
.gn-nav-more-name { color: var(--text-primary); font-size: 0.9rem; font-weight: 600; }
.gn-nav-more-item.active .gn-nav-more-name { color: var(--accent-cyan); }
.gn-nav-more-hint { color: var(--text-muted); font-size: 0.78rem; }

/* Account island (AccountMenu.razor). */
.gn-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: none;
}

.gn-nav-signin.gn-btn-ghost { border-color: transparent; padding-inline: 0.7rem; }

/* Signed-in visitor, circuit not yet connected (App.razor sets data-auth): a
   quiet pill holds the space where the account menu will render. */
html[data-auth="pending"] .gn-nav-actions > .gn-btn { display: none; }
html[data-auth="pending"] .gn-nav-actions::after {
    content: "";
    width: 112px;
    height: 32px;
    border-radius: 16px;
    background: var(--bg-elevated);
}

/* Menu and search buttons: phones and tablets. 44px targets, no tap delay. */
.gn-nav-burger,
.gn-nav-search-btn {
    display: none;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.gn-nav-burger:hover,
.gn-nav-search-btn:hover,
html[data-nav="open"] .gn-nav-burger { color: var(--text-primary); background: var(--bg-elevated); }

.gn-nav-burger:focus-visible,
.gn-nav-search-btn:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: -2px; }

.gn-nav-burger .gn-ico-close { display: none; }
html[data-nav="open"] .gn-nav-burger .gn-ico-menu { display: none; }
html[data-nav="open"] .gn-nav-burger .gn-ico-close { display: block; }

/* The drawer and its scrim exist in every page; <html data-nav="open"> shows them. */
.gn-drawer,
.gn-scrim { display: none; }

.gn-drawer-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 0.875rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1.0625rem;
    font-weight: 500;
    text-decoration: none;
}

.gn-drawer-link:hover,
.gn-drawer-link.active { color: var(--text-primary); background: var(--bg-elevated); }
.gn-drawer-link.active { box-shadow: inset 3px 0 0 var(--accent-cyan); }
.gn-drawer-link:focus-visible,
.gn-drawer-chip:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: -2px; }

.gn-drawer-label {
    margin: 0.875rem 0.875rem 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.gn-drawer-browse {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0 0.375rem;
}

.gn-drawer-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.gn-drawer-chip:hover,
.gn-drawer-chip.active { color: var(--text-primary); border-color: var(--accent-cyan); }

/* Small laptops and tablets in landscape: links and field share a tight bar. */
@media (max-width: 1239.98px) {
    .gn-nav { gap: 1rem; padding: 0 1.25rem; }
    .gn-nav-link { padding: 0 0.6rem; }
    .gn-nav-link.active::after { left: 0.6rem; right: 0.6rem; }
    .gs-header .gs-key { display: none; }
}

/* Home page, bar layout only: the hero carries the search while it is on
   screen, so the header's copy stays out of the way and returns once the hero
   has scrolled under the bar (search.js sets data-hero). It keeps its place in
   the layout, so nothing moves when it appears. */
@media (min-width: 760.02px) {
    .gn-nav-search { transition: opacity 0.18s ease, visibility 0.18s; }
    .gn-nav-search.is-deferred:not(:focus-within) { opacity: 0; visibility: hidden; }
    html[data-hero="out"] .gn-nav-search.is-deferred { opacity: 1; visibility: visible; }
}

/* Tablets and phones: the sections move into the drawer. */
@media (max-width: 1099.98px) {
    .gn-nav { gap: 0.75rem; padding: 0 1.25rem 0 0.75rem; }
    .gn-nav-links { display: none; }
    .gn-nav-burger { display: inline-flex; }
    .gn-nav-search { max-width: none; }

    html[data-nav="open"] .gn-drawer {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 2;
        max-height: calc(100vh - 60px);
        max-height: calc(100dvh - 60px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 0.5rem 1rem 1.25rem;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border);
        animation: gn-slide-down 0.18s ease;
    }

    html[data-nav="open"] .gn-scrim {
        display: block;
        position: fixed;
        inset: 60px 0 0 0;
        z-index: 1;
        background: rgba(0, 0, 0, 0.55);
        animation: gn-fade-in 0.15s ease;
    }
}

/* Phones: the field becomes a sheet opened by the search button. */
@media (max-width: 760px) {
    .gn-nav { gap: 0.25rem; padding: 0 0.625rem 0 0.375rem; }
    .gn-nav-logo { margin-left: 0.125rem; }
    .gn-nav-search { display: none; }
    .gn-nav-search-btn { display: inline-flex; margin-left: auto; }
    /* Two classes: .gn-btn and .gn-username set display further down the file. */
    .gn-nav-actions .gn-nav-signin { display: none; }   /* "Join" stays; the dialog offers both */
    .gn-nav-actions .gn-username { display: none; }     /* avatar only */

    html[data-search="open"] .gn-nav-search {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 3;
        max-width: none;
        padding: 0.375rem 0.5rem 0;
        background: var(--bg-base);
        animation: gn-fade-in 0.12s ease;
    }
}

@media (max-width: 640px) {
    .gn-nav { height: 56px; }
    html[data-nav="open"] .gn-drawer { top: 56px; max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); }
    html[data-nav="open"] .gn-scrim { inset: 56px 0 0 0; }
}

@media (max-width: 350px) {
    .gn-nav-logo-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .gn-nav-more-menu,
    html[data-nav="open"] .gn-drawer,
    html[data-nav="open"] .gn-scrim,
    html[data-search="open"] .gn-nav-search { animation: none; }
}

/* --- Buttons ---------------------------------------------- */
.gn-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.gn-btn-primary {
    background: var(--accent);
    color: #fff;
}

.gn-btn-primary:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 20px var(--accent-glow);
}

.gn-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-bright);
}

.gn-btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-bright);
    background: var(--bg-elevated);
}

.gn-btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8125rem;
}

.gn-hero-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1.25rem;
    letter-spacing: -0.01em;
}

.gn-hero-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gn-hero-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
}

/* --- Section ---------------------------------------------- */
.gn-section {
    padding: 3.5rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

/* Page body under a hero (releases, trending, company): same width and gutters
   as a section, less top padding because the hero already provides the air.
   Was never defined, so those pages ran edge to edge. */
.gn-container {
    padding: 2rem 2rem 3rem;
    max-width: 1280px;
    margin: 0 auto;
}

.gn-section-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2rem;
}

.gn-section-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-right: auto;
}

.gn-section-meta a { color: var(--accent-cyan); text-decoration: none; }
.gn-section-meta a:hover { text-decoration: underline; }

.gn-section-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.01em;
}

.gn-section-title::after {
    content: '';
    display: block;
    width: 2.5rem;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
    border-radius: 2px;
    margin-top: 0.35rem;
}

.gn-section-link {
    font-size: 0.8125rem;
    color: var(--accent-cyan);
    text-decoration: none;
    margin-left: auto;
    font-weight: 500;
}

.gn-section-link:hover { text-decoration: underline; }

/* --- Game card --------------------------------------------
   Cover, title, one meta line, platform glyphs, one status line (price or
   followers). The card is an article: the link covers cover and text, the
   quick-add button sits over the cover's top-left corner. */
.gn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}
/* minmax(0, …) everywhere: a card's one-line meta must never widen its column */
.gn-grid > * { min-width: 0; }

.gn-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: visible;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    color: inherit;
    display: flex;
    flex-direction: column;
}
.gn-card:hover, .gn-card:focus-within {
    border-color: var(--border-bright);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.gn-card-link { display: flex; flex-direction: column; flex: 1; min-width: 0; color: inherit; text-decoration: none; border-radius: inherit; overflow: hidden; }
.gn-card-link:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

.gn-card-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-elevated);
}
.gn-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gn-card-cover-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 700;
    color: rgba(255,255,255,0.6); text-align: center; padding: 1rem; letter-spacing: 0.04em;
}
.gn-card-soon { position: absolute; top: 0.5rem; right: 0.5rem; padding: 0.2rem 0.5rem; border-radius: var(--radius-md); background: rgba(9, 9, 11, 0.8); border: 1px solid var(--border-bright); color: var(--accent-cyan); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em; backdrop-filter: blur(4px); }

.gn-card-body { padding: 0.75rem 0.875rem 0.875rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; min-width: 0; }
.gn-card-title {
    font-family: 'Rajdhani', sans-serif; font-size: 1.05rem; font-weight: 700; margin: 0; line-height: 1.2; letter-spacing: 0.01em;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em;
}
.gn-card-meta { display: flex; gap: 0.5rem; font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; min-width: 0; overflow: hidden; }
.gn-card-dev { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gn-card-date { flex: none; }
.gn-plat { display: flex; gap: 0.3rem; margin-top: 0.1rem; color: var(--text-secondary); }
.gn-plat-glyph { display: inline-flex; width: 1.35rem; height: 1.35rem; align-items: center; justify-content: center; border-radius: 5px; background: var(--bg-elevated); border: 1px solid var(--border); }
.gn-plat-glyph svg { width: 13px; height: 13px; }
.gn-card-status { margin-top: auto; padding-top: 0.2rem; font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.gn-card-price { font-family: 'Rajdhani', sans-serif; font-size: 1rem; font-weight: 700; color: var(--score-great); }

/* quick add: a round button over the cover, visible on hover/focus (always on touch) */
.gn-card-add {
    position: absolute; top: 0.5rem; left: 0.5rem; z-index: 2;
    width: 2rem; height: 2rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(9, 9, 11, 0.8); border: 1px solid var(--border-bright); color: #fff;
    cursor: pointer; opacity: 0; transition: opacity var(--transition), background var(--transition);
    backdrop-filter: blur(4px);
}
.gn-card-add svg { width: 14px; height: 14px; }
.gn-card:hover .gn-card-add, .gn-card:focus-within .gn-card-add, .gn-card-add.is-set, .gn-card-menu-open .gn-card-add { opacity: 1; }
.gn-card-add:hover { background: var(--accent); border-color: var(--accent); }
.gn-card-add.is-set { background: var(--accent); border-color: var(--accent); }
.gn-card-add:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; opacity: 1; }
.gn-card-add-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: gn-pulse 0.8s ease-in-out infinite alternate; }
.gn-card-add-menu {
    position: absolute; top: 2.9rem; left: 0.5rem; z-index: 3; min-width: 11rem;
    display: flex; flex-direction: column; padding: 0.3rem;
    background: var(--bg-elevated); border: 1px solid var(--border-bright); border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
.gn-card-add-menu button { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.65rem; border: 0; border-radius: 7px; background: none; color: var(--text-primary); font: inherit; font-size: 0.82rem; text-align: left; cursor: pointer; }
.gn-card-add-menu button::before { content: ""; width: 0.9rem; height: 0.9rem; border-radius: 4px; border: 1.5px solid var(--border-bright); flex: none; }
.gn-card-add-menu button.on::before { background: var(--accent); border-color: var(--accent); }
.gn-card-add-menu button:hover { background: var(--bg-card); }
.gn-card-add-menu button:disabled { opacity: 0.6; cursor: wait; }
@media (hover: none) { .gn-card-add { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .gn-card, .gn-card:hover { transform: none; transition: none; }
}

/* --- Score badge ------------------------------------------ */
.gn-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-md);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    border: 2px solid currentColor;
    flex-shrink: 0;
}

.gn-score-great { color: var(--score-great); background: rgba(34, 197, 94, 0.12); }
.gn-score-good  { color: var(--score-good);  background: rgba(132, 204, 22, 0.12); }
.gn-score-mixed { color: var(--score-mixed); background: rgba(234, 179, 8, 0.12); }
.gn-score-poor  { color: var(--score-poor);  background: rgba(249, 115, 22, 0.12); }
.gn-score-bad   { color: var(--score-bad);   background: rgba(239, 68, 68, 0.12); }


/* Links inside running text must not rely on colour alone, and unclassed links
   in hub-page paragraphs must not fall back to the browser's blue. */
.gn-footer-bottom p a, .gn-footer-bottom p a:hover { text-decoration: underline; }
main.gn-container p a:not([class]) { color: var(--accent-cyan); text-decoration: underline; }

/* --- Footer ----------------------------------------------- */
.gn-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 3rem;
}

.gn-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.gn-footer a:hover { color: var(--accent-cyan); }

/* ── Danger button (account deletion, etc.) ─────────────────── */
/* Account page only, kept here: .gn-btn:disabled below must keep winning over .gn-btn-danger:disabled. */
.gn-btn-danger {
    background: #b91c1c;
    color: #fff;
    border: 1px solid #991b1b;
}
.gn-btn-danger:hover:not(:disabled) { background: #dc2626; }
.gn-btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }

@@media (max-width: 640px) {
    .acct-page { padding: 0 1rem; margin: 1rem auto 3rem; }
    .acct-card { padding: 1.25rem; }
    .acct-profile-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .acct-actions { flex-direction: column-reverse; }
    .acct-actions .gn-btn { width: 100%; }
}

.gn-footer-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 2rem 1.75rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.15fr 1fr 1.25fr;   /* brand, browse, tracked lists, collection, sources */
    gap: 2.25rem;
}

.gn-footer-col {
    min-width: 0;
}

.gn-footer-brand { padding-right: 1rem; }

.gn-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.875rem;
}

.gn-footer-logo-mark { flex-shrink: 0; }

.gn-footer-wordmark {
    font-family: 'Rajdhani', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    line-height: 1;
}

.gn-footer-wordmark span {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gn-footer-tagline {
    font-family: 'Rajdhani', system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
    letter-spacing: 0.2px;
}

.gn-footer-blurb {
    margin: 0;
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 32ch;
}

.gn-footer-heading {
    font-family: 'Rajdhani', system-ui, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.gn-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    line-height: 1.4;
}

.gn-footer-hint {
    color: var(--text-muted);
    font-size: 0.7875rem;
    line-height: 1.5;
    padding-top: 0.25rem;
}

/* Data-source attributions read like plain text otherwise — IGDB and ITAD
   terms both call for a clickable link back, so underline these explicitly
   and override the footer-wide text-decoration: none. */
.gn-footer a.gn-footer-attribution {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: var(--border-bright);
}

.gn-footer a.gn-footer-attribution:hover {
    text-decoration-color: var(--accent-cyan);
}

.gn-footer-attribution-logo {
    height: 14px;
    width: auto;
    flex-shrink: 0;
}

.gn-footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1rem 2rem 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
}

.gn-footer-bottom p { margin: 0; }

.gn-footer-disclaimer {
    max-width: 60ch;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: right;
}   /* grids and the scrolling rows already are */
/* Game page only, kept here: the phone rule for .gn-section-header further down must keep winning. */
.gd-shots-header { justify-content: space-between; margin-bottom: 0; }

/* Position badge on hub cards (trending rank). */
.gn-card-rank {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    pointer-events: none;
}
.rl-footnote { color: var(--text-muted); font-size: 0.8rem; text-align: center; margin: 3rem auto 0; max-width: 40rem; }
.rl-footnote a { color: inherit; }
.rl-empty { color: var(--text-secondary); max-width: 40rem; margin: 0 auto; padding: 2rem 0; }

/* A month as a column of days: the date hangs in a rail on the left (the
   calendar spine), cards and the ledger share one left edge on the right. */
/* The date as a calendar leaf: a tile with the day number large and the weekday
   under it. Today gets the accent ring, past days fade, so a month reads at a
   glance. The same tile marks each game in the "most anticipated" strip. */
.rl-date { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 4.25rem; height: 4.25rem; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border-bright); line-height: 1; flex: none; }
.rl-date-num { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 2rem; letter-spacing: -0.02em; color: var(--text-primary); }
.rl-date-wd { font-size: 0.74rem; font-weight: 600; color: var(--accent-cyan); margin-top: 0.15rem; }
.rl-date.is-today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.rl-top-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; }
.rl-top-card { display: flex; gap: 0.75rem; align-items: stretch; padding: 0.6rem; border-radius: var(--radius-md); background: var(--bg-elevated); border: 1px solid var(--border); color: inherit; text-decoration: none; min-width: 0; height: 100%; }
.rl-top-card:hover { border-color: var(--border-bright); background: var(--bg-card); }
.rl-top-card:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.rl-top-cover { width: 72px; height: 96px; object-fit: cover; border-radius: 6px; flex: none; background: var(--bg-card); }
.rl-top-cover-empty { display: flex; align-items: center; justify-content: center; font-family: 'Rajdhani', sans-serif; font-weight: 700; color: var(--text-muted); }
.rl-top-body { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.rl-top-body .rl-date { width: 3rem; height: 3rem; border-radius: 8px; }
.rl-top-body .rl-date-num { font-size: 1.35rem; }
.rl-top-body .rl-date-wd { font-size: 0.62rem; }
.rl-top-name { font-weight: 600; font-size: 0.9rem; line-height: 1.25; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rl-top-meta { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .rl-top-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Release calendar only, kept here: the phone rule for .gn-grid further down must keep its place after this one. */
.rl-split-cards { grid-template-columns: repeat(var(--rl-cards, 1), 12.5rem); }

@media (min-width: 640.02px) and (max-width: 1100px) { .rl-split[style*="--rl-cards:3"] .rl-split-cards { grid-template-columns: repeat(3, minmax(0, 12.5rem)); }
}

@media (max-width: 640px) {
    .rl-top-list { display: flex; overflow-x: auto; gap: 0.6rem; padding-bottom: 0.25rem; scrollbar-width: none; }
    .rl-top-list::-webkit-scrollbar { display: none; }
    .rl-top-list > li { flex: 0 0 78%; }
    .rl-split .rl-split-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rl-split[style*="--rl-cards:1"] .rl-split-cards { grid-template-columns: minmax(0, 1fr); }
}

.gd-summary {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0 0 1.5rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* --- Company card ----------------------------------------- */
.gd-company {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.gd-company:last-child { border-bottom: none; }

/* ============================================================
   GAMES LISTING PAGE  (gl-*)
   ============================================================ */

/* --- Listing Hero ----------------------------------------- */
.gl-hero {
    position: relative;
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(124,58,237,0.28) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 80% 80%, rgba(6,182,212,0.1) 0%, transparent 60%);
    border-bottom: 1px solid var(--border);
}

.gl-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.gl-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.gl-pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    min-height: 2rem; padding: 0.3rem 0.7rem;
    border-radius: 999px; border: 1px solid var(--border-bright);
    background: var(--bg-elevated); color: var(--text-secondary);
    font: inherit; font-size: 0.8125rem; font-weight: 500; line-height: 1.2;
    cursor: pointer; transition: border-color var(--transition), background var(--transition), color var(--transition);
    max-width: 100%;
}
.gl-pill-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-pill-count { font-size: 0.7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.gl-pill:hover { color: var(--text-primary); border-color: var(--accent); }
.gl-pill:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.gl-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.gl-pill.active .gl-pill-count { color: rgba(255, 255, 255, 0.75); }

/* --- Filter search box ------------------------------------ */
.gl-filter-search-wrap { padding: 0 0 0.6rem; }
.gl-filter-search {
    width: 100%;
    height: 2.25rem; padding: 0 0.7rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}
.gl-filter-search::placeholder { color: var(--text-muted); }
.gl-filter-search:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }

/* --- Skeleton loading ------------------------------------- */
.gl-skeleton { pointer-events: none; }

.gl-skeleton-cover {
    aspect-ratio: 3 / 4;
    background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-card) 50%, var(--bg-elevated) 100%);
    background-size: 200% 100%;
    animation: gl-shimmer 1.4s linear infinite;
}

.gl-skeleton-line {
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-card) 50%, var(--bg-elevated) 100%);
    background-size: 200% 100%;
    animation: gl-shimmer 1.4s linear infinite;
}

.gl-skeleton-title { height: 1rem; width: 85%; margin-bottom: 0.4rem; }
.gl-skeleton-sub   { height: 0.75rem; width: 55%; }

/* --- Empty state ------------------------------------------ */
.gl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 5rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.gl-empty p { font-size: 0.9375rem; margin: 0; }

/* --- Pagination ------------------------------------------- */
.gl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.gl-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.625rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-bright);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.8375rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.gl-page-btn:hover:not(:disabled) {
    color: var(--text-primary);
    border-color: var(--accent);
    background: rgba(124,58,237,0.1);
}

.gl-page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

.gl-page-btn:disabled,
.gl-page-btn[aria-disabled="true"] {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Anchor form of pagination controls — same look, no underline. */
a.gl-page-btn            { text-decoration: none; }
a.gl-page-btn:hover      { text-decoration: none; }

.gl-page-ellipsis {
    color: var(--text-muted);
    padding: 0 0.25rem;
    font-size: 0.9rem;
    line-height: 2.25rem;
}

/* ============================================================
   RESPONSIVE — MOBILE PORTRAIT  (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {

    /* The header's own rules, phone ones included, are in the "Site header" block. */

    /* ── Buttons ─────────────────────────────────────────── */
    .gn-btn { padding: 0.4rem 0.875rem; font-size: 0.8rem; }
    .gn-btn-sm { padding: 0.3rem 0.65rem; font-size: 0.775rem; }

    /* ── Card grid: 2 columns on phone ───────────────────── */
    .gn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }

    /* ── Footer ──────────────────────────────────────────── */
    .gn-footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 2rem 1.25rem 1.5rem;
    }
    .gn-footer-brand { grid-column: 1 / -1; padding-right: 0; }
    .gn-footer-bottom {
        padding: 1rem 1.25rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .gn-footer-disclaimer { text-align: left; }

    /* Description/summary: readable size on mobile */
    .gd-summary     { font-size: 0.95rem; line-height: 1.65; }

    /* ===================================================== */
    /* LISTING PAGE                                           */
    /* ===================================================== */

    /* Hero */
    .gl-hero       { padding: 1.5rem 1rem 1.25rem; }

    @keyframes gl-sheet-up {
        from { transform: translateY(18px); opacity: 0; }
        to   { transform: translateY(0);     opacity: 1; }
    }

    /* Tap-friendly filter items on touch screens */
    .gl-pill { min-height: 2.5rem; padding: 0.45rem 0.9rem; font-size: 0.9rem; }
    .gl-filter-search { padding: 0.625rem 0.75rem; font-size: 16px; }

    /* Pagination: compact */
    .gl-pagination { gap: 0.25rem; margin-top: 1.75rem; }
    .gl-page-btn   { min-width: 2rem; height: 2rem; padding: 0 0.5rem; font-size: 0.775rem; }
    .gl-page-ellipsis { line-height: 2rem; }

    /* Empty state */
    .gl-empty { padding: 3rem 1rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTH MODAL — one column, the heading in the display face, inputs tall enough
   to hit, social sign-in as full rows. Under 520px it becomes a bottom sheet.
   ═══════════════════════════════════════════════════════════════════════════ */

.auth-backdrop {
    position: fixed; inset: 0;
    background: rgba(5, 5, 8, 0.72);
    backdrop-filter: blur(4px);
    z-index: 900;
    animation: auth-fade-in 0.18s ease;
}

.auth-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 901;
    width: min(440px, calc(100vw - 2rem));
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: 18px;
    padding: 1.25rem 1.75rem 1.75rem;
    animation: auth-slide-up 0.22s ease;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    outline: none;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
@media (prefers-reduced-motion: reduce) { .auth-backdrop, .auth-modal { animation: none; }
}

.auth-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.auth-wordmark { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text-primary); }
.auth-wordmark span { color: var(--accent-cyan); }
.auth-modal-close {
    background: none; border: 1px solid transparent; cursor: pointer;
    color: var(--text-muted); width: 2.1rem; height: 2.1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: color var(--transition), background var(--transition);
}
.auth-modal-close:hover { color: var(--text-primary); background: var(--bg-elevated); }
.auth-modal-close:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

/* Sign in | Create account */
.auth-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg-elevated); border: 1px solid var(--border); margin-bottom: 1.25rem; }
.auth-mode { padding: 0.5rem 0; border: 0; border-radius: 999px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.auth-mode.active { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.auth-mode:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

.auth-title { font-family: 'Rajdhani', sans-serif; font-size: 1.75rem; font-weight: 700; line-height: 1.1; margin: 0 0 0.3rem; color: var(--text-primary); }
.auth-sub { margin: 0 0 1.1rem; font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }

/* form */
.auth-form { display: flex; flex-direction: column; gap: 0.9rem; }
.auth-field { display: flex; flex-direction: column; gap: 0.35rem; }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.auth-label { font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); }
.auth-hint { font-weight: 400; color: var(--text-muted); font-size: 0.75rem; }
.auth-hint::before { content: "· "; }
.auth-input {
    padding: 0 0.9rem; height: 2.75rem;
    background: var(--bg-elevated); border: 1px solid var(--border-bright);
    border-radius: 10px; color: var(--text-primary);
    font: inherit; font-size: 0.95rem; outline: none; transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%; box-sizing: border-box;
}
.auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.auth-input:disabled { opacity: 0.6; }
.auth-input::placeholder { color: var(--text-muted); }
.auth-pw { position: relative; }
.auth-pw .auth-input { padding-right: 3.6rem; }
.auth-pw-toggle { position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 0.3rem 0.5rem; border-radius: 6px; color: var(--text-muted); font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.auth-pw-toggle:hover { color: var(--text-primary); background: var(--bg-card); }
.auth-pw-toggle:focus-visible { outline: 2px solid var(--accent-cyan); }

.auth-error {
    margin: 0;
    background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px; padding: 0.6rem 0.85rem;
    color: #fca5a5; font-size: 0.8375rem; line-height: 1.45;
}
.auth-notice { margin: 0; background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.4); color: #bbf7d0; border-radius: 10px; padding: 0.6rem 0.85rem; font-size: 0.85rem; line-height: 1.45; }

.auth-submit {
    margin-top: 0.15rem;
    height: 2.9rem; padding: 0 1.5rem;
    background: var(--accent); border: none; border-radius: 10px;
    color: #fff; font: inherit; font-size: 0.95rem; font-weight: 700;
    cursor: pointer; transition: background var(--transition), opacity var(--transition);
    width: 100%;
}
.auth-submit:hover:not(:disabled) { background: #8b5cf6; }
.auth-submit:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.auth-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* divider */
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0; color: var(--text-muted); font-size: 0.78rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* social sign-in: one full-width row per provider */
.auth-social { display: flex; flex-direction: column; gap: 0.5rem; }
.auth-social-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    height: 2.75rem; padding: 0 1rem;
    background: var(--bg-elevated); border: 1px solid var(--border-bright);
    border-radius: 10px; color: var(--text-primary);
    font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}
.auth-social-btn:hover { background: var(--bg-card); }
.auth-social-btn:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.auth-google:hover   { border-color: #4285f4; }
.auth-discord:hover  { border-color: #5865f2; }
.auth-facebook:hover { border-color: #1877f2; }
.auth-twitter:hover  { border-color: #e7e9ea; }

.auth-consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.45; cursor: pointer; }
.auth-consent input { margin-top: 0.2rem; accent-color: var(--accent); flex: none; width: 1rem; height: 1rem; }
.auth-consent a, .auth-consent-note a { color: var(--accent-cyan); }
.auth-consent-note { margin: 0.9rem 0 0; font-size: 0.75rem; color: var(--text-muted); line-height: 1.45; text-align: center; }

.auth-link { background: none; border: none; color: var(--accent-cyan); cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 600; padding: 0; }
.auth-link:hover { text-decoration: underline; }
.auth-link:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; border-radius: 3px; }
.auth-back { align-self: center; margin-top: 0.25rem; }
.auth-text { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; margin: 0; }
.auth-page { max-width: 32rem; }
.auth-page .gn-section-title { margin-bottom: 1.25rem; }

@media (max-width: 520px) {
    .auth-modal {
        top: auto; bottom: 0; left: 0; transform: none;
        width: 100vw; max-height: calc(100vh - 2.5rem);
        border-radius: 18px 18px 0 0; border-bottom: 0;
        padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
        animation: auth-sheet-up 0.22s ease;
    }
    @keyframes auth-sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ── User avatar / dropdown in nav ──────────────────────────────────────── */
.gn-user-menu {
    position: relative; display: flex; align-items: center;
    gap: 0.5rem; cursor: pointer; padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md); transition: background var(--transition);
}
.gn-user-menu:hover { background: var(--bg-elevated); }

.gn-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--border-bright);
    flex-shrink: 0;
}
.gn-username {
    font-size: 0.875rem; font-weight: 600; color: var(--text-primary);
    max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.gn-user-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0;
    background: var(--bg-card); border: 1px solid var(--border-bright);
    border-radius: var(--radius-md); min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45); z-index: 200;
    padding: 0.375rem 0; animation: auth-fade-in 0.12s ease;
}
.gn-user-dropdown-email {
    padding: 0.5rem 1rem; font-size: 0.78rem; color: var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gn-dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 0.25rem 0; }
.gn-dropdown-item {
    display: block; width: 100%; padding: 0.5rem 1rem;
    background: none; border: none; text-align: left;
    color: var(--text-secondary); font-size: 0.875rem;
    cursor: pointer; transition: background var(--transition), color var(--transition);
    text-decoration: none;
    font-family: inherit;
    box-sizing: border-box;
}
.gn-dropdown-item:hover { background: var(--bg-elevated); color: var(--text-primary); }

.gn-btn:disabled { opacity: 0.55; cursor: progress; }

/* The catalogue API did not answer (page answers 503 while prerendering). */
.gn-unavailable { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 50vh; gap: 0.75rem; padding: 2rem 1rem; }
.gn-unavailable h1 { font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; margin: 0; color: var(--text-primary); }
.gn-unavailable p { margin: 0; color: var(--text-muted); max-width: 44ch; }

/* --- Sections --------------------------------------------- */
/* Home page only, kept here: the tablet and phone rules for .gn-section further down must keep winning. */
.gh-section { padding-top: 2.75rem; padding-bottom: 1rem; }
.gh-section:last-of-type { padding-bottom: 4rem; }

/* ============================================================
   INDEX LISTING PAGES — Platforms / Genres / Companies / People
   ============================================================ */

.li-summary {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

/* ============================================================
   RESPONSIVE — HOMEPAGE  (tablet & mobile)
   ============================================================ */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
    .gn-section { padding: 2.5rem 1.25rem; }
    .gn-container { padding: 1.5rem 1.25rem 2.5rem; }
}

/* Mobile (≤ 640px) */
@media (max-width: 640px) {
    /* Section spacing */
    .gn-section { padding: 2rem 0.875rem; }
    .gn-container { padding: 1.25rem 1rem 2rem; }
    .gn-hero-subtitle { font-size: 0.95rem; margin-bottom: 1.5rem; }
    .gh-section { padding-top: 2rem; }
    .gh-section .gn-section-meta { display: none; }

    /* Section header */
    .gn-section-header { gap: 0.5rem; margin-bottom: 1.25rem; }
    .gn-section-title  { font-size: 1.25rem; }
    .gn-section-link   { font-size: 0.75rem; }

    /* Listing index pages */
    .li-summary { font-size: 0.78rem; margin-bottom: 1rem; }

    /* Card cover on very narrow screens */
    .gn-card-title { font-size: 0.9rem; }
    .gn-card-meta  { font-size: 0.75rem; }
    .gn-card-body  { padding: 0.625rem; gap: 0.375rem; }
}

@media (max-width: 380px) {
    .gn-hero-title { font-size: clamp(1.9rem, 9vw, 2.5rem); }
}

/* FocusOnNavigate moves focus to the h1 after every navigation; Chrome draws
   its default ring on a programmatically focused heading. Keyboard users never
   tab to a heading, so the ring carries no information there. */
h1:focus,
h1[tabindex]:focus-visible { outline: none; }   /* beats the [tabindex] ring below */

/* Buttons, inputs and selects do not inherit the page font by default. */
button, input, select, textarea { font: inherit; }

/* Keyboard focus, same ring everywhere; mouse clicks do not show it. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
.gn-card:focus-visible { outline-offset: 0; border-radius: var(--radius-lg); }

/* Prevent any accidental horizontal overflow. `clip` (not `hidden`) keeps
   the root as the scroll container, so position: sticky on the navbar and
   the listing sidebar keeps working. */
html, body { overflow-x: clip; }
img, video, iframe { max-width: 100%; height: auto; }

/* ============================================================
   SEARCH FORM (gs-*) — SiteSearch.razor + wwwroot/js/search.js
   A field with a real Search button, in the header (also the phone
   sheet) and in the home hero. Static HTML: see SiteSearch.razor.
   ============================================================ */

.gs {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    border-radius: 10px;
    transition: box-shadow 0.15s ease;
}

.gs:focus-within { box-shadow: 0 0 0 3px var(--accent-cyan-glow); }

.gs-field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.gs:focus-within .gs-field { border-color: var(--accent-cyan); background: var(--bg-card); }

.gs-icon {
    position: absolute;
    left: 0.8rem;
    color: var(--text-muted);
    pointer-events: none;
}

.gs-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    padding: 0 0.5rem 0 2.5rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.9rem;
    -webkit-appearance: none;
    appearance: none;
}

.gs-input::placeholder { color: var(--text-muted); }
/* The field shows focus (border and glow above); the input's own ring would
   draw a second, smaller box inside it. */
.gs-input:focus-visible { outline: none; }
.gs-input::-webkit-search-cancel-button,
.gs-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }

/* "/" focuses the search; shown only where there is a keyboard and nothing typed. */
.gs-key {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    margin-right: 0.5rem;
    padding: 0 0.3rem;
    border: 1px solid var(--border-bright);
    border-bottom-width: 2px;
    border-radius: 5px;
    color: var(--text-muted);
    font: 600 0.72rem/1 'Inter', 'Inter Fallback', 'Inter Fallback Roboto', system-ui, sans-serif;
}

.gs-focus .gs-key,
.gs-has-text .gs-key { display: none; }

.gs-clear {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-right: 0.35rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.gs-clear[hidden] { display: none; }
.gs-clear:hover { color: var(--text-primary); background: var(--bg-base); }
.gs-clear:focus-visible { outline: 2px solid var(--accent-cyan); }

.gs-submit {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.95rem;
    border: 0;
    border-radius: 0 10px 10px 0;
    background: var(--accent-cyan);
    color: #031b22;                      /* 7:1 on the cyan */
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.15s ease;
}

.gs-submit:hover { background: #22d3ee; }
.gs-submit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.gs-back { display: none; }

/* --- Suggestions ------------------------------------------ */
.gs-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 5;
    max-height: min(34rem, 72vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.375rem;
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.gs-panel[hidden] { display: none; }
.gs-panel[aria-busy="true"] .gs-row { opacity: 0.55; }
.gs-header .gs-panel { min-width: 24rem; }

.gs-note {
    padding: 1rem 0.875rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.gs-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-md);
    color: inherit;
    text-decoration: none;
}

.gs-row:hover,
.gs-row.active,
.gs-all:hover,
.gs-all.active { background: var(--bg-elevated); }

.gs-row.active,
.gs-all.active { box-shadow: inset 2px 0 0 var(--accent-cyan); }

.gs-cover {
    width: 36px;
    height: 48px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-base);
}

.gs-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

.gs-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font: 700 0.75rem 'Rajdhani', sans-serif;
}

.gs-meta { display: flex; flex-direction: column; min-width: 0; }

.gs-title {
    overflow: hidden;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gs-sub {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gs-year {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.gs-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.25rem;
    padding: 0.7rem 0.75rem;
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.gs-all-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gs-all-key {
    flex: none;
    padding: 0.1rem 0.4rem;
    border: 1px solid var(--border-bright);
    border-bottom-width: 2px;
    border-radius: 5px;
    color: var(--text-muted);
    font: 600 0.68rem/1.3 'Inter', 'Inter Fallback', 'Inter Fallback Roboto', system-ui, sans-serif;
}

@media (hover: none) {
    .gs-key,
    .gs-all-key { display: none; }
}

/* --- Home hero: the same form, larger ---------------------- */
.gs-hero { border-radius: 14px; }
.gs-hero .gs-field { border-radius: 14px 0 0 14px; }
.gs-hero .gs-icon { left: 1rem; }
.gs-hero .gs-input { height: 50px; padding-left: 2.9rem; font-size: 1rem; }
.gs-hero .gs-submit { padding: 0 1.3rem; border-radius: 0 14px 14px 0; font-size: 0.95rem; }

/* --- The narrowest phones: the button keeps its icon, drops the word */
@media (max-width: 379.98px) {
    .gs-header .gs-submit { padding: 0 0.8rem; }
    .gs-header .gs-submit-label { display: none; }
}

/* --- Phones: the header form is the sheet ------------------ */
@media (max-width: 760px) {
    .gs-header {
        flex-wrap: wrap;
        align-content: flex-start;
        height: 100%;
        border-radius: 0;
    }
    .gs-header:focus-within { box-shadow: none; }

    .gs-header .gs-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 44px;
        height: 44px;
        margin-right: 0.125rem;
        padding: 0;
        border: 0;
        border-radius: var(--radius-md);
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        touch-action: manipulation;
    }

    .gs-header .gs-field { flex: 1 1 0; height: 44px; }
    .gs-header .gs-input { height: 42px; font-size: 16px; }   /* 16px: no zoom on focus in iOS */
    .gs-header .gs-submit { height: 44px; }

    .gs-header .gs-panel {
        position: static;
        flex: 1 1 100%;
        min-width: 0;
        max-height: calc(100vh - 60px);
        max-height: calc(100dvh - 60px);
        margin-top: 0.5rem;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .gs-header .gs-row { padding: 0.55rem 0.5rem; }
    .gs-hero .gs-input { font-size: 16px; }
    .gs-hero .gs-submit { padding: 0 1rem; }
}

.dl-chip {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

.dl-chip:hover {
    color: var(--text-primary);
    border-color: var(--border-bright);
}

.dl-chip.active {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--accent);
    color: #c4b5fd;
}

/* --- Deal card: the game is the card, the store is the button --------- */
.dl-card { display: flex; flex-direction: column; cursor: default; overflow: hidden; }
.dl-card .gn-card-cover { position: relative; }
.dl-cover-link { display: block; }
/* Store banners are landscape: shown whole over a blurred copy of themselves
   instead of cropped to the portrait frame (titles used to lose their first letters). */
.dl-cover-banner { background-color: var(--bg-elevated); background-size: cover; background-position: center; }
.dl-cover-banner::before { content: ""; position: absolute; inset: 0; background: inherit; filter: blur(16px) brightness(0.55); transform: scale(1.2); }
.dl-cover-banner img { position: relative; object-fit: contain; }
.dl-card .gn-card-body { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.dl-title { display: block; color: inherit; text-decoration: none; }
.dl-title:hover { color: var(--accent-cyan); }
.dl-meta { display: flex; gap: 0.6rem; flex-wrap: wrap; min-height: 1.1em; }
.dl-buy {
    margin-top: auto;
    display: flex; align-items: center; justify-content: center; gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-bright);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.85rem; font-weight: 600;
    text-decoration: none;
}
.dl-buy:hover { border-color: var(--accent); background: rgba(124, 58, 237, 0.15); }
.dl-buy:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.dl-buy-ext { font-size: 0.8em; color: var(--text-muted); }
.dl-card-free .dl-buy { background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.5); }
.dl-card-free .dl-discount-badge { background: linear-gradient(135deg, #fde047 0%, #ca8a04 100%); color: #422006; box-shadow: 0 4px 16px rgba(250, 204, 21, 0.35); }
.gn-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dl-discount-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    color: #052e16;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-md);
    letter-spacing: 0.02em;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

.dl-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: 'Rajdhani', sans-serif;
}

.dl-price-new {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--score-great);
    letter-spacing: 0.01em;
}

.dl-price-old {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.dl-ending {
    color: var(--score-poor);
    font-size: 0.725rem;
    font-weight: 500;
}

@media (max-width: 640px) {
    .dl-chip  { font-size: 0.775rem; padding: 0.3rem 0.7rem; }
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes gg-pulse { 0% { box-shadow:0 0 0 0 rgba(239,68,68,.6); } 70%, 100% { box-shadow:0 0 0 .4rem rgba(239,68,68,0); } }
}

/* ── Deals: what an hour costs ── */
.dl-value { margin-top:.2rem; font-size:.74rem; color:var(--text-muted); font-variant-numeric:tabular-nums; }

/* ============================================================
   PICKED FOR YOU (RecommendationsRail)
   The signed-in visitor's picks at the foot of a page, before the footer.
   Same width and gutters as .gn-container; a hairline above sets it apart
   from the page it follows. Desktop: five columns, so 5 or 10 picks fill
   whole rows. Phone: one row that scrolls sideways and snaps, the next card
   peeking, so ten picks never become five rows of two before the footer.
   The one line that is only here: the card's status line carries the reason
   ("Similar to Hades") in the site's "find" colour.
   ============================================================ */
.rc {
    border-top: 1px solid var(--border);
    margin-top: 1rem;
    padding-top: 2.5rem;
}
.rc .gn-card-status { color: var(--accent-cyan); }
.rc-head { align-items: flex-start; }
.rc-head .gn-section-link { white-space: nowrap; flex: none; padding-top: 0.35rem; }
.rc-head-text { min-width: 0; }
.rc-sub {
    margin: 0.6rem 0 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 60ch;
}
.rc-rail {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
}
.rc-sentinel { height: 1px; }       /* the trigger: nothing to see, something to reach */
.rc-note { padding-top: 2rem; padding-bottom: 2rem; }
.rc-invite {
    margin: 0;
    max-width: 62ch;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}
.rc-invite strong { color: var(--text-primary); font-weight: 600; }

@media (max-width: 900px) {
    .rc { padding-top: 2rem; }
    /* Full-bleed row: the gutters become the scroll padding, so the first
       card lines up with the heading and the last one can reach the edge. */
    .rc-rail {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 1.25rem;
        margin: 0 -1.25rem;
        padding: 0.25rem 1.25rem 0.75rem;
        scrollbar-width: thin;
        scrollbar-color: var(--border-bright) transparent;
    }
    .rc-rail::-webkit-scrollbar { height: 4px; }
    .rc-rail::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }
    .rc-rail > * { flex: 0 0 44%; scroll-snap-align: start; }
    .rc-rail .gn-card:hover { transform: none; }
}
@media (max-width: 640px) {
    .rc-rail { scroll-padding-inline: 1rem; margin: 0 -1rem; padding: 0.25rem 1rem 0.75rem; }
    .rc-rail > * { flex-basis: 46%; }
}
@media (prefers-reduced-motion: reduce) {
    .rc-rail { scroll-behavior: auto; }
}


@keyframes gn-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes gn-slide-down {
    from { transform: translateY(-8px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes gn-pulse { from { opacity: 0.3; } to { opacity: 1; } }

@keyframes gl-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

@keyframes auth-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes auth-slide-up { from { opacity: 0; transform: translate(-50%, calc(-50% + 16px)); }
                           to   { opacity: 1; transform: translate(-50%, -50%); } }
