/* Hide profile section on mobile */
@media (max-width: 1080px) {
    .profile-section {
        display: none !important;
    }
}

/* Force bottom section to stick to bottom of visible area */
.mobile-menu-bottom {
    margin-top: auto;
    padding: 20px 0 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: sticky; /* Use sticky positioning */
    bottom: 0;
    background: inherit; /* Inherit background from parent */
    z-index: 10; /* Ensure it stays on top */
}

/* Adjust the flex layout to prevent the bottom from floating */
.mobile-menu-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between; /* This will push bottom section down properly */
}

/* Make the links section fill available space without pushing bottom off-screen */
.mobile-menu-links {
    flex: 1 1 auto; /* Allow growth and shrinkage */
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 0; /* Ensure no extra margin */
}

.mobile-menu-links a {
    padding: 12px 30px; /* Reduced from likely 20px 30px */
    font-size: 1rem; /* Reduced font size (was likely 1.1rem or larger) */
    line-height: 1.2; /* Tighter line height */
}

.mobile-menu-header .logo-img {
    height: 35px; /* Make logo smaller if desired */
}

.mobile-sign-in-btn {
    width: 100%;
    padding: 12px 20px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.mobile-sign-in-btn:hover {
    background: #3182ce;
    transform: translateY(-1px);
}

body.dark .mobile-sign-in-btn {
    background: #63b3ed;
    color: #1a202c;
}

body.dark .mobile-sign-in-btn:hover {
    background: #4299e1;
}

/* Mobile profile button styling when user is signed in */
.mobile-profile-btn {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(66, 153, 225, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.mobile-profile-btn:hover {
    background: rgba(66, 153, 225, 0.1);
    border-color: #4299e1;
    transform: translateY(-1px);
}

body.dark .mobile-profile-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 179, 237, 0.3);
}

body.dark .mobile-profile-btn:hover {
    background: rgba(99, 179, 237, 0.1);
    border-color: #63b3ed;
}

.mobile-profile-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4299e1;
}

body.dark .mobile-profile-avatar {
    border-color: #63b3ed;
}

.mobile-profile-name {
    color: #2d3748;
    font-weight: 500;
    font-size: 1rem;
    text-align: left;
    flex: 1;
}

body.dark .mobile-profile-name {
    color: #e2e8f0;
}

body.dark .mobile-menu-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/*Mobile side menu*/ 
body.dark .mobile-nav-toggle {
    color: #a0aec0;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .header {
        justify-content: space-between;
    }
    
    .header .theme-toggle {
        order: 2;
    }
    
    .mobile-nav-toggle {
        order: 1;
        margin-left: auto;
        margin-right: 1rem;
    }

    main {
        padding-top: 10px;
    }
}