/* Base styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #fff; /* Default text color for dark backgrounds */
    background-color: #050E1A; /* A very dark background for the page */
    padding-top: 120px; /* Initial padding for fixed header on desktop, adjusted by JS for mobile */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Site Header - Fixed position, always visible */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-height: 60px; /* Base min-height */
}

/* Header Top - Desktop */
.header-top {
    background-color: #0A192F; /* Dark blue */
    padding: 10px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px; /* Padding for logo and buttons */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #FFD700; /* Gold for logo */
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block; /* Ensure visibility */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
    display: flex; /* Show on desktop */
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none; /* No underline */
    white-space: nowrap;
}

.btn-register {
    background-color: #FFD700; /* Gold */
    color: #0A192F; /* Dark blue text */
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}
.btn-register:hover {
    background-color: #e6c200;
    transform: translateY(-2px);
}

.btn-login {
    background-color: transparent;
    color: #FFD700; /* Gold border and text */
    border: 2px solid #FFD700;
}
.btn-login:hover {
    background-color: #FFD700;
    color: #0A192F;
    transform: translateY(-2px);
}

/* Main Navigation - Desktop */
.main-nav {
    background-color: #1E3A5F; /* A slightly lighter blue, distinct from header-top */
    width: 100%;
    display: flex; /* Show on desktop */
    padding: 10px 0;
    position: static; /* Default for desktop */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center; /* Horizontally center menu items */
    align-items: center;
    padding: 0 20px;
}

.nav-link {
    color: #fff;
    padding: 8px 15px;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
}
.nav-link:hover {
    color: #FFD700;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    z-index: 1001; /* Above other elements */
}
.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFD700;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile specific elements (hidden on desktop) */
.mobile-buttons-area,
.mobile-menu-overlay {
    display: none;
}

/* Footer styles */
.site-footer {
    background-color: #0A192F;
    color: #E0E0E0;
    padding: 40px 0 20px;
    font-size: 14px;
    line-height: 1.6;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20px;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: #FFD700;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 5px;
}

.footer-section p {
    margin-bottom: 10px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 8px;
}

.footer-nav a {
    color: #E0E0E0;
    transition: color 0.3s ease;
}
.footer-nav a:hover {
    color: #FFD700;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #A0A0A0;
}

/* ==========================================================================
   Mobile Styles
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding-top: var(--mobile-header-height, 0px); /* Dynamic padding for mobile */
    }

    /* Header Top - Mobile */
    .header-top {
        padding: 10px 0;
        display: flex; /* Make header-top a flex container */
        align-items: center;
        justify-content: space-between; /* Hamburger left, Logo center, empty space right */
    }

    .header-container {
        width: 100%;
        max-width: none; /* Full width on mobile */
        padding: 0 15px; /* Smaller padding */
        justify-content: space-between; /* Adjusted for mobile layout */
    }

    .hamburger-menu {
        display: flex; /* Show on mobile */
        order: 1; /* Leftmost */
    }

    .logo {
        order: 2; /* Centered */
        flex: 1; /* Takes remaining space */
        text-align: center;
        font-size: 24px;
    }

    .desktop-nav-buttons {
        display: none; /* Hide desktop buttons on mobile */
    }

    /* Mobile Buttons Area - Always visible below header-top */
    .mobile-buttons-area {
        display: block; /* Show on mobile */
        background-color: #0A192F; /* Same as header-top */
        padding: 10px 0;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    .mobile-buttons-area .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        display: flex;
        justify-content: center;
        gap: 10px;
    }
    .btn-download {
        background-color: #FFD700;
        color: #0A192F;
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    }
    .btn-download:hover {
        background-color: #e6c200;
        transform: translateY(-1px);
    }

    /* Main Navigation - Mobile (Hamburger Menu Content) */
    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column; /* Vertical layout */
        position: fixed;
        /* top: will be set by JS dynamically */
        left: 0;
        width: 80%; /* Menu width */
        height: calc(100vh - var(--mobile-header-height, 0px)); /* Fill remaining height below header */
        background-color: #0A192F; /* Dark background for menu */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%); /* Slide out to the left */
        transition: transform 0.3s ease-out;
        overflow-y: auto; /* Scroll if content overflows */
        z-index: 1000; /* Ensure it's above content, below hamburger menu (1001) */
    }

    .main-nav.active {
        display: flex; /* MUST be flex to show */
        transform: translateX(0); /* Slide in */
    }

    .nav-container {
        width: 100%;
        max-width: none; /* Full width on mobile */
        flex-direction: column; /* Vertical links */
        align-items: flex-start; /* Align links to the left */
        padding: 20px 15px;
    }

    .nav-link {
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 18px;
        text-align: left;
    }
    .nav-link:last-child {
        border-bottom: none;
    }

    /* Hamburger menu active state (X icon) */
    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        display: none; /* Hidden by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 999; /* Below menu, above content */
        transition: opacity 0.3s ease;
        opacity: 0;
    }
    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Prevent body scroll when menu is open */
    body.no-scroll {
        overflow: hidden;
    }

    /* Footer - Mobile */
    .footer-container {
        flex-direction: column;
        align-items: center;
        padding: 0 15px;
    }

    .footer-section {
        min-width: unset;
        width: 100%;
        text-align: center;
    }
    .footer-section h3 {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 10px;
    }
    .footer-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
    }
    .footer-nav li {
        margin-bottom: 0;
    }
}