/* ============================================================
   GAMING THEME — Design System
   ============================================================ */

/* --- Fonts ------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

/* --- 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:     #52525b;

    --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', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* --- Navbar ----------------------------------------------- */
.gn-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 2rem;
    height: 60px;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.gn-nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    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-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); }

.gn-nav-links {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.gn-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

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

.gn-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

/* --- Nav burger + mobile drawer --------------------------- */
.gn-nav-burger {
    display: none;                /* hidden on desktop */
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.gn-nav-burger:hover,
.gn-nav-burger[aria-expanded="true"] {
    color: var(--text-primary);
    border-color: var(--border-bright);
    background: var(--bg-elevated);
}

.gn-nav-drawer-backdrop {
    position: fixed;
    inset: 60px 0 0 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 90;
    animation: gn-fade-in 0.15s ease;
}

.gn-nav-drawer {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    animation: gn-slide-down 0.18s ease;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.gn-nav-drawer-link {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

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

@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; }
}

/* --- 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;
}

/* --- Hero ------------------------------------------------- */
.gn-hero {
    position: relative;
    padding: 5rem 2rem 4rem;
    text-align: center;
    overflow: hidden;
}

.gn-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(124, 58, 237, 0.35) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 80% 60%, rgba(6, 182, 212, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.gn-hero-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.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;
}

/* --- Search bar ------------------------------------------- */
.gn-search {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
}

.gn-search-input {
    width: 100%;
    padding: 0.875rem 1.25rem 0.875rem 3rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.gn-search-input::placeholder { color: var(--text-muted); }

.gn-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}

.gn-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* --- Stats row -------------------------------------------- */
.gn-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}

.gn-stat-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.gn-stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- Section ---------------------------------------------- */
.gn-section {
    padding: 3.5rem 2rem;
    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 -------------------------------------------- */
.gn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.gn-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.gn-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-bright);
}

.gn-card-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

/* Templates render bare <img> inside .gn-card-cover — descendant selector so
   ITAD banner thumbnails fill the 3:4 cover tile, not just the top strip. */
.gn-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gn-card:hover .gn-card-cover img { transform: scale(1.04); }

.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-score {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.gn-card-body {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.gn-card-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.gn-card-developer {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gn-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: auto;
}

/* --- 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-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.4rem;
    border-radius: var(--radius-lg);
}

.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); }

/* --- Tag / Badge ------------------------------------------ */
.gn-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.7375rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
}

.gn-tag-genre {
    background: rgba(124, 58, 237, 0.18);
    color: #c4b5fd;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.gn-tag-theme {
    background: rgba(6, 182, 212, 0.12);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.gn-tag-platform {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-bright);
    font-size: 0.7rem;
    letter-spacing: 0.03em;
}

.gn-tag-mode {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* --- Featured game (horizontal card) ---------------------- */
.gn-featured {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
}

.gn-featured:hover {
    border-color: var(--border-bright);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.gn-featured-cover {
    position: relative;
    overflow: hidden;
}

.gn-featured-cover-placeholder {
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
}

.gn-featured-body {
    padding: 2rem 2rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.gn-featured-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-cyan);
}

.gn-featured-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
}

.gn-featured-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 480px;
}

.gn-featured-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- Design System Swatches ------------------------------- */
.gn-swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.gn-swatch {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.gn-swatch-color {
    height: 56px;
}

.gn-swatch-label {
    padding: 0.4rem 0.6rem;
    background: var(--bg-elevated);
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: 'Inter', monospace;
}

/* --- Divider ---------------------------------------------- */
.gn-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* --- 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); }

/* ── Legal pages (Terms, Privacy) ───────────────────────────── */
.legal-page {
    max-width: 780px;
    margin: 2rem auto 4rem;
    padding: 0 2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9375rem;
}

.legal-page section { margin-top: 2.5rem; }
.legal-page section:first-of-type { margin-top: 1.5rem; }

.legal-page h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    letter-spacing: 0.3px;
}

.legal-page h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
}

.legal-page p  { margin: 0 0 0.75rem; }
.legal-page ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }
.legal-page li { margin-bottom: 0.35rem; }
.legal-page a  {
    color: var(--accent-cyan);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal-page a:hover { color: var(--text-primary); }

.legal-notice {
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    margin: 1.5rem 0 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.legal-todo {
    background: var(--bg-elevated);
    border-left: 3px solid var(--accent-cyan);
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.875rem;
}
.legal-table th,
.legal-table td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.85rem;
    text-align: left;
    vertical-align: top;
    color: var(--text-secondary);
}
.legal-table th {
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.3px;
}
.legal-table td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.legal-table td:nth-child(2) { white-space: nowrap; }

/* ── Danger button (account deletion, etc.) ─────────────────── */
.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; }

/* ── Account settings page ──────────────────────────────────── */
.acct-page {
    max-width: 720px;
    margin: 2rem auto 4rem;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.acct-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.75rem 1.5rem;
}

.acct-card-head { margin-bottom: 1.25rem; }

.acct-card-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
    letter-spacing: 0.3px;
}

.acct-card-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.45;
}

.acct-card-danger { border-color: rgba(185, 28, 28, 0.45); }

.acct-profile-row {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.acct-profile-meta { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }

.acct-kv {
    display: flex;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.acct-kv strong {
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acct-msg {
    border-radius: var(--radius-md);
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}
.acct-msg-ok {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.acct-warning {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.acct-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* Pending-deletion banner — red tint so the user can't miss that their
   account is on its way out. Appears above everything else on the page so
   the Cancel button is the first interactive control they encounter. */
.acct-pending-banner {
    background: rgba(185, 28, 28, 0.1);
    border: 1px solid rgba(185, 28, 28, 0.45);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    color: var(--text-secondary);
}

.acct-pending-head {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.acct-pending-head > svg {
    color: #fca5a5;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.acct-pending-head strong { color: #fca5a5; display: block; }

.acct-pending-head p {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
}
.acct-pending-head p strong { color: var(--text-primary); display: inline; }

.acct-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

@@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 1fr 1.25fr;
    gap: 2.5rem;
}

.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;
}

/* --- Facet index (listing page internal linking) ---------- */
.gl-facet-index {
    max-width: 1280px;
    margin: 2rem auto 0;
    padding: 2rem 1.25rem;
    border-top: 1px solid var(--border);
}

.gl-facet-index-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
    letter-spacing: -0.01em;
}

.gl-facet-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem 2.5rem;
}

.gl-facet-index-heading {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 0.65rem;
}

.gl-facet-index-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 1.25rem;
}

.gl-facet-index-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    break-inside: avoid;
    padding: 0.22rem 0;
}

.gl-facet-index-list a {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gl-facet-index-list a:hover { color: var(--accent); }

.gl-facet-index-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
    .gl-facet-index-list { columns: 1; }
}

/* ============================================================
   GAME DETAIL PAGE
   ============================================================ */

/* --- Backdrop hero ---------------------------------------- */
.gd-backdrop {
    position: relative;
    height: 340px;
    overflow: hidden;
}

@media (min-width: 1440px) {
    .gd-backdrop { height: 400px; }
}

.gd-backdrop-art {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    filter: blur(2px) brightness(0.45) saturate(1.2);
    transform: scale(1.05);
}

.gd-backdrop-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,  rgba(9,9,11,0.3) 0%, rgba(9,9,11,0.0) 30%, rgba(9,9,11,0.85) 80%, #09090b 100%),
        linear-gradient(to right,   rgba(9,9,11,0.8) 0%, transparent 60%);
}

.gd-backdrop-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 2rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 2rem;
}

/* --- Cover art -------------------------------------------- */
.gd-cover-wrap {
    flex-shrink: 0;
    width: 160px;
    position: relative;
    z-index: 2;
}

.gd-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-bright);
    box-shadow: 0 24px 64px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.06);
    overflow: hidden;
    display: block;
}

.gd-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.04em;
}

/* --- Header info ------------------------------------------ */
.gd-header-info {
    flex: 1;
    padding-bottom: 0.5rem;
    min-width: 0;
}

.gd-breadcrumb {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.gd-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.gd-breadcrumb a:hover { color: var(--text-secondary); }

.gd-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.05;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.gd-tagline {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.75rem;
}

.gd-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.gd-meta-sep { color: var(--text-muted); }

.gd-meta-developer { color: var(--accent-cyan); font-weight: 500; }

/* --- Score group ------------------------------------------ */
.gd-scores {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.gd-score-block {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.gd-score-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.3;
}

.gd-score-count {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.gd-score-sep {
    width: 1px;
    height: 2.5rem;
    background: var(--border-bright);
}

/* --- Content layout --------------------------------------- */
.gd-body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    /* Wrap long words / URLs inside descriptions, storylines, meta rows
       so text never pushes the grid or flex parent wider than its track. */
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Tab nav and tab content both align with the body edge — no indent.
   Cover protrusion (16px) is cleared vertically by .gd-tabs-offset. */
.gd-offset {
    padding-left: 0;
}

/* --- Tab navigation --------------------------------------- */
.gd-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.gd-tab {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    margin-bottom: -1px;
}

.gd-tab:hover { color: var(--text-secondary); }

.gd-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

/* --- Two-column layout ------------------------------------ */
.gd-columns {
    display: grid;
    /* minmax(0, 1fr) prevents the main column from expanding past its share
       when content (long words, URLs) would otherwise push the sidebar off-screen. */
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2.5rem;
    align-items: start;
}

.gd-columns > * { min-width: 0; }

/* --- Summary / description -------------------------------- */
.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;
}

.gd-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.8;
    overflow-wrap: break-word;
    word-break: break-word;
}

.gd-description p { margin: 0 0 1rem; }

.gd-read-more {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

/* --- Screenshots ------------------------------------------ */
.gd-screenshots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.gd-screenshot {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.gd-screenshot:hover { border-color: var(--border-bright); transform: scale(1.02); }

.gd-screenshot-placeholder {
    width: 100%;
    height: 100%;
}

.gd-screenshot-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gd-screenshot:hover .gd-screenshot-overlay { opacity: 1; }

/* --- Credits --------------------------------------------- */
.gd-credits {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

.gd-credit-group-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.gd-credit-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gd-credit-person {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.gd-credit-person:hover { border-color: var(--border-bright); background: var(--bg-card); }

.gd-credit-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    color: #fff;
}

.gd-credit-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.gd-credit-role {
    font-size: 0.775rem;
    color: var(--text-muted);
}

/* --- Related games (horizontal scroll) -------------------- */
.gd-related-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-bright) transparent;
    margin-top: 1.5rem;
}

.gd-related-scroll::-webkit-scrollbar { height: 4px; }
.gd-related-scroll::-webkit-scrollbar-track { background: transparent; }
.gd-related-scroll::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }

.gd-related-card {
    flex: 0 0 155px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.gd-related-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-3px);
}

.gd-related-cover {
    aspect-ratio: 3 / 4;
    position: relative;
}

.gd-related-body {
    padding: 0.625rem;
}

.gd-related-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gd-related-year {
    font-size: 0.7375rem;
    color: var(--text-muted);
}

/* --- Sidebar cards ---------------------------------------- */
.gd-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.gd-attribution {
    margin: 0.75rem 0 0;
    padding: 0.5rem 0.25rem 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

.gd-attribution a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: var(--border-bright);
    transition: color 0.15s ease;
}

.gd-attribution a:hover { color: var(--accent-cyan); }

.gd-sidebar-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.gd-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.8375rem;
}

.gd-detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.gd-detail-row:first-child { padding-top: 0; }

.gd-detail-key { color: var(--text-muted); flex-shrink: 0; }
.gd-detail-val { color: var(--text-primary); text-align: right; font-weight: 500; }

/* --- Platform releases ------------------------------------ */
.gd-platform-release {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.8375rem;
}

.gd-platform-release:last-child { border-bottom: none; padding-bottom: 0; }
.gd-platform-release:first-child { padding-top: 0; }

.gd-platform-name { font-weight: 500; color: var(--text-primary); }
.gd-platform-date { color: var(--text-muted); font-size: 0.8rem; }

/* --- 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; }
.gd-company:hover .gd-company-name { color: var(--accent-cyan); }

.gd-company-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    border: 1px solid var(--border-bright);
    color: #fff;
}

.gd-company-name { font-size: 0.875rem; font-weight: 500; }
.gd-company-role { font-size: 0.75rem; color: var(--text-muted); }

/* --- External link ---------------------------------------- */
.gd-ext-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8375rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.gd-ext-link:hover {
    border-color: var(--border-bright);
    color: var(--text-primary);
    background: var(--bg-card);
}

.gd-ext-icon { display: flex; align-items: center; flex-shrink: 0; opacity: 0.85; transition: opacity var(--transition); }
.gd-ext-text  { flex: 1; }
.gd-ext-link:hover .gd-ext-icon { opacity: 1; }

/* Brand accent colours on the icon */
.gd-ext-link--steam      .gd-ext-icon { color: #1b9bcc; }
.gd-ext-link--epicgames  .gd-ext-icon { color: #2eff7a; }
.gd-ext-link--gog        .gd-ext-icon { color: #86328a; }
.gd-ext-link--youtube    .gd-ext-icon { color: #ff0000; }
.gd-ext-link--twitch     .gd-ext-icon { color: #9146ff; }
.gd-ext-link--twitter    .gd-ext-icon { color: #e7e9ea; }
.gd-ext-link--facebook   .gd-ext-icon { color: #1877f2; }
.gd-ext-link--instagram  .gd-ext-icon { color: #e1306c; }
.gd-ext-link--reddit     .gd-ext-icon { color: #ff4500; }
.gd-ext-link--discord    .gd-ext-icon { color: #5865f2; }
.gd-ext-link--itch       .gd-ext-icon { color: #fa5c5c; }
.gd-ext-link--official   .gd-ext-icon { color: var(--accent); }

/* --- Rating badge ----------------------------------------- */
.gd-rating-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid var(--border-bright);
    border-radius: var(--radius-md);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

.gd-rating-badge .rating-system { font-size: 0.55rem; letter-spacing: 0.05em; color: var(--text-muted); }
.gd-rating-badge .rating-value  { font-size: 1.1rem; line-height: 1; }

/* ============================================================
   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-search-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

.gl-search-form .gn-search { flex: 1; margin: 0; }

/* --- Active filter chips bar ------------------------------ */
.gl-chips-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 2rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.gl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1;
}

.gl-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-xl);
    background: rgba(124, 58, 237, 0.18);
    border: 1px solid rgba(124, 58, 237, 0.35);
    color: #c4b5fd;
    font-size: 0.775rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.gl-chip:hover { background: rgba(124, 58, 237, 0.28); border-color: rgba(124,58,237,0.55); }
.gl-chip span  { color: #a78bfa; font-size: 0.9rem; line-height: 1; }

.gl-chip-platform {
    background: rgba(255,255,255,0.06);
    border-color: var(--border-bright);
    color: var(--text-secondary);
}
.gl-chip-platform:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.gl-chip-dev {
    background: rgba(6,182,212,0.12);
    border-color: rgba(6,182,212,0.3);
    color: #67e8f9;
}
.gl-chip-dev:hover { background: rgba(6,182,212,0.2); }

.gl-chip-status {
    background: rgba(16,185,129,0.12);
    border-color: rgba(16,185,129,0.3);
    color: #6ee7b7;
}
.gl-chip-status:hover { background: rgba(16,185,129,0.2); }

.gl-chip-score {
    background: rgba(234,179,8,0.12);
    border-color: rgba(234,179,8,0.3);
    color: #fde047;
}
.gl-chip-score:hover { background: rgba(234,179,8,0.2); }

.gl-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.gl-clear-btn:hover { color: var(--text-secondary); }

/* --- Two-column layout ------------------------------------ */
.gl-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    max-width: 1440px;
    margin: 0 auto;
    align-items: start;
    min-height: 60vh;
}

/* --- Sidebar ---------------------------------------------- */
.gl-sidebar {
    position: sticky;
    top: 60px; /* below navbar */
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 1rem 0 2rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-bright) transparent;
}

.gl-sidebar::-webkit-scrollbar       { width: 4px; }
.gl-sidebar::-webkit-scrollbar-track { background: transparent; }
.gl-sidebar::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }

/* Sidebar body wraps filter groups (flex child on mobile, plain block on desktop) */
.gl-sidebar-body { display: block; }

/* Mobile-only sidebar header, footer, backdrop — hidden on desktop */
.gl-sidebar-header,
.gl-sidebar-footer,
.gl-sidebar-backdrop { display: none; }

/* --- Filter group ----------------------------------------- */
.gl-filter-group {
    border-bottom: 1px solid var(--border);
}

.gl-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    font-size: 0.8375rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    letter-spacing: 0.01em;
}

.gl-filter-header:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }

.gl-chevron {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    display: inline-block;
    line-height: 1;
}
.gl-chevron.open { transform: rotate(90deg); }

.gl-filter-body {
    padding: 0.25rem 0 0.75rem;
}

/* --- Filter search box ------------------------------------ */
.gl-filter-search-wrap {
    padding: 0.25rem 1rem 0.5rem;
}

.gl-filter-search {
    width: 100%;
    padding: 0.375rem 0.625rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    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); }

/* --- Filter items ----------------------------------------- */
.gl-filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 1.25rem;
    font-size: 0.8375rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.gl-filter-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }

.gl-filter-item input[type="checkbox"],
.gl-filter-item input[type="radio"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    cursor: pointer;
}

.gl-filter-item-radio { cursor: pointer; }

.gl-filter-item-label { flex: 1; }

.gl-filter-item-count {
    font-size: 0.725rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 0.1rem 0.375rem;
    border-radius: var(--radius-sm);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.gl-filter-empty {
    display: block;
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Year range inputs ------------------------------------- */
.gl-year-row {
    display: flex;
    gap: 0.75rem;
    padding: 0 1.25rem;
}

.gl-year-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.gl-year-field label {
    font-size: 0.7375rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.gl-year-input {
    width: 100%;
    padding: 0.4rem 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    -moz-appearance: textfield;
}

.gl-year-input::-webkit-inner-spin-button,
.gl-year-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.gl-year-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }

/* --- Main results area ------------------------------------- */
.gl-main {
    padding: 1.5rem 2rem 3rem;
    min-width: 0;
}

/* --- Results bar ------------------------------------------ */
.gl-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.gl-results-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.gl-results-count strong { color: var(--text-primary); font-weight: 600; }

.gl-shimmer-inline {
    display: inline-block;
    width: 60px;
    height: 1em;
    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-sort-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8375rem;
    color: var(--text-muted);
}

.gl-sort-select {
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8375rem;
    font-family: inherit;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.gl-sort-select:focus { border-color: var(--accent); }
.gl-sort-select option { background: var(--bg-elevated); }

/* --- 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%; }

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

/* --- 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;
}

/* --- Card meta helper ------------------------------------- */
.gn-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.6rem;
    font-size: 0.775rem;
    color: var(--text-muted);
}

/* --- Mobile filter toggle button (listing page) ----------- */
/* Hidden on desktop, shown on mobile via media query */
.gl-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.875rem;
    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);
    flex-shrink: 0;
}
.gl-mobile-filter-btn.active {
    border-color: var(--accent);
    color: var(--accent-cyan);
    background: rgba(124,58,237,0.1);
}
.gl-mobile-filter-btn svg { flex-shrink: 0; }

/* Game Detail — tab area top offset (controls cover-overlap padding) */
.gd-tabs-offset { padding-top: 1.75rem; }

/* Game Detail — release row grid */
.gd-release-row {
    display: grid;
    grid-template-columns: 1fr 120px 110px 80px;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.8375rem;
}

/* ============================================================
   RESPONSIVE — TABLET  (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
    /* Listing layout: sidebar stacks above results */
    .gl-layout { grid-template-columns: 1fr; }

    .gl-sidebar {
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        top: auto;
    }

    .gl-search-form { flex-direction: column; }
    .gl-search-form .gn-search { max-width: 100%; }

    /* Detail page columns → single column */
    .gd-columns { grid-template-columns: minmax(0, 1fr); }

    /* Backdrop cover a little smaller */
    .gd-cover-wrap { width: 140px; }
    .gd-backdrop   { height: 300px; }
    .gd-offset     { padding-left: 0; }
    .gd-tabs-offset { padding-top: 1.5rem; }

    /* Screenshots/Artwork grids — reduce artwork columns for tablet */
    .gd-screenshots { grid-template-columns: repeat(3, 1fr) !important; }
    .gd-body { padding: 0 1.25rem 3rem; }
    .gd-credits { gap: 1.5rem; }
    .gd-related-card { flex: 0 0 140px; }
}

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

    /* ── Navbar ─────────────────────────────────────────── */
    .gn-nav {
        padding: 0 0.875rem;
        gap: 0.5rem;
        height: 56px;
    }
    .gn-nav-burger { display: inline-flex; }   /* reveal burger */
    .gn-nav-links  { display: none; }          /* hide inline links */
    .gn-nav-actions .gn-btn-ghost { display: none; } /* keep primary CTA only */
    .gn-nav-drawer,
    .gn-nav-drawer-backdrop { top: 56px; }
    .gn-nav-drawer-backdrop { inset: 56px 0 0 0; }
    .gn-username { display: none; } /* avatar only on mobile */

    /* ── 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, 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; }

    /* ===================================================== */
    /* GAME DETAIL PAGE                                       */
    /* ===================================================== */

    /* Backdrop becomes a container that grows to fit its content.
       The blurred art + gradient (inset: 0) fill the whole backdrop. */
    .gd-backdrop {
        height: auto;
        min-height: 200px;
    }

    /* Stronger gradient on mobile so text is readable across the whole stack. */
    .gd-backdrop-gradient {
        background:
            linear-gradient(to bottom,
                rgba(9,9,11,0.45) 0%,
                rgba(9,9,11,0.75) 55%,
                #09090b 100%);
    }

    /* Content flows naturally in a vertical column inside the backdrop,
       instead of being absolute-pinned to the bottom (which caused clipping). */
    .gd-backdrop-content {
        position: relative;
        top: auto;
        bottom: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1.25rem 1rem 1.25rem;
    }

    /* Cover sits at the top of the stack, no vertical shift */
    .gd-cover-wrap {
        width: 110px;
        transform: none;
    }

    /* Header info takes the full column width */
    .gd-header-info {
        width: 100%;
        padding-bottom: 0;
    }

    /* Title & meta adapt to narrow space */
    .gd-title    { font-size: clamp(1.4rem, 6vw, 1.9rem); margin-bottom: 0.4rem; }
    .gd-tagline  { display: none; }
    .gd-breadcrumb { margin-bottom: 0.375rem; font-size: 0.7rem; }
    .gd-meta-row { font-size: 0.75rem; gap: 0.25rem 0.5rem; margin-bottom: 0.75rem; }
    .gd-scores   { gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
    .gn-score-lg { width: 2.75rem; height: 2.75rem; font-size: 1.1rem; }
    .gd-score-sep { display: none; }

    /* Action buttons go full-width and stack nicely */
    .gd-header-info > div:last-child {
        width: 100%;
    }
    .gd-header-info > div:last-child .gn-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    /* Body: full-width, tight padding */
    .gd-body   { padding: 1rem 1rem 3rem; }
    /* Drop the left offset on mobile — content uses the full viewport width. */
    .gd-offset { padding-left: 0; }
    .gd-tabs-offset { padding-top: 0; }

    /* Tabs: scrollable row, no wrap, hide scrollbar but keep swipe */
    .gd-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 0;
        scrollbar-width: none;
        margin-bottom: 1.5rem;
    }
    .gd-tabs::-webkit-scrollbar { display: none; }
    .gd-tab  { padding: 0.75rem 0.875rem; font-size: 0.8125rem; white-space: nowrap; flex-shrink: 0; }

    /* Overview columns: single column, sidebar goes below */
    .gd-columns { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }

    /* Screenshots/Artwork: 2 columns regardless of inline style */
    .gd-screenshots { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem; }

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

    /* Related scroll: smaller cards */
    .gd-related-card { flex: 0 0 130px; }

    /* Sidebar cards full-width + readable padding */
    .gd-sidebar-card { margin-bottom: 0.875rem; padding: 1rem; }
    .gd-sidebar-title { margin-bottom: 0.75rem; }

    /* Credits: tighter layout */
    .gd-credits { gap: 1.25rem; }
    .gd-credit-person { padding: 0.625rem 0.75rem; gap: 0.75rem; }
    .gd-credit-avatar { width: 34px; height: 34px; }
    .gd-credit-name { font-size: 0.875rem; }
    .gd-credit-role { font-size: 0.75rem; }

    /* Release row: stack into 2-column grid on mobile */
    .gd-release-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 1rem;
    }
    .gd-release-row > :nth-child(3),
    .gd-release-row > :nth-child(4) {
        font-size: 0.775rem;
        color: var(--text-muted);
    }

    /* Section titles inside tabs */
    .gd-body .gn-section-title { font-size: 1.1rem; }

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

    /* Hero */
    .gl-hero       { padding: 1.5rem 1rem 1.25rem; }
    .gl-hero-inner .gn-hero-eyebrow { display: none; }

    /* Sidebar becomes a full-screen overlay sheet when toggled */
    .gl-sidebar {
        display: none;
        border-bottom: none;
        border-right: none;
    }
    .gl-sidebar.gl-sidebar-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 56px;                            /* below mobile nav */
        left: 0;
        right: 0;
        bottom: 0;
        max-height: none;
        z-index: 85;
        padding: 0;
        background: var(--bg-surface);
        border: none;
        animation: gl-sheet-up 0.22s ease;
    }
    .gl-sidebar.gl-sidebar-open .gl-sidebar-body {
        display: block;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.25rem 0 0.5rem;
    }

    /* Sidebar header + footer become visible on mobile */
    .gl-sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.875rem 1.25rem;
        border-bottom: 1px solid var(--border);
        background: var(--bg-surface);
        position: sticky;
        top: 0;
        z-index: 2;
    }
    .gl-sidebar-header-title {
        font-family: 'Rajdhani', sans-serif;
        font-size: 1.1rem;
        font-weight: 700;
        letter-spacing: 0.01em;
    }
    .gl-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: var(--radius-md);
        border: 1px solid var(--border);
        background: var(--bg-elevated);
        color: var(--text-secondary);
        cursor: pointer;
        padding: 0;
        transition: var(--transition);
    }
    .gl-sidebar-close:hover {
        color: var(--text-primary);
        border-color: var(--border-bright);
    }

    .gl-sidebar-footer {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
        border-top: 1px solid var(--border);
        background: var(--bg-surface);
        position: sticky;
        bottom: 0;
    }
    .gl-sidebar-clear-btn {
        flex-shrink: 0;
        padding: 0.75rem 0.875rem;
        background: transparent;
        border: 1px solid var(--border-bright);
        color: var(--text-secondary);
        font-size: 0.875rem;
        font-family: inherit;
        font-weight: 500;
        border-radius: var(--radius-md);
        cursor: pointer;
        transition: var(--transition);
    }
    .gl-sidebar-clear-btn:hover:not(:disabled) {
        color: var(--text-primary);
        border-color: var(--border-bright);
        background: var(--bg-elevated);
    }
    .gl-sidebar-clear-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }
    .gl-sidebar-apply-btn {
        flex: 1;
        justify-content: center;
        padding: 0.85rem 1.25rem;
        font-size: 0.95rem;
    }

    /* Backdrop behind the sheet */
    .gl-sidebar-backdrop {
        display: block;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(2px);
        z-index: 84;
        animation: gn-fade-in 0.15s ease;
    }

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

    /* Tap-friendly filter items on touch screens */
    .gl-filter-item { padding: 0.625rem 1.25rem; font-size: 0.9rem; }
    .gl-filter-item input[type="checkbox"],
    .gl-filter-item input[type="radio"] { width: 18px; height: 18px; }
    .gl-filter-header { padding: 0.875rem 1.25rem; font-size: 0.9rem; }
    .gl-year-input { padding: 0.625rem 0.75rem; font-size: 16px; }
    .gl-filter-search { padding: 0.625rem 0.75rem; font-size: 16px; }

    /* Show mobile filter toggle button */
    .gl-mobile-filter-btn { display: flex; }

    /* Main area */
    .gl-main { padding: 1rem 0.875rem 2rem; }

    /* Results bar */
    .gl-results-bar { gap: 0.5rem; }
    .gl-sort-wrap label { display: none; } /* hide "Sort:" label */

    /* Active chips: smaller text */
    .gl-chip { font-size: 0.725rem; padding: 0.2rem 0.5rem; }
    .gl-chips-bar { padding: 0.5rem 1rem; }

    /* 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; }
}

/* ── Lightbox ──────────────────────────────────────────────────────────────── */
.gd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.93);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    animation: lb-fade-in 0.15s ease;
}

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

.gd-lightbox-backdrop {
    position: absolute;
    inset: 0;
    cursor: zoom-out;
}

.gd-lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: min(90vw, 1400px);
    max-height: 90vh;
    pointer-events: none;
}

.gd-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--radius-md);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
    animation: lb-zoom-in 0.18s ease;
}

@keyframes lb-zoom-in {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.gd-lightbox-counter {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
    pointer-events: auto;
}

.gd-lightbox-close {
    position: fixed;
    top: 1.1rem;
    right: 1.1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
}
.gd-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

.gd-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
}
.gd-lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.gd-lightbox-nav:disabled { opacity: 0.2; cursor: default; }
.gd-lightbox-prev { left: 1.1rem; }
.gd-lightbox-next { right: 1.1rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   AUTH MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.auth-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 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(460px, calc(100vw - 2rem));
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem 2rem;
    animation: auth-slide-up 0.22s ease;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

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

.auth-modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 0.25rem; border-radius: 4px;
    transition: color var(--transition);
}
.auth-modal-close:hover { color: var(--text-primary); }

.auth-logo {
    font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em;
    text-align: center; margin-bottom: 1.5rem; color: var(--text-primary);
}
.auth-logo span { color: var(--accent-cyan); }

/* tabs */
.auth-tabs {
    display: flex; border-bottom: 1px solid var(--border);
    margin-bottom: 1.75rem;
}
.auth-tab {
    flex: 1; padding: 0.625rem 0; background: none; border: none;
    color: var(--text-muted); font-size: 0.9rem; font-weight: 600;
    cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -1px; transition: color var(--transition), border-color var(--transition);
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-tab:hover:not(.active) { color: var(--text-secondary); }

/* form */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-field { display: flex; flex-direction: column; gap: 0.375rem; }
.auth-label {
    font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary);
}
.auth-hint { font-weight: 400; color: var(--text-muted); font-size: 0.75rem; }
.auth-input {
    padding: 0.625rem 0.875rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-primary);
    font-size: 0.9rem; outline: none; transition: border-color var(--transition);
    width: 100%; box-sizing: border-box;
}
.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--text-muted); }

.auth-error {
    background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md); padding: 0.625rem 0.875rem;
    color: #f87171; font-size: 0.8125rem;
}

.auth-submit {
    margin-top: 0.25rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent); border: none; border-radius: var(--radius-md);
    color: #fff; font-size: 0.9375rem; font-weight: 700;
    cursor: pointer; transition: background var(--transition), opacity var(--transition);
    width: 100%;
}
.auth-submit:hover:not(:disabled)  { background: #8b5cf6; }
.auth-submit:disabled { opacity: 0.55; cursor: not-allowed; }

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

/* social buttons */
.auth-social { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.auth-social-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-secondary);
    font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    white-space: nowrap;
}
.auth-social-btn:hover { border-color: var(--border-bright); color: var(--text-primary); background: var(--bg-card); }
.auth-google:hover   { border-color: #4285f4; color: #4285f4; }
.auth-discord:hover  { border-color: #5865f2; color: #5865f2; }
.auth-facebook:hover { border-color: #1877f2; color: #1877f2; }
.auth-twitter:hover  { border-color: #e7e9ea; color: #e7e9ea; }

/* footer switch */
.auth-switch {
    text-align: center; margin-top: 1.25rem;
    font-size: 0.8375rem; color: var(--text-muted);
}
.auth-link {
    background: none; border: none; color: var(--accent);
    cursor: pointer; font-weight: 600; font-size: inherit; padding: 0;
}
.auth-link:hover { text-decoration: underline; }

/* ── 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-avatar-initials {
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 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); }

/* ── "In Library" / "On Wishlist" active button states ────────────────────── */
.gn-btn-active {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.45);
}
.gn-btn-active:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.45);
}
/* Swap label to "Remove from Library" on hover */
.gn-btn-active:hover > span::after {
    content: " — remove";
    color: inherit;
    opacity: 0.7;
    font-weight: 500;
}

.gn-btn-active-wishlist {
    background: rgba(124, 58, 237, 0.18);
    color: #c4b5fd;
    border-color: rgba(124, 58, 237, 0.55);
}
.gn-btn-active-wishlist:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.55);
}
.gn-btn-active-wishlist:hover > span::after {
    content: " — remove";
    opacity: 0.7;
    font-weight: 500;
}

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

/* ── Reviews tab ──────────────────────────────────────────────────────────── */
.rv-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.rv-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}
.rv-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
}
.rv-card-great::before { background: var(--score-great); }
.rv-card-good::before  { background: var(--score-good);  }
.rv-card-mixed::before { background: var(--score-mixed); }
.rv-card-poor::before  { background: var(--score-poor);  }
.rv-card-bad::before   { background: var(--score-bad);   }

.rv-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.rv-ring-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}
.rv-ring-wrap svg {
    transform: rotate(-90deg);
}
.rv-ring-num {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.rv-ring-score {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.rv-ring-denom {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}
.rv-verdict {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.rv-verdict-great { color: var(--score-great); }
.rv-verdict-good  { color: var(--score-good);  }
.rv-verdict-mixed { color: var(--score-mixed); }
.rv-verdict-poor  { color: var(--score-poor);  }
.rv-verdict-bad   { color: var(--score-bad);   }

.rv-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.rv-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 22ch;
}

/* comparison bars */
.rv-compare {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
}
.rv-compare-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.rv-bar-row {
    display: grid;
    grid-template-columns: 5.5rem 1fr 2.5rem;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}
.rv-bar-row:last-child { margin-bottom: 0; }
.rv-bar-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}
.rv-bar-track {
    background: var(--surface-2);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}
.rv-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.rv-bar-val {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* score guide */
.rv-guide {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
}
.rv-guide-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.rv-guide-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.625rem;
}
.rv-guide-row:last-child { margin-bottom: 0; }
.rv-guide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.rv-guide-range {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 3rem;
}
.rv-guide-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.rv-guide-active {
    background: var(--bg-elevated);
    border-radius: 6px;
    margin: -0.25rem -0.5rem;
    padding: 0.25rem 0.5rem;
}

/* no scores state */
.rv-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.rv-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.rv-empty-msg  { font-size: 0.9rem; line-height: 1.6; }

@media (max-width: 600px) {
    .rv-hero { grid-template-columns: 1fr; }
    .rv-bar-row { grid-template-columns: 4rem 1fr 2rem; gap: 0.625rem; }
}

/* ============================================================
   HOME PAGE
   ============================================================ */

/* --- Hero ------------------------------------------------- */
.gh-hero {
    padding: 5.5rem 2rem 4.5rem;
}

.gh-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
}

.gh-hero .gn-hero-subtitle {
    margin: 0 auto 2rem;
}

.gh-hero-search-form {
    max-width: 560px;
    margin: 0 auto 1.75rem;
}

.gh-hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.625rem;
}

/* --- Stats ------------------------------------------------ */
.gh-stats {
    gap: 4rem;
    flex-wrap: wrap;
}

.gh-stat {
    text-align: center;
    min-width: 120px;
}

/* --- Row (game card grid) --------------------------------- */
.gh-row {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

@media (min-width: 900px) {
    .gh-row {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* --- Featured card tweaks --------------------------------- */
.gh-featured {
    grid-template-columns: 320px 1fr;
}

.gh-featured .gn-featured-cover {
    min-height: 340px;
}

@media (max-width: 720px) {
    .gh-featured {
        grid-template-columns: 1fr;
    }
    .gh-featured .gn-featured-cover { min-height: 240px; }
}

/* --- Genre grid ------------------------------------------- */
.gh-genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.875rem;
}

.gh-genre-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.125rem 1.25rem;
    min-height: 92px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.gh-genre-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, var(--accent-glow) 0%, transparent 55%);
    opacity: 0.35;
    transition: opacity var(--transition);
    z-index: -1;
}

.gh-genre-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.gh-genre-card:hover::before { opacity: 0.9; }

.gh-genre-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.gh-genre-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* --- Platform chips --------------------------------------- */
.gh-platform-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.gh-platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8375rem;
    transition: var(--transition);
}

.gh-platform-chip:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.gh-platform-name { font-weight: 500; }

.gh-platform-count {
    color: var(--text-muted);
    font-size: 0.75rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--border-bright);
}

/* --- CTA -------------------------------------------------- */
.gh-cta-section {
    padding-bottom: 5rem;
}

.gh-cta {
    position: relative;
    padding: 3.5rem 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--border-bright);
    background: var(--bg-card);
}

.gh-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 0% 0%, rgba(124, 58, 237, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at 100% 100%, rgba(6, 182, 212, 0.25) 0%, transparent 60%);
    z-index: -1;
}

.gh-cta-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}

.gh-cta-text {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto 1.75rem;
}

/* ============================================================
   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;
}

.li-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.875rem;
}

.li-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.125rem 1.25rem;
    min-height: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.li-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, var(--accent-glow) 0%, transparent 55%);
    opacity: 0.3;
    z-index: -1;
    transition: opacity var(--transition);
}

.li-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.li-card:hover::before { opacity: 0.85; }

.li-card-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin-bottom: 0.375rem;
    display: block;
}

.li-card-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* --- Company variant: logo + text ------------------------- */
.li-card-company {
    flex-direction: row;
    align-items: center;
    gap: 0.875rem;
    min-height: 84px;
}

.li-company-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    flex-shrink: 0;
    border: 1px solid var(--border-bright);
    letter-spacing: 0.02em;
}

.li-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.li-card-company .li-card-title {
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Coming Soon state ------------------------------------ */
.li-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 5rem 2rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.li-coming-soon::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 50% 0%, rgba(124, 58, 237, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 100% 100%, rgba(6, 182, 212, 0.15) 0%, transparent 60%);
    z-index: -1;
}

.li-coming-soon-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.li-coming-soon-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.01em;
}

.li-coming-soon-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    max-width: 520px;
    line-height: 1.7;
    margin: 0 0 1rem;
}

.li-coming-soon-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
}

/* --- Active nav link -------------------------------------- */
.gn-nav-link.active {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

@media (max-width: 720px) {
    .li-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.625rem; }
    .li-coming-soon { padding: 3rem 1.25rem; }
}

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

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
    .gn-section { padding: 2.5rem 1.25rem; }
    .gn-hero    { padding: 3.5rem 1.25rem 3rem; }
    .gh-hero    { padding: 3.5rem 1.25rem 3rem; }
    .gh-stats   { gap: 2rem; padding: 2rem 1.25rem; }
    .gh-row     { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .gh-featured { grid-template-columns: 240px 1fr; }
    .gh-genre-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .gn-featured-body { padding: 1.5rem; }
    .gn-featured-title { font-size: 1.5rem; }
    .gd-screenshots { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile (≤ 640px) */
@media (max-width: 640px) {
    /* Section spacing */
    .gn-section { padding: 2rem 0.875rem; }

    /* Hero */
    .gn-hero,
    .gh-hero {
        padding: 2.5rem 1rem 2rem;
    }
    .gn-hero-eyebrow { font-size: 0.7rem; }
    .gn-hero-subtitle { font-size: 0.95rem; margin-bottom: 1.5rem; }
    .gh-hero-cta { gap: 0.5rem; }
    .gh-hero-cta .gn-btn { flex: 1 1 calc(50% - 0.5rem); justify-content: center; }

    /* 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; }

    /* Stats — horizontal scroll instead of wrapping awkwardly */
    .gh-stats {
        gap: 1.5rem;
        padding: 1.5rem 1rem;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .gh-stat { min-width: 90px; flex-shrink: 0; }
    .gn-stat-value { font-size: 1.5rem; }
    .gn-stat-label { font-size: 0.7rem; }

    /* Featured card stacks full-width */
    .gh-featured { grid-template-columns: 1fr; }
    .gh-featured .gn-featured-cover { min-height: 200px; aspect-ratio: 16 / 9; }
    .gn-featured-body { padding: 1.25rem; gap: 0.625rem; }
    .gn-featured-title { font-size: 1.35rem; }
    .gn-featured-summary { font-size: 0.85rem; }
    .gn-featured-meta { gap: 0.625rem; }

    /* Row of cards already becomes 2-col via .gn-grid override */
    .gh-row { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

    /* Genre/Platform grids */
    .gh-genre-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.625rem;
    }
    .gh-genre-card { padding: 0.875rem 1rem; min-height: 78px; }
    .gh-genre-name { font-size: 1rem; }

    .gh-platform-grid { gap: 0.5rem; }
    .gh-platform-chip { padding: 0.5rem 0.875rem; font-size: 0.8rem; }

    /* CTA */
    .gh-cta { padding: 2.25rem 1.25rem; border-radius: var(--radius-lg); }
    .gh-cta-section { padding-bottom: 3rem; }
    .gh-cta-text { font-size: 0.9rem; margin-bottom: 1.25rem; }

    /* Touch-friendly search input */
    .gn-search-input {
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        font-size: 16px;   /* prevent iOS zoom on focus */
    }

    /* 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; }
}

/* Small phones (≤ 380px) */
@media (max-width: 380px) {
    .gh-hero-cta { flex-direction: column; }
    .gh-hero-cta .gn-btn { flex: 1 1 auto; width: 100%; }
    .gn-hero-title { font-size: clamp(1.9rem, 9vw, 2.5rem); }
    .gh-stats { gap: 1rem; }
    .gh-stat { min-width: 82px; }
    .gh-genre-grid { grid-template-columns: repeat(2, 1fr); }
    .li-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Prevent any accidental horizontal overflow */
html, body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; height: auto; }

/* ============================================================
   SEARCH AUTOCOMPLETE (sa-*) + NAVBAR SEARCH
   ============================================================ */

/* Navbar slot that hosts the autocomplete on desktop */
.gn-nav-search {
    flex: 1;
    min-width: 0;
    max-width: 440px;
    margin-left: auto;
}

.gn-nav-search-btn {
    display: none;     /* hidden on desktop — mobile only */
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    transition: var(--transition);
}

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

/* --- Root + input ----------------------------------------- */
.sa-root {
    position: relative;
    width: 100%;
}

.sa-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

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

.sa-input {
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 2.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    height: 36px;
}

.sa-input::placeholder { color: var(--text-muted); }

.sa-input:focus {
    background: var(--bg-card);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.sa-clear,
.sa-spinner {
    position: absolute;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sa-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sa-clear:hover { color: var(--text-primary); background: var(--bg-elevated); }

.sa-spinner {
    border: 2px solid var(--border-bright);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: sa-spin 0.7s linear infinite;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    right: 0.7rem;
}

@keyframes sa-spin { to { transform: rotate(360deg); } }

/* --- Dropdown --------------------------------------------- */
.sa-dropdown {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    z-index: 1500;
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    max-height: min(540px, 70vh);
    overflow-y: auto;
    padding: 0.375rem;
    animation: sa-pop 0.12s ease;
}

@keyframes sa-pop {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sa-empty {
    padding: 1.25rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

.sa-empty strong { color: var(--text-secondary); }

.sa-empty-cta {
    display: block;
    margin: 0.75rem auto 0;
    background: none;
    border: 1px solid var(--border-bright);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-family: inherit;
    padding: 0.4rem 0.875rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.sa-empty-cta:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* --- Suggestion row --------------------------------------- */
.sa-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.1s ease;
}

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

.sa-cover {
    flex-shrink: 0;
    width: 40px;
    height: 54px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-base);
}

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

.sa-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    background: linear-gradient(160deg, #1e1b4b, #4c1d95, #06b6d4);
}

.sa-meta {
    min-width: 0;
    flex: 1;
}

.sa-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

.sa-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.sa-sub .sa-dot { color: var(--text-muted); }

.sa-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.375rem;
    padding: 0.625rem 0.75rem;
    background: none;
    border: none;
    border-top: 1px solid var(--border);
    color: var(--accent-cyan);
    font-size: 0.8125rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: background 0.1s ease;
}

.sa-all:hover { background: var(--bg-elevated); }
.sa-all strong { color: var(--text-primary); }

/* --- Mobile sheet variant --------------------------------- */
.sa-sheet {
    position: static;
    padding: 0;
}

.sa-sheet .sa-input {
    height: 44px;
    font-size: 16px;  /* prevent iOS auto-zoom */
}

.sa-sheet .sa-dropdown {
    position: static;
    top: auto;
    margin-top: 0.75rem;
    max-height: none;
    box-shadow: none;
    border: 1px solid var(--border);
    background: var(--bg-surface);
}

/* --- Mobile search overlay (opened from navbar icon) ------ */
.gn-mobile-search-backdrop {
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 94;
    animation: gn-fade-in 0.15s ease;
}

.gn-mobile-search {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    background: var(--bg-surface);
    padding: 1rem;
    animation: gn-slide-down 0.18s ease;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
}

.gn-mobile-search-close {
    align-self: flex-end;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.gn-mobile-search-close:hover {
    color: var(--text-primary);
    border-color: var(--border-bright);
}

/* --- Mobile/tablet responsive ---------------------------- */
@media (max-width: 900px) {
    .gn-nav { gap: 0.875rem; }
    .gn-nav-search { max-width: 320px; }
}

@media (max-width: 760px) {
    /* Navbar search shrinks, mobile button takes over at a reasonable width */
    .gn-nav-search { display: none; }
    .gn-nav-search-btn { display: inline-flex; }
    .gn-mobile-search { display: flex; }
}

/* ============================================================
   DEALS PAGE (dl-*)
   ============================================================ */

.dl-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 2rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 60px;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.dl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}

.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;
}

.dl-controls {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.dl-range {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.7875rem;
    color: var(--text-muted);
    min-width: 180px;
}

.dl-range strong { color: var(--accent-cyan); font-variant-numeric: tabular-nums; }

.dl-range input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    height: 4px;
}

.dl-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.dl-sort select {
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
}

.dl-search {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.7875rem;
    color: var(--text-muted);
    min-width: 200px;
}

.dl-search-label { padding-left: 0.125rem; }

.dl-search input {
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    padding: 0.4rem 0.75rem;
    width: 100%;
}

.dl-search input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

/* --- Deal card badges + prices ---------------------------- */
.dl-card .gn-card-cover { position: relative; }

.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-store-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(9, 9, 11, 0.85);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--border-bright);
    backdrop-filter: blur(6px);
}

.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;
}

/* --- Empty / error state (centered card) ------------------ */
.dl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 50vh;
    padding: 3.5rem 1.5rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.dl-empty::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 50% 0%,   rgba(124, 58, 237, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 100% 100%, rgba(6,   182, 212, 0.15) 0%, transparent 60%);
    z-index: -1;
}

.dl-empty-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.dl-empty-icon-warn { color: var(--score-poor); }

.dl-empty-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.01em;
}

.dl-empty-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 520px;
    line-height: 1.7;
    margin: 0 0 0.75rem;
}

.dl-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
}

@media (max-width: 640px) {
    .dl-filter-bar { padding: 0.75rem 1rem; gap: 0.75rem; top: 56px; }
    .dl-range { min-width: 0; flex: 1; }
    .dl-chips { gap: 0.3rem; }
    .dl-chip  { font-size: 0.775rem; padding: 0.3rem 0.7rem; }
    .dl-empty { min-height: 40vh; padding: 2.5rem 1.25rem; }
    .dl-empty-icon { width: 68px; height: 68px; }
}


/* ── Game detail: IGDB extras (price card, store links, videos, languages, related rows) ── */
.gd-price-card { border: 1px solid rgba(34,197,94,.35); background: linear-gradient(160deg, rgba(34,197,94,.10), rgba(34,197,94,.02)); }
.gd-price-best { display:flex; align-items:baseline; gap:.5rem; margin:.25rem 0 .35rem; }
.gd-price-now  { font-size:1.6rem; font-weight:700; color:var(--score-great); line-height:1; }
.gd-price-was  { font-size:.8rem; color:var(--text-muted); text-decoration:line-through; }
.gd-price-cut  { font-size:.72rem; font-weight:600; padding:.15rem .45rem; border-radius:999px; background:rgba(34,197,94,.18); color:var(--score-great); }
.gd-price-row  { display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.45rem 0; border-top:1px solid var(--border); font-size:.8rem; text-decoration:none; color:var(--text-secondary); }
.gd-price-row:hover { color:var(--text-primary); }
.gd-price-row strong { color:var(--text-primary); font-variant-numeric:tabular-nums; }
.gd-store-links { display:flex; flex-wrap:wrap; gap:.4rem; }
.gd-store-link  { font-size:.74rem; padding:.3rem .6rem; border-radius:6px; border:1px solid var(--border); background:var(--surface-2); color:var(--text-secondary); text-decoration:none; transition:color .15s, border-color .15s; }
.gd-store-link:hover { color:var(--text-primary); border-color:var(--accent-dim); }
.gd-ttb { display:grid; grid-template-columns:repeat(3,1fr); gap:.4rem; margin-top:.35rem; }
.gd-ttb-cell { text-align:center; padding:.5rem .25rem; border-radius:6px; background:var(--surface-2); border:1px solid var(--border); }
.gd-ttb-val { font-size:1rem; font-weight:600; color:var(--text-primary); }
.gd-ttb-key { font-size:.66rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; margin-top:.15rem; }
.gd-videos { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; }
.gd-video  { position:relative; aspect-ratio:16/9; border-radius:8px; overflow:hidden; cursor:pointer; background:#000; border:1px solid var(--border); }
.gd-video img { width:100%; height:100%; object-fit:cover; opacity:.85; transition:opacity .15s, transform .2s; }
.gd-video:hover img { opacity:1; transform:scale(1.03); }
.gd-video-play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.gd-video-play span { width:3.25rem; height:3.25rem; border-radius:50%; background:rgba(0,0,0,.6); border:1px solid rgba(255,255,255,.35); display:flex; align-items:center; justify-content:center; }
.gd-video-name { position:absolute; left:0; right:0; bottom:0; padding:.5rem .6rem; font-size:.74rem; color:#fff; background:linear-gradient(transparent, rgba(0,0,0,.75)); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gd-video-frame { position:relative; width:min(960px, 92vw); aspect-ratio:16/9; background:#000; border-radius:10px; overflow:hidden; }
.gd-video-frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.gd-lang-table { width:100%; border-collapse:collapse; font-size:.76rem; }
.gd-lang-table th { text-align:center; font-weight:500; color:var(--text-muted); font-size:.66rem; text-transform:uppercase; letter-spacing:.04em; padding:.25rem 0; }
.gd-lang-table th:first-child, .gd-lang-table td:first-child { text-align:left; }
.gd-lang-table td { padding:.3rem 0; border-top:1px solid var(--border); color:var(--text-secondary); text-align:center; }
.gd-lang-yes { color:var(--score-great); font-weight:600; }
.gd-lang-no  { color:var(--text-muted); opacity:.5; }
.gd-mp-grid { display:flex; flex-wrap:wrap; gap:.3rem; justify-content:flex-end; }
@media (max-width: 720px) { .gd-videos { grid-template-columns:repeat(2,1fr); } .gd-ttb { grid-template-columns:repeat(3,1fr); } }
