body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f8f8;
    padding-top: 100px; /* Placeholder for desktop, JS will adjust */
}

/* --- Site Header (Desktop First) --- */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background-color: #330066; /* Base color for the entire header block */
}

.header-top {
    background-color: #330066; /* Dark primary color for top bar */
    color: #fff;
    padding: 10px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #FFD700; /* Secondary color for logo */
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.desktop-nav-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.btn-register {
    background: linear-gradient(45deg, #FFD700, #FFA500); /* Gold/Orange gradient */
    color: #330066;
    border: none;
}

.btn-register:hover {
    background: linear-gradient(45deg, #FFA500, #FFD700);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn-login {
    background-color: #330066; /* Dark primary */
    color: #FFD700;
    border: 2px solid #FFD700;
}

.btn-login:hover {
    background-color: #4d0099; /* Slightly lighter primary */
    color: #FFF;
    border-color: #FFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
}

.mobile-buttons-area {
    display: none; /* Hidden on desktop */
}

.main-nav {
    background-color: #FFD700; /* Secondary color for main nav, contrasting header-top */
    padding: 12px 0;
    width: 100%;
    display: flex; /* Default to flex for desktop */
    flex-direction: row; /* Default to row for desktop */
    position: static; /* Default to static for desktop */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center; /* Center nav items on desktop */
    align-items: center;
    padding: 0 25px;
    flex-wrap: wrap;
}

.nav-link {
    color: #330066; /* Dark text on light background */
    text-decoration: none;
    padding: 8px 15px;
    font-weight: 600;
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
    border-radius: 5px;
}

.nav-link:hover {
    color: #fff;
    background-color: #4d0099; /* Darker hover background */
    transform: translateY(-2px);
}

/* --- Site Footer --- */
.site-footer {
    background-color: #220044; /* Even darker shade of primary */
    color: #ccc;
    padding: 40px 0 20px;
    font-size: 14px;
}

.site-footer a {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #fff;
}

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

.footer-section {
    flex: 1;
    min-width: 200px;
}

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

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #FFD700;
}

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

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

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

/* --- Mobile Styles --- */
@media (max-width: 768px) {
    body {
        padding-top: 0; /* Will be set by JS dynamically for mobile */
    }
    body.no-scroll {
        overflow: hidden;
    }

    .site-header {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative; /* For logo centering */
        padding: 10px 0;
    }

    .header-container {
        width: 100%; /* CRITICAL: full width */
        max-width: none; /* CRITICAL: no max-width */
        padding: 0 15px; /* Smaller padding */
        justify-content: space-between; /* Hamburger left, space right */
    }

    .logo {
        position: absolute; /* Position absolute to center it */
        left: 50%;
        transform: translateX(-50%);
        font-size: 24px;
        z-index: 1; /* Ensure logo is above other elements if needed */
    }

    .hamburger-menu {
        display: flex; /* Show hamburger on mobile */
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        z-index: 1001; /* Above logo and buttons */
        position: relative;
        order: -1; /* Place on the left */
    }

    .hamburger-menu span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #FFD700; /* Yellow lines */
        border-radius: 3px;
        transition: all 0.3s ease-in-out;
    }

    .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);
    }

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

    .mobile-buttons-area {
        display: block; /* Show mobile button area */
        background-color: #330066; /* Same as header-top */
        padding: 8px 0;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        z-index: 999; /* Below hamburger, above main content */
    }

    .mobile-buttons-area .header-container {
        display: flex;
        justify-content: center;
        gap: 10px;
        padding: 0 15px;
        width: 100%; /* CRITICAL: full width */
        max-width: none; /* CRITICAL: no max-width */
    }

    .mobile-buttons-area .btn {
        padding: 8px 15px; /* Smaller buttons for mobile */
        font-size: 14px;
        border-radius: 20px;
    }

    .main-nav {
        display: none; /* CRITICAL: Hide by default on mobile */
        position: fixed; /* CRITICAL: Fixed for mobile menu */
        top: 0; /* Will be adjusted by JS based on header height */
        left: 0;
        width: 70%; /* Slide-in menu width */
        height: 100vh; /* Will be adjusted by JS based on header height */
        background-color: #330066; /* Dark background for mobile menu */
        flex-direction: column; /* CRITICAL: Vertical menu */
        padding-top: 0; /* Reset, top is handled by JS */
        transform: translateX(-100%); /* CRITICAL: Off-screen by default */
        transition: transform 0.3s ease-out;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        z-index: 1000; /* Below hamburger, above overlay */
        overflow-y: auto; /* Allow scrolling for long menus */
    }

    .main-nav.active {
        display: flex; /* CRITICAL: Show when active */
        transform: translateX(0); /* CRITICAL: Slide in */
    }

    .nav-container {
        width: 100%; /* CRITICAL: full width */
        max-width: none; /* CRITICAL: no max-width */
        flex-direction: column; /* Vertical links */
        padding: 0 15px;
        align-items: flex-start; /* Align links to left */
    }

    .nav-link {
        color: #FFD700; /* Yellow text on dark background */
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link:hover {
        background-color: #4d0099;
        color: #fff;
    }

    .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.7);
        z-index: 990; /* Below menu, above content */
        transition: opacity 0.3s ease;
        opacity: 0;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Footer adjustments for mobile */
    .footer-container {
        flex-direction: column;
        gap: 25px;
        padding: 0 15px;
    }

    .footer-section {
        min-width: unset;
    }
}