:root {
    /* --- GLOBAL DEFAULTS (Dark Theme Fallback) --- */
    
    /* 1. Backgrounds & Atmosphere */
    --theme-bg: #2d1b36;                /* Main background color */
    --theme-glow-1: rgba(255, 126, 179, 0.25); /* Left radial glow */
    --theme-glow-2: rgba(161, 140, 209, 0.2);  /* Right radial glow */
    --theme-pattern-opacity: 0.3;       /* Dot pattern intensity */

    /* 2. Panels (Glass vs Solid) */
    /* Defaulting to the "High Contrast" look you liked */
    --panel-bg: rgba(30, 10, 30, 0.9);  
    --panel-border: rgba(255, 255, 255, 0.15);
    
    /* 3. Badges */
    --badge-bg: #2d1b36;
    --badge-txt: #ffffff;
    --badge-border: rgba(255, 255, 255, 0.2);

    /* 4. Text */
    --text-shadow-h1: 0 4px 10px rgba(0, 0, 0, 0.6);
    --text-highlight: #6accfe; /* For hashtags/micro-tags */

    /* 5. PRIMARY BUTTON (Gradients) */
    --btn-grad-start: #6ccfff;  /* Light Blue */
    --btn-grad-end: #2a7ed5;    /* Deep Blue */
    --btn-border: rgba(184, 236, 255, 0.85);
    --btn-glow: rgba(108, 207, 255, 0.38);
    --btn-text: #ffffff;

    /* 6. SECONDARY BUTTON (Solid) */
    --btn-sec-bg: #2b7fd8;
    --btn-sec-hover: #4da3ff;
    --btn-sec-border: rgba(184, 236, 255, 0.45);

    --col-primary: #ff7eb3;
    --radius-xl: 12px;
    --radius-lg: 16px;
    --radius-pill: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Nunito', 'Segoe UI', sans-serif; /* Rounder font if available */
    background-color: var(--theme-bg);
    color: white;
    height: 100dvh;
    overflow: hidden;
}

a { text-decoration: none; color: inherit; }

/* --- 1. BACKGROUND STACK (The Atmosphere) --- */
.bg-stack {
    position: fixed; inset: 0; z-index: -1;
    background-color: var(--theme-bg);
    overflow: hidden;
}

/* The Glowing Blobs (CSS Generated Atmosphere) */
.bg-gradient {
    position: absolute; inset: 0; z-index: 2;
    background: 
        radial-gradient(circle at 10% 20%, var(--theme-glow-1) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, var(--theme-glow-2) 0%, transparent 50%);
    opacity: 0.6;
    mix-blend-mode: overlay;
    pointer-events: none;
}


.bg-pattern {
    position: absolute; inset: 0; z-index: 1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.25) 2px, transparent 2px);
    opacity: var(--theme-pattern-opacity);
    background-size: 32px 32px;
    mask-image: linear-gradient(135deg, black 0%, black 40%, transparent 90%);
    -webkit-mask-image: linear-gradient(135deg, black 0%, black 40%, transparent 90%);
}


/* --- 2. HERO SLIDESHOW (The Character) --- */
.hero-slideshow {
    position: absolute; z-index: 3; pointer-events: none;
    top: 0; left: 0; width: 100%; height: 35vh;
}

.hero-slide {
    display: block; width: 100%; height: 100%;
    position: absolute; inset: 0; opacity: 0;
    transition: opacity 1s ease;
    mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
}

.hero-slide.active { opacity: 1; z-index: 2; }

/* 2. The Image (<img>) */
.hero-img {
    display: block; width: 100%; height: 100%;
    object-fit: cover; object-position: top center; 
}

/* --- DESKTOP OVERRIDES (Landscape) --- */
@media (min-width: 1024px) {
    
    .bg-gradient {
        background: radial-gradient(circle at 75% 50%, var(--theme-glow-1) 0%, transparent 60%);
    }
    .hero-slideshow {
        top: 0; right: 0; left: auto;
        width: 53vw; height: 80%;
    }


    .hero-slide {
        --fade-left: 260px; --fade-bottom: 320px;
        -webkit-mask-image:
        linear-gradient(to bottom, black 0%, black calc(100% - var(--fade-bottom)), transparent 100%),
        linear-gradient(to right, transparent 0%, black var(--fade-left));
        -webkit-mask-composite: source-in;
        mask-composite: intersect;
        mask-image:
        linear-gradient(to bottom, black 0%, black calc(100% - var(--fade-bottom)), transparent 100%),
        linear-gradient(to right, transparent 0%, black var(--fade-left));
    }
    .hero-img { object-position: right 0; }
}

/* --- APP LAYOUT (Flex Column) --- */
.app-layout {
    display: flex; flex-direction: column;
    height: 100%; max-width: 500px;
    margin: 0 auto; position: relative;
}

.site-header {
    flex-shrink: 0; padding: 10px 1rem; z-index: 100;
    grid-column: 1 / -1; 
}
.header-pill {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1rem;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.header-left-group {
    display: flex; align-items: center; gap: 15px; overflow: hidden;
}
.header-game-title {
    font-weight: 800; font-size: 0.9rem; color: white;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 200px;
}
.header-game-links {
    display: flex; align-items: center; gap: 10px; padding-left: 15px;
    border-left: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

@media (max-width: 1023px) {
    .header-pill {
        gap: clamp(8px, 3vw, 14px);
    }

    .header-left-group {
        flex: 1 1 auto;
        min-width: 0;
        gap: clamp(10px, 3vw, 15px);
    }

    .header-game-title {
        flex: 1 1 auto;
        min-width: 46px;
        max-width: clamp(108px, 38vw, 168px);
    }

    .header-game-links {
        width: clamp(96px, 28vw, 108px);
        gap: 0;
        justify-content: space-between;
        padding-left: clamp(8px, 2.2vw, 12px);
        padding-right: 2px;
    }

    .header-nav-actions {
        flex-shrink: 0;
    }

    .mobile-social-title-toggle {
        cursor: pointer;
    }
}

@media (max-width: 330px) {
    .header-game-links {
        width: 74px;
    }

    .header-game-links .itch.mobile-header-only {
        display: none !important;
    }
}

@media (max-width: 320px) {
    .header-game-links {
        width: 42px;
    }

    .header-game-links .discord {
        display: none !important;
    }
}
.header-nav-actions, .header-right {
    display: flex; align-items: center; gap: 10px;
}

.nav-home-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--text-highlight);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s;
    font-size: 1.2rem;
}
.nav-home-btn:hover {
    background: var(--text-highlight); color: white;
    box-shadow: 0 0 10px rgba(255, 126, 179, 0.5);
}


.svg-icon {
    display: inline-block; width: 1em; height: 1em;
    fill: currentColor; stroke: currentColor; stroke-width: 0;
    vertical-align: -0.125em; flex-shrink: 0;
}


.header-game-links .svg-icon { width: 22px; height: 22px; }
.btn-icon .svg-icon { width: 28px; height: 28px; }

.header-game-links .h-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.h-icon:hover { color: var(--btn-sec-hover); }
.v-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.2); }

.mobile-social-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 3000;
    width: min(78vw, 280px);
    height: 100dvh;
    padding: 16px;
    background: color-mix(in srgb, var(--panel-bg), black 14%);
    border-left: 1px solid rgba(255,255,255,0.18);
    box-shadow: -18px 0 45px rgba(0,0,0,0.42);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.header-game-links.mobile-social-open .mobile-social-drawer {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.mobile-social-close {
    align-self: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: white;
    cursor: pointer;
}

.mobile-social-close .svg-icon {
    width: 22px;
    height: 22px;
}

.mobile-social-drawer-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: rgba(255,255,255,0.68);
    text-transform: uppercase;
}

.mobile-social-link-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: white;
    font-weight: 800;
}

.mobile-social-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-highlight);
}

.mobile-social-link .svg-icon {
    width: 22px;
    height: 22px;
}

/* --- B. FIXED TOP ZONE (Title + Buttons) --- */
.fixed-top-zone {
    flex-shrink: 0;
    padding: 0 1.5rem 1rem 1.5rem;
    z-index: 90;
    
    /* VITAL: Create space for Hero Art between Header and Title */
    padding-top: 50px; 
    transition: padding 0.3s;
}

/* On taller screens, give even more space */
@media (min-height: 700px) {
    .fixed-top-zone { padding-top: 80px; }
}

.title-limit-width {
    width: 65%; /* Leave room for Hero on right */
}



.badge-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.badge { 
    font-size: 0.6rem; 
    background-color: var(--badge-bg);
    color: var(--badge-txt);
    border: 1px solid var(--badge-border);
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
    white-space: nowrap; padding: 3px 8px; border-radius: 6px;
}

.badge-18 {
    background-color: #3d0000; border-color: #ff4444; color: #ffcbcb;
}

.btn-steam { color: #66c0f4; }
.btn-itch { color: #fa5c5c; }
.btn-patreon { color: #f96854; }
.desktop-header-only { display: none; }
.mobile-header-only { display: flex; }
.header-game-links .desktop-header-only { display: none !important; }

.scrollable-content {
    flex-grow: 1; overflow-y: auto; overflow-x: hidden;
    padding: 0 1.5rem;
    mask-image: linear-gradient(to bottom, transparent 0%, black 20px, black 95%, transparent 100%);
    scrollbar-width: none;
}

.content-wrapper { 
    padding-top: 2rem; /* Give space from the top mask */
    padding-bottom: 2rem;
}

.game-hero-header { margin-left: -20px; margin-right: -20px; padding: 20px; }

.game-title-h1 {
    font-size: 2.2rem; line-height: 1.1; margin-bottom: 0.8rem;
    text-shadow: var(--text-shadow-h1);
    max-width: 90%; text-wrap: balance; 
}

/* Info Stack (Description + Tags) */
.info-stack {
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.desc-box {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    padding: 1.25rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border: 1px solid var(--theme-panel-border);
    border-bottom: none;
    font-size: 0.95rem; line-height: 1.5; color: #f0f0f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.tag-box {
    background: color-mix(in srgb, var(--panel-bg), black 30%);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.25rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex; gap: 8px; flex-wrap: wrap;
}
.micro-tag {
    font-size: 0.75rem; color: var(--text-highlight);
    filter: brightness(1.2); font-weight: 700;
}

/* Marquee Screenshots */
.marquee-section { margin-bottom: 2rem; }


.marquee-container {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}


.screen-item {
    flex: 0 0 auto; width: 200px; aspect-ratio: 16/9;
    cursor: pointer; transition: transform 0.2s, border-color 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden; border-radius: 12px;
}

.screen-item img {
    width: 100%; height: 100%; object-fit: cover;
    pointer-events: none; -webkit-user-drag: none;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 6px)); }
}

.spacer-bottom { height: 2rem; }


.bottom-zone {
    flex-shrink: 0; 
    padding-bottom: 5px;
    
    /* FIX 1: Change 0% color to Solid Black (#000000) so it merges perfectly with footer */
    background: linear-gradient(
        to top, 
        #000000 0%, 
        rgba(0, 0, 0, 0.7) 40%, 
        transparent 100%
    );
    
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 100;

    /* FIX 2: Pull the footer up by 1px to close the sub-pixel gap */
    margin-bottom: -10px;
}

.card-deck-centered {
    display: flex; align-items: flex-end; justify-content: center;
    gap: 20px; height: 130px; padding-bottom: 10px;
}

.deck-slot-active .card {
    width: 90px; height: 120px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(255, 126, 179, 0.4);
    border: 2px solid white;
    transform: translateY(-5px); transition: all 0.2s ease;
}
.card-img { 
    width: 100%; height: 100%; background-size: cover; border-radius: inherit; 
}
.card-pill {
    display: none; position: absolute; bottom: -8px; left: 50%; 
    transform: translateX(-50%); background: white; color: black; 
    font-weight: 800; padding: 2px 8px; border-radius: 12px; 
    font-size: 0.65rem; box-shadow: 0 2px 4px rgba(0,0,0,0.3); white-space: nowrap;
}


.deck-strip-mask {
    overflow: hidden; width: 180px; height: 95px;
    mask-image: linear-gradient(to right, black 0%, transparent 100%);
    display: flex; align-items: flex-end; 
}


.card.mini {
    width: 65px; height: 85px; border-radius: 8px; opacity: 0.6; flex-shrink: 0;
}

.site-footer { padding: 0px 1rem; background: black;}
.footer-pill {
    text-align: center; padding: 10px; color: rgba(255,255,255,0.9); font-size: 0.75rem;
}


.footer-links a:hover { color: var(--col-primary); text-decoration: underline; }

.cta-container {
    margin: 1.5rem 0 2.5rem 0; /* Space it out from tags and screenshots */
}
.cta-row { display: flex; gap: 10px; }

.big-btn {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding: 12px; margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    
    background: linear-gradient(135deg, var(--btn-grad-start) 0%, var(--btn-grad-end) 75%);
    border: 2px solid var(--btn-border);
    color: var(--btn-text);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), 0 0 26px var(--btn-glow), 0 10px 26px rgba(0,0,0,0.22);
    border-radius: 12px; transition: all .25s cubic-bezier(.25,1,.5,1);
    position: relative; overflow: hidden; z-index: 1;
}

.big-btn:hover {
    transform: translateY(-3px); filter: brightness(1.10) contrast(1.05);
    border-color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3), 0 0 34px var(--btn-grad-start), 0 14px 34px rgba(0,0,0,0.28);
}

.big-btn:active { transform: scale(0.98); }


/* --- UPDATE: Secondary Buttons (Itch/Patreon) --- */
.med-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px; border-radius: 10px;
    background: var(--btn-sec-bg);
    border: 1px solid var(--btn-sec-border);
    color: rgba(255,255,255,0.95);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 6px 16px rgba(0,0,0,0.18);
    font-weight: 700; font-size: 0.9rem; transition: all 0.2s ease;
    color: var(--btn-sec-text, #ffffff); /* Fallback to white */
    text-shadow: none; /* Removed shadow to clean up high contrast text */
}

.med-btn:hover { 
    background: var(--btn-sec-hover); border-color: #ffffff; 
    color: var(--btn-sec-text-hover, #ffffff); /* Allow override on hover */
    transform: translateY(-2px);
    box-shadow: 0 0 18px var(--btn-sec-hover), 0 10px 22px rgba(0,0,0,0.24);
}


.btn-sub { 
    font-size: 0.75rem; 
    color: rgba(255, 255, 255, 0.8); 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

@media (min-width: 1024px) {
    .app-layout {
        display: grid;
        grid-template-columns: 850px 1fr; 
        grid-template-rows: auto 1fr auto; 
        max-width: 1800px; margin: 0 auto; height: 100vh;
    }

    .site-header { padding: 25px 50px; }
    .header-pill { padding: 0.8rem 2rem; height: 60px; }
    .header-game-title { font-size: 1.2rem; max-width: none; }
    .header-game-links { gap: 15px; padding-left: 25px; margin-left: 10px; }

    .h-icon {
        font-size: 1.6rem; padding: 8px; border-radius: 8px;
        background: rgba(255,255,255,0.05);
        display: flex; align-items: center; justify-content: center;
        transition: all 0.2s ease;
    }

    .h-icon:hover {
        background: rgba(255,255,255,0.2);
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }
    
    /* Specific color boosts on hover */
    .h-icon.steam:hover { color: var(--text-highlight); }
    .h-icon.discord:hover { color: var(--text-highlight); }
    .h-icon.patreon:hover { color: var(--text-highlight); }
    .h-icon.twitter:hover { color: var(--text-highlight); }
    .h-icon.telegram:hover { color: var(--text-highlight); }
    .desktop-header-only { display: flex; }
    .mobile-header-only {
        display: none !important;
    }
    .header-game-links .desktop-header-only { display: flex !important; }
    .mobile-social-drawer {
        display: none;
    }
    /* Nav & Divider Visibility */
    .mobile-only { display: none !important; }
    .desktop-only { display: block; }
    .v-divider { height: 24px; margin: 0 15px; background: rgba(255,255,255,0.15); }

    .desktop-nav { display: flex; gap: 25px; margin-right: 10px; }
    .nav-link { font-size: 1rem; font-weight: 700; color: #ccc; transition: 0.2s; }
    .nav-link:hover { color: var(--col-primary); }

    .fixed-top-zone {
        grid-column: 1; grid-row: 2; 
        padding-left: 65px; padding-top: 40px; width: 100%; z-index: 50;
        pointer-events: none; 
    }

    .fixed-top-zone * { pointer-events: auto; }

    .title-limit-width { width: 100%; }
    

    .badge { font-size: 0.9rem; padding: 5px 12px; }
    .game-hero-header {
        background: none; /* Reset gradient on desktop if text is on solid bg */

    }
    .scrollable-content {
        grid-column: 1;
        grid-row: 2; 
        
        padding-left: 65px;
        padding-right: 60px;
        padding-top: 20px; /* Reduced since no fixed header overlap */
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.1) transparent; 
        padding-bottom: 20px; /* Reduced padding since footer is separate now */
        z-index: 10;
    }

    .game-title-h1 {
        font-size: 4.5rem; 
        letter-spacing: -2px;
    }
    /* Wider Description & Buttons */
    .content-wrapper { 
        padding-bottom: 100px; 
        max-width: 100%;
    }
    
    .desc-box { font-size: 1.1rem; padding: 1.5rem; line-height: 1.6; }
    .tag-box { padding: 0.8rem 1.5rem; }
    .micro-tag { font-size: 0.85rem; margin-right: 10px; }

    .cta-container { margin: 2rem 0 3rem 0; }
    .big-btn { padding: 18px; }
    .btn-label { font-size: 1.2rem; }
    .med-btn { padding: 14px; font-size: 1rem; }

    /* 4. SCREENSHOTS (Restored Scrolling) */
    .marquee-container {
        width: 100%;
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }
    

    .marquee-track::-webkit-scrollbar { height: 8px; }
    .marquee-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

    .screen-item {
        width: 320px; /* Desktop width */
    }
    .screen-item:hover {
        transform: scale(1.02);
        border-color: white;
        z-index: 5;
    }
    
    /* 5. BACKGROUND (Align Right) */
    .bg-hero {
        background-position: 80% center; 
        opacity: 0.9;
    }

    /* 6. BOTTOM ZONE (Right Aligned) */
    .bottom-zone {
        /* Moves to Row 2 (shared with content) but Column 2 */
        grid-column: 2;
        grid-row: 2;
        
        /* Pins it to the bottom of the content area */
        align-self: end;
        
        position: relative;
        background: none;
        padding: 0 60px 20px 0; /* Add space so it doesn't touch footer */
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-end;
        pointer-events: none; /* Let clicks pass through empty areas */

        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .card-deck-centered {
        pointer-events: auto;
        gap: 30px;
    }

    /* Active Card - Bigger */
    .deck-slot-active .card {
        width: 140px;
        height: 180px;
        transform: translateY(-25px);
        box-shadow: 0 0 30px rgba(255, 126, 179, 0.3);
    }
    .card-pill { font-size: 0.9rem; padding: 6px 14px; bottom: -12px; }

    /* Strip */
    .deck-strip-mask {
        width: 350px;
        height: 150px;
        mask-image: linear-gradient(to right, transparent 0%, black 15%, black 100%);
    }
    .card.mini { width: 95px; height: 125px; }

    .site-footer {
        /* Spans entire width of the grid */
        grid-column: 1 / -1;
        grid-row: 3;
        
        /* 1. Remove background/border from the container itself */
        background: none;
        border: none;
        height: auto; /* Let padding define the space */
        
        /* 2. MATCH HEADER PADDING */
        /* Header has 25px top/bottom. We use bottom padding 
           to float it off the screen edge. */
        padding: 0 50px 0px 50px; 
        
        /* Ensure it sits above background elements */
        z-index: 100;
        pointer-events: none; /* Allows clicks around the pill */
    }
    
    .footer-pill {
        pointer-events: auto;
        
        /* 3. MATCH HEADER DIMENSIONS & STYLE */
        height: 20px;
        width: 100%;
        
        /* Glass Effect (Same as .header-pill) */




        
        /* 4. CENTER TEXT */
        display: flex;
        align-items: center;
        justify-content: center;

        font-size: 0.5rem;
        font-weight: 600;
    }
}

/* ... existing css ... */

/* --- VIEW TRANSITIONS API CONFIG --- */
@media (prefers-reduced-motion: no-preference) {
    
    /* 1. The Header stays anchored at the top */
    .header-pill {
        view-transition-name: site-header;
    }

    /* 2. The Background morphs color/image smoothly */
    .bg-hero {
        view-transition-name: hero-bg;
    }

    /* 3. The Active Card Slot morphs content */
    /* This creates a cool effect where the card seems to 'become' the new one */
    .deck-slot-active .card {
        view-transition-name: active-deck-card;
    }

    /* 4. The Content slides slightly */
    .scrollable-content {
        view-transition-name: main-content;
    }
}

/* Custom Animation for the Content Slide */
::view-transition-old(main-content) {
    animation: fade-out 0.3s ease-in-out forwards;
}
::view-transition-new(main-content) {
    animation: slide-up-fade 0.4s ease-in-out forwards;
}

@keyframes fade-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

@keyframes slide-up-fade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ... existing styles ... */

/* --- 1. REMOVE CSS ANIMATIONS & ENABLE NATIVE SCROLL --- */

.marquee-container, .deck-strip-mask {
    /* Ensure the container cuts off content */
    overflow: hidden; 
    position: relative;
}

.marquee-track, .deck-strip-track {
    display: flex; gap: 15px; overflow-x: auto; cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none; -webkit-overflow-scrolling: touch;
}



.marquee-track::-webkit-scrollbar, 
.deck-strip-track::-webkit-scrollbar { 
    display: none; 
}

.marquee-track:active, .deck-strip-track:active {
    cursor: grabbing;
}

.marquee-track { width: 100%; max-width: 100%; }
.deck-strip-track { width: max-content; }

.screen-item,
.card.mini {
  flex: 0 0 auto;
}


/* --- 2. SCREENSHOT LIGHTBOX (New) --- */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 5, 15, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    width: auto; 
    height: auto; 
    object-fit: contain;
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* Prevent body scroll when lightbox is open */
body.no-scroll { overflow: hidden !important; }

/* =========================================
   HUB VIEW (INDEX) OVERRIDES
   ========================================= */

@media (min-width: 1024px) {
    /* 1. Layout Container: Use Flex Column */
    .app-layout.hub-view {
        display: flex;          /* Changed from block to flex */
        flex-direction: column; /* Stack vertically */
        height: 100vh;
        overflow: hidden;       /* No body scroll */
        position: relative;
    }

    /* 2. Header: Floating absolutely on top */
    .app-layout.hub-view .site-header {
        position: absolute;
        width: 100%;
        top: 0;
        z-index: 100;
        /* Padding handled by content top-padding */
    }

    /* 3. Content: Takes all REMAINING space */
    .app-layout.hub-view .scrollable-content {
        flex-grow: 1;        /* Grow to fill space between top and footer */
        height: auto;        /* Don't force 100% */
        overflow-y: auto;    /* Scroll internally */
        
        padding-top: 100px;  /* Clear the header */
        padding-left: 50px;
        padding-right: 50px;
        padding-bottom: 20px;
        
        max-width: 1400px;
        width: 100%;
        margin: 0 auto;
    }

    /* 4. Footer: Sits naturally at the bottom (flex item) */
    .app-layout.hub-view .site-footer {
        flex-shrink: 0;      /* Prevent crushing */
        width: 100%;
        z-index: 100;
        
        /* Reset Grid positioning from the game-page styles */
        grid-column: auto;
        grid-row: auto;
        
        /* Add some spacing for the hub look */
        padding: 0 50px 0px 50px; 
        pointer-events: auto;
    }
    

}


/* --- HUB GRID SYSTEM --- */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding-bottom: 100px;
}

@media (min-width: 768px) {
    .hub-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 30px;
    }
}

/* --- PREMIUM GAME CARD --- */
.game-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    z-index: 2;
}

/* Card Image Aspect Ratio 3:4 */
.card-thumb {
    width: 100%;
    aspect-ratio: 3/4;
    position: relative;
    /* Remove background-size/position, add overflow hidden to crop the img */
    overflow: hidden; 
    background-color: rgba(255, 255, 255, 0.05); /* Placeholder while loading */
}

/* NEW: Style the actual image tag */
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

/* Gradient Overlay on Thumb (Remains the same, but ensure z-index) */
.card-thumb::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.8) 100%);
    z-index: 2; /* Sits on top of the image */
    pointer-events: none;
}

/* Update Hover Effect to target the IMG instead of the div */
.game-card:hover .card-thumb img {
    transform: scale(1.08); /* Slight zoom on hover */
}

.card-meta {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-title {
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.tiny-pill {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: #ccc;
    font-weight: 700;
    text-transform: uppercase;
}

.tp-sfw { color: #88ff88; background: rgba(0, 255, 0, 0.1); }
.tp-18 { color: #ff8888; background: rgba(255, 0, 0, 0.15); }

.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(10, 5, 20, 0.85); backdrop-filter: blur(15px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-box {
    width: 90%; max-width: 500px;
    background: linear-gradient(145deg, #2d1b36, #1a0f20);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px; padding: 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative; color: white; text-align: center;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.25); transform: rotate(90deg); }

.modal-icon {
    font-size: 3rem;
    color: var(--col-primary);
    margin-bottom: 1rem;
}

.modal-h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.modal-p { font-size: 1rem; line-height: 1.5; color: #ccc; margin-bottom: 1.5rem; }

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--col-primary);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    transition: 0.2s;
}
.modal-btn:hover {
    box-shadow: 0 0 15px var(--col-primary);
    transform: translateY(-2px);
}

@media (max-height: 700px) {
    .content-wrapper { padding-top: 1rem; } /* Reduce top gap */
    .game-hero-header { margin-bottom: 0.8rem; } /* Reduce gap after title */
    .info-stack { margin-bottom: 1rem; } /* Reduce gap after description */
    .desc-box { padding: 0.8rem; font-size: 0.85rem; } /* Compact description */
}
