/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue: #1a73e8;
    --blue-dark: #1557b0;
    --blue-light: rgba(26,115,232,0.12);
    --bg: #0f1729;
    --white: #182040;
    --text: #e8eaf0;
    --text-muted: #a8adc0;
    --border: rgba(255,255,255,0.08);
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.4);
    --radius: 12px;
    --cat-strategy: #3182ce;
    --cat-rpg: #805ad5;
    --cat-arcade: #dd6b20;
    --cat-rhythm: #d53f8c;
    --cat-puzzle: #10b981;
    --cat-action: #eab308;
    --cat-pets: #06b6d4;
    --spotlight-grad-start: color-mix(in srgb, var(--blue-dark) 52%, var(--bg) 48%);
    --spotlight-grad-mid: color-mix(in srgb, var(--blue) 78%, var(--bg) 22%);
    --spotlight-grad-end: color-mix(in srgb, var(--blue) 36%, var(--white) 64%);
    --spotlight-glow: color-mix(in srgb, var(--blue) 24%, transparent);
    --gc-bg: linear-gradient(
        160deg,
        color-mix(in srgb, var(--white) 86%, var(--bg) 14%) 0%,
        color-mix(in srgb, var(--white) 74%, var(--bg) 26%) 60%,
        color-mix(in srgb, var(--blue-dark) 24%, var(--white) 76%) 100%
    );
    --gc-border: color-mix(in srgb, var(--blue) 24%, var(--border) 76%);
    --gc-text: color-mix(in srgb, var(--text) 94%, #ffffff 6%);
    --gc-muted: color-mix(in srgb, var(--text-muted) 92%, var(--text) 8%);
    --gc-panel-bg: color-mix(in srgb, var(--blue-light) 18%, var(--white) 82%);
    --gc-panel-hover: color-mix(in srgb, var(--blue-light) 32%, var(--white) 68%);
    --gc-avatar-bg: color-mix(in srgb, var(--white) 70%, var(--bg) 30%);
    --gc-zone: color-mix(in srgb, var(--blue) 84%, #ffffff 16%);
    --promise-card-bg: color-mix(in srgb, var(--blue-light) 20%, var(--white) 80%);
    --submit-cta-start: color-mix(in srgb, var(--blue-dark) 66%, var(--bg) 34%);
    --submit-cta-end: color-mix(in srgb, var(--blue) 76%, var(--bg) 24%);
    --submit-cta-button-bg: #ffffff;
    --submit-cta-button-text: color-mix(in srgb, var(--blue-dark) 88%, var(--text) 12%);
    --submit-cta-button-hover: color-mix(in srgb, var(--blue-light) 44%, #ffffff 56%);
    --cat-hover-bg: color-mix(in srgb, var(--blue) 18%, var(--white) 82%);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

body.access-locked {
    overflow: auto;
}

@media (min-width: 1024px) {
    body.access-locked {
        overflow: hidden;
    }
}

.access-splash {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 1;
    transition: opacity 520ms ease;
    background:
        radial-gradient(circle at 22% 24%, color-mix(in srgb, var(--blue-light) 55%, transparent) 0%, transparent 46%),
        radial-gradient(circle at 78% 72%, color-mix(in srgb, var(--spotlight-glow) 78%, transparent) 0%, transparent 45%),
        linear-gradient(135deg, var(--spotlight-grad-start) 0%, var(--spotlight-grad-mid) 50%, var(--spotlight-grad-end) 100%);
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .access-splash {
        overflow-y: hidden;
    }
}

.access-splash.access-splash--unlocking {
    opacity: 0;
}

.access-splash[hidden] {
    display: none;
}

.access-splash__panel {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    padding: clamp(1.6rem, 5vw, 4.4rem);
    color: #fff;
    position: relative;
}

@media (max-width: 1023px) {
    .access-splash__panel {
        justify-content: flex-start;
        padding-top: clamp(2rem, 8vh, 3rem);
        padding-bottom: clamp(3rem, 15vh, 5rem);
    }
}

.access-splash__panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.32));
    pointer-events: none;
}

.access-splash__panel > * {
    position: relative;
    z-index: 1;
}

.access-splash__floater {
    width: clamp(220px, 34vw, 420px);
    height: auto;
    opacity: 0.22;
    margin-bottom: 0.25rem;
    transform-origin: 50% 50%;
    animation: spotlight-bounceabout 12s cubic-bezier(0.42, 0, 0.58, 1) infinite alternate;
    will-change: transform;
}

.access-splash h1 {
    font-size: clamp(2.1rem, 5.4vw, 4rem);
    line-height: 1.06;
    margin: 0;
}

.access-splash p {
    margin: 0;
    font-size: clamp(1rem, 2.1vw, 1.25rem);
    max-width: min(96vw, 72ch);
}

.access-splash__subtext {
    white-space: nowrap;
}

.access-splash-gamercard-wrap {
    width: min(92vw, 560px);
    margin-top: 0.6rem;
}

.access-splash-gamercard-wrap .gamercard {
    width: 100%;
    margin: 0;
    flex: 0 0 auto;
}

.access-splash-gamercard-wrap .gamercard-identity {
    text-align: left;
}

.access-splash__prompt {
    font-size: clamp(1.16rem, 2.6vw, 1.64rem);
    letter-spacing: 0.01em;
    margin-top: 0.9rem;
    margin-bottom: 1.2rem;
}

.access-splash__codeform {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: stretch;
    margin-top: 0.8rem;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.access-splash__codeinput {
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    color: var(--dark);
    font-family: monospace;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.access-splash__codeinput:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.access-splash__codeinput--error {
    border-color: var(--red);
    background: rgba(239, 68, 68, 0.05);
    animation: codeinput-shake 0.4s ease-in-out;
}

@keyframes codeinput-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.access-splash__codesubmit {
    padding: 0.6rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.access-splash__codesubmit:hover {
    background: rgb(37, 99, 235);
}

.access-splash__codesubmit:active {
    transform: scale(0.98);
}

.access-splash__codeerror {
    font-size: 0.9rem;
    color: var(--red);
    text-align: center;
    min-height: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.access-splash__codeerror--show {
    opacity: 1;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.logo-icon {
    width: 48px;
    height: 24px;
    color: var(--blue);
    flex-shrink: 0;
}

/* Auth */
.header-auth {
    flex-shrink: 0;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}
.login-btn:hover { background: var(--blue-dark); text-decoration: none; }
.login-btn .btn-icon { width: 16px; height: 16px; }
.login-label-short { display: none; }

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    padding: 0.15rem 0.3rem;
    transition: background 0.15s;
}
.user-profile-link:hover {
    background: var(--blue-light);
    text-decoration: none;
}

.gc-sprite-link {
    display: block;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
    flex-shrink: 0;
}

.gc-sprite-link:hover {
    text-decoration: none;
}

.gc-avatar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: inherit;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
}

.gc-avatar-link:hover {
    text-decoration: none;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-handle {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem;
    display: flex;
    align-items: center;
}
.logout-btn svg { width: 18px; height: 18px; }
.logout-btn:hover { color: var(--text); }

/* ===== Header Actions (social links + theme) ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
    flex-shrink: 0;
}

.header-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--blue);
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}
.header-social-link:hover {
    color: var(--blue-dark);
    background: var(--blue-light);
    text-decoration: none;
}
.header-social-link svg {
    width: 18px;
    height: 18px;
}
.header-social-bsky svg {
    width: 20px;
    height: 20px;
}

/* ===== Theme Dropdown ===== */
.theme-dropdown {
    position: relative;
    flex-shrink: 0;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    white-space: nowrap;
}
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); }
.theme-toggle .btn-icon { width: 14px; height: 14px; }

.theme-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 140px;
    padding: 0.3rem;
    z-index: 200;
}
.theme-menu.open { display: block; }

.theme-option {
    display: block;
    width: 100%;
    padding: 0.4rem 0.7rem;
    background: none;
    border: none;
    border-radius: 5px;
    color: #1f2937;
    font-size: 0.82rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s;
}
.theme-option:hover { background: #f0f4ff; }
.theme-option.active { font-weight: 700; color: #1a73e8; }

/* ===== Category Bar (horizontal scrollable, sticky) ===== */
.category-bar {
    position: sticky;
    top: 56px;
    z-index: 99;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.category-bar::-webkit-scrollbar { display: none; }

.category-bar-inner {
    display: flex;
    align-items: stretch;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    gap: 0;
}

.cat-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.1rem;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: inherit;
}
.cat-btn svg { width: 16px; height: 16px; }
.cat-btn[data-category="strategy"] { color: var(--cat-strategy); }
.cat-btn[data-category="puzzle"] { color: var(--cat-puzzle); }
.cat-btn[data-category="rpg"] { color: var(--cat-rpg); }
.cat-btn[data-category="arcade"] { color: var(--cat-arcade); }
.cat-btn[data-category="rhythm"] { color: var(--cat-rhythm); }
.cat-btn[data-category="action"] { color: var(--cat-action); }
.cat-btn[data-category="pets"] { color: var(--cat-pets); }
.cat-btn:hover {
    color: inherit;
    background: var(--cat-hover-bg);
}
.cat-btn.active {
    color: var(--blue);
    background: color-mix(in srgb, var(--cat-hover-bg) 72%, transparent);
    border-bottom-color: var(--blue);
}

.cat-btn[data-category="strategy"].active { color: var(--cat-strategy); border-bottom-color: var(--cat-strategy); }
.cat-btn[data-category="puzzle"].active { color: var(--cat-puzzle); border-bottom-color: var(--cat-puzzle); }
.cat-btn[data-category="rpg"].active { color: var(--cat-rpg); border-bottom-color: var(--cat-rpg); }
.cat-btn[data-category="arcade"].active { color: var(--cat-arcade); border-bottom-color: var(--cat-arcade); }
.cat-btn[data-category="rhythm"].active { color: var(--cat-rhythm); border-bottom-color: var(--cat-rhythm); }
.cat-btn[data-category="action"].active { color: var(--cat-action); border-bottom-color: var(--cat-action); }
.cat-btn[data-category="pets"].active { color: var(--cat-pets); border-bottom-color: var(--cat-pets); }
.cat-btn--yours {
    /* shown/hidden via JS */
    opacity: 1;
}

/* ===== Main Content ===== */
.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Spotlight / Hero Banner ===== */
.spotlight {
    margin: 1.5rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--spotlight-grad-start) 0%, var(--spotlight-grad-mid) 50%, var(--spotlight-grad-end) 100%);
    min-height: 200px;
    display: flex;
    align-items: stretch;
}

.spotlight-content {
    flex: 1;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    position: relative;
    z-index: 1;
}

.spotlight h1 {
    font-size: 2.35rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
    line-height: 1.15;
}

.spotlight p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 480px;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.spotlight-stats {
    display: flex;
    gap: 1.5rem;
}

.spotlight-stat {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.45rem;
    line-height: 1.2;
}
.spotlight-stat strong {
    font-size: 2.25rem;
    font-weight: 800;
}
.spotlight-stat span {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spotlight-art {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.spotlight-art::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, var(--spotlight-glow) 0%, transparent 70%);
}

.spotlight-floater {
    width: 250px;
    height: 125px;
    opacity: 0.15;
    transform-origin: 50% 50%;
    animation: spotlight-bounceabout 12s cubic-bezier(0.42, 0, 0.58, 1) infinite alternate;
    will-change: transform;
}

@keyframes spotlight-bounceabout {
    0%   { transform: translate3d(-34px, -18px, 0) rotate(-2.8deg); }
    20%  { transform: translate3d(34px, -28px, 0) rotate(2.5deg); }
    40%  { transform: translate3d(24px, 2px, 0) rotate(1.1deg); }
    60%  { transform: translate3d(-30px, 4px, 0) rotate(-2.2deg); }
    80%  { transform: translate3d(10px, -32px, 0) rotate(2.0deg); }
    100% { transform: translate3d(-20px, -10px, 0) rotate(-1.5deg); }
}

/* Spotlight layout when gamercard is visible */
.spotlight--has-card .spotlight-content {
    flex: 1 1 auto;
}
.spotlight--has-card .spotlight-art {
    display: none;
}

/* ===== Gamercard ===== */
.gamercard {
    flex: 0 0 520px;
    margin: 1rem 1.25rem 1rem 0;
    background: var(--gc-bg);
    border-radius: 10px;
    border: 1px solid var(--gc-border);
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    color: var(--gc-text);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
    z-index: 1;
}

.gamercard-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.gamercard-avatar {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid color-mix(in srgb, var(--gc-border) 92%, transparent 8%);
    background: var(--gc-avatar-bg);
    flex-shrink: 0;
}

.gc-no-avatar {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 2px solid color-mix(in srgb, var(--gc-border) 92%, transparent 8%);
    background: var(--gc-avatar-bg);
    color: var(--gc-muted);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    padding: 0 4px;
}

.gc-sprite-box {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 2px solid color-mix(in srgb, var(--gc-border) 92%, transparent 8%);
    background: var(--gc-avatar-bg);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gc-sprite {
    width: 48px;
    height: 48px;
    background-size: 144px 192px;
    background-position: -48px 0;
    background-repeat: no-repeat;
    image-rendering: pixelated;
}

.gc-no-sprite {
    font-size: 0.58rem;
    color: var(--gc-muted);
    text-align: center;
    line-height: 1.2;
    padding: 0 4px;
}

.gamercard-identity {
    flex: 1;
    min-width: 0;
}

.gamercard-identity-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.gamercard-identity-link .gamercard-name,
.gamercard-identity-link .gamercard-handle,
.gc-avatar-link .gamercard-avatar,
.gc-avatar-link .gc-no-avatar {
    cursor: pointer;
}

.gamercard-identity-link:hover {
    text-decoration: none;
}

.gamercard-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.22;
    padding-bottom: 1px;
}

.gamercard-handle {
    font-size: 0.72rem;
    color: var(--gc-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gamercard-social {
    display: flex;
    gap: 0.65rem;
    margin-top: 2px;
    font-size: 0.65rem;
    color: var(--gc-muted);
}
.gamercard-social span {
    white-space: nowrap;
}
.gamercard-social strong {
    color: var(--gc-text);
    font-weight: 600;
}

.gc-badges {
    display: flex;
    gap: 0.3rem;
    width: 100%;
    align-items: stretch;
}

.gc-badge-col {
    --gc-side-width: 156px;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    align-items: flex-end;
    margin-top: 0;
    width: var(--gc-side-width);
}

.gc-badge {
    border-radius: 10px;
    padding: 0.26rem 0.32rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
    border: 1px solid transparent;
}

.gc-badge-label {
    font-size: 0.42rem;
    font-weight: 700;
    color: var(--gc-muted);
    letter-spacing: 0.5px;
    line-height: 1;
    margin-bottom: 2px;
}

.gc-badge-value {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.1;
}

.gc-badge--games {
    --gc-badge-accent: var(--blue);
    background: color-mix(in srgb, var(--gc-badge-accent) 14%, transparent);
    border-color: color-mix(in srgb, var(--gc-badge-accent) 32%, transparent);
}
.gc-badge--games .gc-badge-value { color: var(--gc-badge-accent); }

.gc-badge--items {
    --gc-badge-accent: color-mix(in srgb, var(--blue-dark) 72%, var(--gc-text) 28%);
    background: color-mix(in srgb, var(--gc-badge-accent) 14%, transparent);
    border-color: color-mix(in srgb, var(--gc-badge-accent) 32%, transparent);
}
.gc-badge--items .gc-badge-value { color: var(--gc-badge-accent); }

.gc-badge--cheevos {
    --gc-badge-accent: color-mix(in srgb, var(--blue) 48%, var(--gc-text) 52%);
    background: color-mix(in srgb, var(--gc-badge-accent) 14%, transparent);
    border-color: color-mix(in srgb, var(--gc-badge-accent) 32%, transparent);
}
.gc-badge--cheevos .gc-badge-value { color: var(--gc-badge-accent); }

.gc-meta-tags {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-end;
    width: 100%;
}

.gc-meta-tag {
    width: 100%;
    font-size: 0.62rem;
    color: var(--gc-muted);
    background: var(--gc-panel-bg);
    border: 1px solid color-mix(in srgb, var(--gc-border) 70%, transparent 30%);
    border-radius: 5px;
    padding: 0.15rem 0.42rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.gc-meta-icon {
    width: 11px;
    height: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: currentColor;
}

.gc-meta-icon svg {
    width: 11px;
    height: 11px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gc-meta-icon svg.icon-solid {
    fill: currentColor;
    stroke: none;
}

.gc-meta-label {
    color: var(--gc-muted);
}

.gc-meta-value {
    color: var(--gc-text);
    font-weight: 600;
    margin-left: auto;
}

.gc-meta-tag--genre .gc-meta-label,
.gc-meta-tag--genre .gc-meta-value {
    color: currentColor;
}

.gc-meta-tag--genre {
    width: 100%;
}

/* Bio line */
.gamercard-bio {
    font-size: 0.75rem;
    color: var(--gc-muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
    margin-top: 2px;
}
.gamercard-bio:not(:empty) { display: block; }

/* Two-column body */
.gamercard-body {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.gamercard-recent,
.gamercard-profile,
.gamercard-inventory {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gc-section-title {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gc-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 2px;
    text-align: left;
}

/* Recently played items */
.gc-recent-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    background: var(--gc-panel-bg);
    font-size: 0.72rem;
    text-decoration: none;
    color: inherit;
}
a.gc-recent-item:hover {
    background: var(--gc-panel-hover);
    text-decoration: none;
}

.gc-recent-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gc-recent-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gc-recent-icon svg.icon-solid {
    fill: currentColor;
    stroke: none;
}

.gc-recent-name {
    font-weight: 700;
    color: var(--gc-text);
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-recent-time {
    margin-left: auto;
    color: var(--gc-muted);
    font-size: 0.65rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Profile stat rows */
.gc-inventory-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    background: var(--gc-panel-bg);
    font-size: 0.72rem;
}

.gc-inventory-item--empty {
    color: #8b949e;
}

.gc-inventory-item--empty .gc-inventory-name {
    color: #8b949e;
}

.gc-inventory-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
    background: color-mix(in srgb, var(--blue) 12%, var(--gc-panel-bg) 88%);
    border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--gc-border) 70%);
    flex-shrink: 0;
    image-rendering: pixelated;
}

.gc-inventory-icon--empty {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--blue) 10%, transparent);
    border: 1px dashed color-mix(in srgb, var(--blue) 30%, var(--gc-border) 70%);
    flex-shrink: 0;
}

.gc-inventory-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    text-transform: uppercase;
    font-family: var(--font-mono, monospace);
}

.gc-inventory-name {
    color: var(--gc-text);
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gc-inventory-meta {
    margin-left: auto;
    color: var(--gc-muted);
    font-size: 0.65rem;
    white-space: nowrap;
}

.gc-inventory-empty {
    color: var(--gc-muted);
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
}

.gamercard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid color-mix(in srgb, var(--gc-border) 90%, transparent 10%);
    padding-top: 0.5rem;
    margin-top: auto;
}

.gamercard-zone {
    font-size: 0.62rem;
    color: var(--gc-zone);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.gamercard-count {
    font-size: 0.62rem;
    color: var(--gc-muted);
}

/* ===== Game Row ===== */
.game-row {
    margin-bottom: 2rem;
}

.row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0;
}

.row-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.row-title svg {
    width: 20px;
    height: 20px;
    color: var(--blue);
}

/* Dynamic color for category-filtered Featured rows */
.row-title[data-category-color="true"] {
    color: var(--row-title-color, var(--text));
}
.row-title[data-category-color="true"] svg {
    color: var(--row-title-color, var(--blue));
}

.row-see-all {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.row-see-all:hover { text-decoration: underline; }
.row-see-all svg { width: 14px; height: 14px; }

.row-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 6px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.row-scroll::-webkit-scrollbar { height: 6px; }
.row-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== Row Scroll Wrapper + Arrows ===== */
.row-scroll-wrap {
    position: relative;
}

.row-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: opacity 0.2s, box-shadow 0.15s;
    padding: 0;
}
.row-arrow svg { width: 18px; height: 18px; }
.row-arrow:hover { box-shadow: var(--shadow-hover); color: var(--blue); }
.row-arrow--left  { left: -12px; }
.row-arrow--right { right: -12px; }
.row-arrow--hidden { opacity: 0; pointer-events: none; }

/* ===== Game Tile (thumbnail card) ===== */
.game-tile {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 220px;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}
.game-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}

.tile-thumb {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tile-thumb--strategy { background: linear-gradient(135deg, #1e3a5f, #3182ce); }
.tile-thumb--rpg      { background: linear-gradient(135deg, #44337a, #805ad5); }
.tile-thumb--arcade   { background: linear-gradient(135deg, #744210, #dd6b20); }
.tile-thumb--rhythm   { background: linear-gradient(135deg, #702459, #d53f8c); }
.tile-thumb--puzzle   { background: linear-gradient(135deg, #065f46, #10b981); }
.tile-thumb--action   { background: linear-gradient(135deg, #713f12, #eab308); }
.tile-thumb--pets     { background: linear-gradient(135deg, #0e4966, #06b6d4); }
.tile-thumb--default  { background: linear-gradient(135deg, #1a365d, #4299e1); }

.tile-icon {
    width: 64px;
    height: 64px;
    color: rgba(255,255,255,0.85);
}

.tile-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.tile-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-status {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tile-status svg {
    width: 12px;
    height: 12px;
}
.tile-status--new         { background: rgba(59,130,246,0.9); color: #fff; }
.tile-status--coming-soon { background: rgba(245,158,11,0.9); color: #fff; }
.tile-status--experimental { background: rgba(239,68,68,0.9); color: #fff; }

/* ===== Tile Stats Bar (overlay on thumbnail) ===== */
.tile-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 6px 8px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    justify-content: flex-end;
}
.tile-stats span {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    white-space: nowrap;
    text-transform: capitalize;
}

.tile-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tile-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.tile-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tile-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.tile-cat {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.2;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent 30%);
    background: color-mix(in srgb, var(--white) 90%, transparent 10%);
    color: var(--text);
}

.tile-cat--strategy { --tile-cat-accent: var(--cat-strategy); }
.tile-cat--rpg      { --tile-cat-accent: var(--cat-rpg); }
.tile-cat--arcade   { --tile-cat-accent: var(--cat-arcade); }
.tile-cat--rhythm   { --tile-cat-accent: var(--cat-rhythm); }
.tile-cat--puzzle   { --tile-cat-accent: var(--cat-puzzle); }
.tile-cat--action   { --tile-cat-accent: var(--cat-action); }
.tile-cat--pets     { --tile-cat-accent: var(--cat-pets); }
.tile-cat--default  { --tile-cat-accent: var(--blue); }

.tile-cat[class*="tile-cat--"] {
    color: color-mix(in srgb, var(--tile-cat-accent) 84%, var(--text) 16%);
    background: color-mix(in srgb, var(--tile-cat-accent) 22%, var(--white) 78%);
    border-color: color-mix(in srgb, var(--tile-cat-accent) 48%, var(--border) 52%);
}

.tile-creator {
    font-size: 0.72rem;
    color: var(--text-muted);
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    text-align: right;
}

/* ===== Large Featured Tile ===== */
.game-tile--featured {
    width: 300px;
}
.game-tile--featured .tile-thumb { height: 180px; }
.game-tile--featured .tile-name { font-size: 1.1rem; }
.game-tile--featured .tile-desc {
    -webkit-line-clamp: 3;
    font-size: 0.82rem;
}

/* ===== Category Cards Section ===== */
.categories-section {
    margin-bottom: 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: var(--shadow);
}
.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}

.category-card svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.category-card--strategy svg { color: var(--cat-strategy); }
.category-card--rpg svg      { color: var(--cat-rpg); }
.category-card--arcade svg   { color: var(--cat-arcade); }
.category-card--rhythm svg   { color: var(--cat-rhythm); }
.category-card--puzzle svg   { color: var(--cat-puzzle); }
.category-card--action svg   { color: var(--cat-action); }
.category-card--pets svg     { color: var(--cat-pets); }

.category-card--strategy > span { color: var(--cat-strategy); }
.category-card--rpg > span { color: var(--cat-rpg); }
.category-card--arcade > span { color: var(--cat-arcade); }
.category-card--rhythm > span { color: var(--cat-rhythm); }
.category-card--puzzle > span { color: var(--cat-puzzle); }
.category-card--action > span { color: var(--cat-action); }
.category-card--pets > span { color: var(--cat-pets); }

.category-card .cat-count {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.7rem;
}
.category-card .cat-count strong {
    font-weight: 700;
    color: var(--text);
}

/* ===== Promise Section (info strip) ===== */
.promise-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.promise-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-align: center;
    color: var(--text);
}

.promise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.promise-card {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    background: var(--promise-card-bg);
    border: 1px solid color-mix(in srgb, var(--blue) 20%, var(--border) 80%);
}
.promise-card svg {
    width: 36px;
    height: 36px;
    color: var(--blue);
    margin-bottom: 0.75rem;
}
.promise-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.promise-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== Submit CTA ===== */
.submit-cta {
    background: linear-gradient(135deg, var(--submit-cta-start) 0%, var(--submit-cta-end) 100%);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #fff;
}
.submit-cta h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #fff;
}
.submit-cta p {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 1.25rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.4rem;
    background: var(--submit-cta-button-bg);
    color: var(--submit-cta-button-text);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.15s;
}
.cta-btn:hover { background: var(--submit-cta-button-hover); text-decoration: none; transform: translateY(-1px); }
.cta-btn svg { width: 16px; height: 16px; }

/* ===== Footer ===== */
.site-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--blue); }

/* ===== No Results ===== */
.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 2rem;
    font-size: 0.95rem;
}

/* ===== Responsive ===== */
@media (min-width: 701px) {
    .access-splash__codeform {
        display: none;
    }
}

@media (max-width: 700px) {
    .access-splash__subtext {
        white-space: normal;
    }

    .access-splash-gamercard-wrap {
        width: min(96vw, 560px);
    }

    .header-inner {
        padding: 0 0.7rem;
        gap: 0.65rem;
    }
    .header-logo {
        gap: 0;
        min-width: 0;
    }
    .header-logo span {
        display: none;
    }
    .login-btn .btn-icon { display: none; }
    .login-label-full { display: none; }
    .login-label-short { display: inline; }
    .theme-toggle {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }
    .spotlight { flex-direction: column; min-height: auto; }
    .spotlight-art { display: none; }
    .spotlight-content { padding: 1.5rem; }
    .spotlight--has-card .spotlight-content { max-width: none; }
    .spotlight h1 {
        font-size: clamp(1.2rem, 6.1vw, 1.75rem);
        white-space: nowrap;
    }
    .spotlight + .gamercard {
        margin-top: 0.75rem;
    }
    .gamercard {
        flex: 0 0 auto;
        width: 100%;
        margin: 0 0 1rem;
        padding: 0.9rem;
        border-radius: 12px;
        gap: 0.6rem;
    }
    .gamercard-header {
        display: grid;
        grid-template-columns: 56px 56px minmax(0, 1fr);
        grid-template-areas:
            'avatar sprite identity'
            'badges badges badges';
        column-gap: 0.55rem;
        row-gap: 0.5rem;
        align-items: start;
    }
    .gamercard-avatar,
    .gc-no-avatar,
    .gc-sprite-box {
        width: 56px;
        height: 56px;
        border-radius: 8px;
    }
    .gamercard-avatar,
    .gc-no-avatar {
        grid-area: avatar;
    }
    .gc-sprite-link {
        grid-area: sprite;
    }
    .gc-sprite {
        width: 48px;
        height: 48px;
    }
    .gamercard-identity {
        grid-area: identity;
        min-width: 0;
    }
    .gamercard-name {
        font-size: 0.98rem;
    }
    .gamercard-handle {
        font-size: 0.68rem;
        margin-top: 1px;
    }
    .gamercard-social {
        font-size: 0.62rem;
        gap: 0.45rem;
    }
    .gc-badge-col {
        grid-area: badges;
        width: 100%;
        --gc-side-width: auto;
        align-items: stretch;
        gap: 0.35rem;
    }
    .gc-badges {
        width: 100%;
        gap: 0.35rem;
    }
    .gc-badge {
        padding: 0.28rem 0.3rem;
    }
    .gc-badge-label {
        font-size: 0.39rem;
    }
    .gc-badge-value {
        font-size: 0.84rem;
    }
    .gc-meta-tag {
        font-size: 0.59rem;
        padding: 0.22rem 0.4rem;
        gap: 0.24rem;
    }
    .gc-meta-value {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .gamercard-body {
        flex-direction: column;
        gap: 0.5rem;
    }
    .gc-section-title {
        font-size: 0.55rem;
    }
    .gc-recent-item,
    .gc-inventory-item {
        padding: 0.3rem 0.45rem;
        font-size: 0.68rem;
    }
    .gc-recent-time,
    .gc-inventory-meta {
        font-size: 0.58rem;
    }
    .gamercard-footer {
        gap: 0.4rem;
        flex-wrap: wrap;
    }
    .gamercard-zone,
    .gamercard-count {
        font-size: 0.58rem;
    }
    .game-tile { width: 170px; }
    .game-tile--featured { width: 240px; }
    .game-tile--featured .tile-thumb { height: 140px; }
    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .category-card {
        min-width: 0;
        gap: 0.45rem;
        padding: 0.68rem 0.62rem;
        font-size: 0.8rem;
        border-radius: 10px;
    }
    .category-card svg {
        width: 20px;
        height: 20px;
    }
    .category-card > span:first-of-type {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .category-card .cat-count {
        margin-left: auto;
        min-width: 2.05rem;
        font-size: 0.62rem;
        line-height: 1;
        flex-shrink: 0;
    }
    .category-card .cat-count strong:last-child {
        font-size: 0.56rem;
    }
    .main-content { padding: 0 1rem; }
}
