/* ══════════════════════════════════════════════════════════════════════════
   Cruze Games — modernization layer
   Loads after base/components/gaming-theme/responsive/community. Adds a
   light mode alongside the 5 existing dark themes, and polish for the
   navbar, footer, and card elevation. Never overrides the 5 theme palettes.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Light mode: overrides only the neutral/surface/text tokens, so every
   existing theme's accent + gradient values keep working unchanged. ─────── */
body[data-mode="light"] {
    --bg-primary: #f3f5fa;
    --bg-secondary: #e9edf6;
    --bg-tertiary: #dfe5f2;
    --surface-1: rgba(255, 255, 255, 0.86);
    --surface-2: rgba(255, 255, 255, 0.95);
    --surface-3: rgba(255, 255, 255, 0.99);
    --surface-4: rgba(37, 99, 235, 0.06);
    --text-primary: #10162a;
    --text-secondary: #333f5c;
    --text-muted: #616e8c;
    --line-soft: rgba(16, 22, 42, 0.10);
    --line-strong: rgba(37, 99, 235, 0.22);
    --shadow-soft: 0 12px 28px rgba(16, 22, 42, 0.08);
    --shadow-strong: 0 26px 60px rgba(16, 22, 42, 0.12);
    --meta-theme-color: #f3f5fa;
}

body[data-mode="light"] {
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.10), transparent 26rem),
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.07), transparent 24rem),
        var(--bg-primary);
}

body[data-mode="light"] .site-scene,
body[data-mode="light"] .hero-particles,
body[data-mode="light"] .gamer-fx {
    opacity: 0.45;
}

body[data-mode="light"] ::-webkit-scrollbar-track {
    background: rgba(16, 22, 42, 0.05);
}

body[data-mode="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08), 0 10px 30px rgba(16, 22, 42, 0.10);
}

/* ── Mode toggle chip (Dark / Light) in the Theme Lab drawer ─────────────── */
.theme-switcher-controls-mode {
    display: flex;
    gap: var(--space-2);
}

.theme-chip-mode {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.theme-chip-mode svg {
    flex-shrink: 0;
}

/* ── Navbar polish ─────────────────────────────────────────────────────── */
.nav-become-dev-btn {
    box-shadow: 0 8px 20px rgba(78, 161, 255, 0.22);
}

.nav-link {
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0.1rem;
    right: 0.1rem;
    bottom: -0.6rem;
    height: 2px;
    border-radius: var(--radius-pill);
    background: var(--gradient-brand);
}

/* ── Footer: elevate from plain link columns to a proper storefront foot ─ */
.footer {
    position: relative;
    margin-top: var(--space-12);
    border-top: 1px solid var(--line-soft);
    background:
        linear-gradient(180deg, var(--surface-4) 0%, transparent 40%),
        var(--bg-secondary);
    padding-block: clamp(3rem, 6vw, 4.5rem) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.footer-brand {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.footer-logo-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.footer-brand strong {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.footer-brand p {
    margin-top: var(--space-2);
    max-width: 26rem;
}

.footer-kicker {
    display: inline-block;
    margin-top: var(--space-3);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-cyan);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links h4 {
    font-family: var(--font-display);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.footer-links a,
.footer-links button.footer-search {
    color: var(--text-secondary);
    font-size: 0.92rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
    width: fit-content;
}

.footer-links a:hover,
.footer-links button.footer-search:hover {
    color: var(--text-primary);
    transform: translateX(2px);
}

.footer-search {
    text-align: left;
    cursor: pointer;
}

.footer-bottom {
    border-top: 1px solid var(--line-soft);
    padding-block: var(--space-5);
}

.footer-bottom p {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-7);
    }
}

/* ── Card elevation refinement (additive: existing hover/glow untouched) ── */
.game-card {
    will-change: transform;
}

.game-card:hover {
    box-shadow: var(--shadow-strong);
}

/* ── Light mode: the most visible panels hardcode a dark navy surface
   rather than reading --surface-*, so they need explicit overrides here.
   (Deeper specialty chrome — admin dashboards, profile panels — still
   defaults to its dark styling in light mode; flagged as a follow-up.) ── */
body[data-mode="light"] .hero-stage,
body[data-mode="light"] .player-shell-inner,
body[data-mode="light"] .game-card {
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
}

body[data-mode="light"] .status-panel-inner {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 18rem),
        var(--surface-3);
    border-color: var(--line-soft);
    box-shadow: var(--shadow-soft);
}

body[data-mode="light"] .hero-title-brand {
    background:
        linear-gradient(115deg, #b45309 0%, #0f172a 32%, #0369a1 62%, #15803d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: none;
    filter: none;
}
