/* --- Fullscreen Premium Menu --- */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    /* Solid white */
    z-index: 1000;
    /* Behind the toggle button (1001) */
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 80px;
    /* Space for the header/logo */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.fullscreen-menu.active {
    opacity: 1;
    visibility: visible;
}

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

/* Menu Content Container */
.menu-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align items */
    gap: 0;
    /* Remove gap, use padding/borders instead */
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
}

/* Menu Items (Links) */
.menu-item {
    width: 100%;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    padding: 16px 10px;
    border-bottom: 1px solid #f0f0f0;
    /* Separator line */
    border-radius: 8px;
    /* Slight radius */
    display: flex;
    align-items: center;
    transition: all 0.2s ease;

    /* Animation Defaults */
    opacity: 0;
    transform: translateY(30px);
}

.fullscreen-menu.active .menu-item {
    animation: slideUpFade 0.5s ease forwards;
    animation-delay: calc(0.1s * var(--i));
}

.menu-item:hover {
    background: #f5f5f5;
    color: var(--primary);
    background: #f9f9f9;
    color: var(--primary);
    transform: translateX(5px);
    /* Slide right slightly */
    letter-spacing: normal;
}

.menu-item i {
    margin-right: 15px;
    color: var(--primary);
    width: 30px;
    text-align: center;
}

/* Auth Buttons in Menu */
.menu-auth-buttons {
    display: flex;
    flex-direction: column;
    /* Stack buttons */
    gap: 15px;
    margin-top: 30px;
    width: 100%;
    padding-bottom: 30px;

    opacity: 0;
    transform: translateY(30px);
}

.fullscreen-menu.active .menu-auth-buttons {
    animation: slideUpFade 0.5s ease forwards;
    animation-delay: calc(0.1s * var(--i));
}

.menu-auth-buttons .btn {
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    width: 100%;
    /* Full width buttons */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-auth-buttons .btn.login {
    background: white;
    border: 1px solid #ddd;
    color: #333;
}

.menu-auth-buttons .btn.register {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    /* Use primary brand color */
    color: white;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.menu-auth-buttons .btn.logout {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.menu-auth-buttons .btn:hover {
    transform: translateY(-3px);
}

/* Staggered Animation Keyframes */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure Toggle Button is Always Top */
.menu-toggle {
    z-index: 1001 !important;
}

/* Hide default nav-links on mobile even more aggressively */
@media (max-width: 992px) {

    .nav-links,
    .auth-buttons {
        display: none !important;
    }

    /* Fix for when menu opens - don't show the old vertical list */
    .navbar.responsive {
        background: transparent !important;
        box-shadow: none !important;
    }
}

/* Tweak spacing to prevent wrap on smaller desktops */
@media (max-width: 1200px) {
    .nav-links a {
        margin: 0 5px;
        padding: 8px 12px;
    }

    .navbar {
        padding: 0 20px;
    }
}