:root {
    --nav-bg: #cde6f5; /* Color matching the sky (Box 2) in light mode */
    --footer-bg: #cde6f5;
    --text-color: #475569;
    --text-muted: #94a3b8;
    --banner-img: url('assets/bg-non1.jpg');
    --header-border: #1e293b;
}

[data-theme="dark"] {
    --nav-bg: #272c57; /* Color matching the sky (Box 2) in dark mode */
    --footer-bg: #272c57;
    --text-color: #94a3b8;
    --text-muted: #64748b;
    --banner-img: url('assets/bg-non2.jpg');
    --header-border: #0f172a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--nav-bg); /* Fallback */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================================
   1. Header Section
========================================= */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertically center side items */
    padding: 0 4rem; 
    height: 140px; /* Reduced from 160px to leave about 1 line of space above the logo */
    background-color: var(--nav-bg);
    border-bottom: 4px solid var(--header-border); /* Solid divider line */
    position: relative;
    z-index: 20;
}

.nav-left, .nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-left {
    justify-content: flex-start;
}

.nav-right {
    justify-content: flex-end;
}

.nav-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Push logo to the bottom */
    height: 100%;
}

.mini-logo {
    height: 90px; /* Increased by 50% from 60px */
    object-fit: contain;
}

.theme-toggle {
    height: 40px; /* Size similar to reference */
    cursor: pointer;
    transition: transform 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.main-logo {
    height: 120px; /* Prominent size */
    object-fit: contain;
    margin-bottom: -4px; /* Move down to touch/overlap the border line exactly */
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    z-index: 21; /* Keep above border */
}

/* =========================================
   2. Hero Section
========================================= */
.hero {
    width: 100%;
    flex-grow: 1; 
    min-height: calc(100vh - 120px);
    
    background-image: var(--banner-img);
    background-size: cover;
    background-position: center bottom; /* Pin to bottom to show copyright text and push the top sky (Box 2) out of view */
    background-repeat: no-repeat;
    
    /* Layout for cards inside hero */
    display: flex;
    justify-content: center;
    align-items: center; /* Center vertically */
    padding-top: 0;
    position: relative;
    z-index: 30; /* Higher than top-nav (20) so cards can pop over the header on hover */
}

/* =========================================
   3. Game Cards
========================================= */
.game-cards-container {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    margin-top: -30vh; /* Pushed UP to exactly -30vh as requested */
}

.game-box {
    flex: 1;
    /* Use clamp for responsive sizing, prevents getting too big or too small */
    width: clamp(120px, 14vw, 180px); 
    max-width: 180px; /* Highly reduced to fit inside the stadium bounds perfectly */
    display: flex;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-box img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.game-box:hover:not(.disabled) {
    transform: scale(1.3); /* Extreme scale from center, removed upward translation */
    z-index: 5; /* Ensure the hovered card pops over the others */
}

.game-box.disabled {
    cursor: default;
}

main {
    position: relative;
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* =========================================
   4. Copyright Section
========================================= */
.copyright-section {
    position: absolute;
    bottom: 55px; /* Lifted up ~1 line height */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 950px;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.6;
    color: #475569; /* Darker slate gray for light mode */
    pointer-events: auto;
    z-index: 35;
}

[data-theme="dark"] .copyright-section {
    color: #cbd5e1; /* Soft bright bluish-gray for dark mode */
}

.copyright-section h4 {
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

[data-theme="dark"] .copyright-section h4 {
    color: #e2e8f0;
}

.copyright-section p {
    margin-bottom: 0.35rem;
}

.copyright-section strong {
    font-weight: 600;
}

.copyright-section .copy-year {
    margin-top: 0.5rem;
    font-weight: 600;
}

/* =========================================
   Responsive Adjustments
========================================= */
@media (max-width: 992px) {
    .top-nav {
        height: 70px; /* Reduced height for a compact header */
        padding: 0 1rem; /* Minimal padding */
        flex-direction: row; /* Force single row */
        gap: 0;
    }
    
    .nav-left, .nav-right, .nav-center {
        width: auto;
        height: 100%;
        align-items: center; /* Vertically center all items */
    }

    .nav-left {
        justify-content: flex-start;
        flex: 1;
    }

    .nav-right {
        justify-content: flex-end;
        flex: 1;
    }

    .nav-center {
        justify-content: center;
        flex: 2; /* Give middle logo more space */
    }
    
    .main-logo {
        margin-bottom: 0;
        margin-top: 0; /* Remove top margin */
        height: 45px; /* Scale down significantly to fit in row */
    }

    .mini-logo {
        height: 35px; /* Scale down to match row height */
    }

    .theme-toggle {
        height: 28px; /* Scale down to match row height */
    }

    .hero {
        min-height: auto; 
        padding-top: 1rem; /* Reduced to remove the gap (Part 2) above the cards */
        padding-bottom: 2rem; 
        background-image: none !important; /* Move background to pseudo-element for better scaling */
        align-items: center; 
        overflow: hidden;
        position: relative;
        z-index: 10;
    }

    .hero::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background-image: var(--banner-img);
        background-size: cover;
        background-position: center 65%; /* Focus on the stadium */
        transform: scale(2.8); /* Enlarge background image massively as requested */
        z-index: -1;
        pointer-events: none;
    }
    
    .game-cards-container {
        /* Switch to a horizontal swipeable carousel for mobile */
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        margin-top: 0; 
        gap: 1rem;
        width: 100%;
        padding: 1rem 15vw; /* Padding to center the active card */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        /* Hide scrollbar */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .game-cards-container::-webkit-scrollbar {
        display: none;
    }
    
    .game-box {
        flex: 0 0 65vw; /* Smaller card width on mobile */
        max-width: 220px; /* Max size capped to fit in stadium */
        scroll-snap-align: center; /* Snap to center when swiping */
    }

    /* Mobile Copyright Styles */
    .copyright-section {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        padding: 2rem 1.5rem;
        text-align: center;
        font-size: 0.65rem;
        line-height: 1.5;
        background-color: rgba(0, 0, 0, 0.15);
    }

    [data-theme="light"] .copyright-section {
        background-color: rgba(255, 255, 255, 0.4);
    }

    .copyright-section h4 {
        margin-bottom: 0.75rem;
        font-size: 0.8rem;
    }

    .copyright-section p {
        margin-bottom: 0.75rem;
    }

    .copyright-section .copy-year {
        margin-top: 1rem;
    }
}
