:root {
    --corner-size: min(10vw, 10vh)
}

:root[data-theme="dark"] {
    --bg-color: #000000;
    --text-color: #ffffff;
    --border-color: #ffffff;
    --accent-invert: 0;
}

:root[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #000000;
    --border-color: #000000;
    --accent-invert: 1;
}



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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif, monospace; /* Fits game-dev aesthetic */
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}


.grid-container {
    display: grid;
    grid-template-columns: var(--corner-size) 1fr var(--corner-size);
    grid-template-rows: var(--corner-size) 1fr calc(var(--corner-size)/2);
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: var(--border-color);
    gap: 1px;
    padding: 1px;
}

.grid-item {
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.top-center, .middle-center, .bottom-center {
    border-left: none;
    border-right: none;
}

.middle-left, .middle-center, .middle-right {
    border-top: none;
    border-bottom: none;
}



header {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-svg {
    width: 30px;
    height: 30px;
    fill: var(--text-color);
    transition: fill 0.3s ease;
}

h1 {
    font-size: 2rem;
    letter-spacing: 2px;
    font-weight: 900;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.main-nav a:hover {
    border-color: var(--border-color);
}


.theme-btn {
    padding: 0;
    margin: 0;
    border-width: 0;
    appearance: none;
    background: var(--bg-color);
    color: var(--text-color);
    width: min(5vw, 5vh);
    height: min(5vw, 5vh);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-icon {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.menu-toggle, .menu-close {
    display: none;
}


main {
    width: 100%;
    height: 100%;
    max-width: none;
    display: block;
}

.carousel-container {
    position: relative; /* Context for absolute navigation overlays */
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-content {
    position: absolute;
    bottom: 80px; /* Kept clear of the navigation buttons */
    left: 40px;
    z-index: 3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    color: #ffffff; /* Ensures contrast on dark image areas */
}

.slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

/* Navigation interface mimicking Activision slider layout */
.carousel-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4); /* Subtle backing element */
}

.nav-tab {
    flex: 1;
    background: transparent;
    color: #ffffff;
    border: none;
    border-top: 4px solid rgba(255, 255, 255, 0.2);
    padding: 15px 10px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

/* Active tab gets filled/highlighted border line */
.nav-tab.active, .nav-tab:hover {
    border-top-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}


footer {
    padding: 20px;
    text-align: center;
    width: 100%;
}


@media (max-width: 768px){
    .squared-corner {
        width: 40px; 
    }

    /* Header modifications for Mobile layout */
    header {
        position: relative;
        justify-content: center; /* Push Logo wrapper to the exact center */
    }

    .logo-wrapper {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Show hamburger toggle button at the far right */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 16px;
        height: 12px;
        background: transparent;
        border: none;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 100%;
        height: 2px;
        background-color: var(--text-color);
        transition: background-color 0.3s;
    }

    /* Transform navigation to full-screen mobile menu overlaid on top */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--bg-color);
        z-index: 999;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 80px; /* Pack menu items towards the top */
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 35px;
        text-align: center;
        width: 100%;
    }

    .main-nav a {
        font-size: 1.5rem;
    }

    /* Mobile Nav Close X Button */
    .menu-close {
        display: block;
        position: absolute;
        top: 20px;
        right: 25px;
        background: transparent;
        border: none;
        color: var(--text-color);
        font-size: 2.5rem;
        cursor: pointer;
        line-height: 1;
    }
}

.theme-btn .sun-icon,
.theme-btn .moon-icon {
    display: none;
}

:root[data-theme="dark"] .sun-icon { display: block; }
:root[data-theme="dark"] .moon-icon { display: none; }

:root[data-theme="light"] .sun-icon { display: none; }
:root[data-theme="light"] .moon-icon { display: block; }