/* ============================================
   MOBILE NAVIGATION
   ============================================ */

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(168, 85, 247, 0.1);
    border-radius: 8px;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
    background: var(--primary);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
    background: var(--primary);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
    border-left: 1px solid var(--border);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 100px 0 20px;
}

/* Navigation Section */
.mobile-nav-section {
    flex: 1;
    padding: 0 20px;
}

.mobile-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 24px 0 12px;
    padding-left: 16px;
}

.mobile-section-title.staff-title {
    color: var(--staff-red);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    margin-bottom: 6px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-link:hover {
    background: rgba(168, 85, 247, 0.1);
    color: var(--primary);
    transform: translateX(4px);
}

.mobile-nav-link svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.mobile-nav-link:hover svg {
    opacity: 1;
}

/* User Section at Bottom */
.mobile-user-section {
    border-top: 2px solid var(--border);
    padding: 20px;
    background: rgba(168, 85, 247, 0.05);
}

.mobile-user-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.mobile-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid var(--primary);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.mobile-user-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    flex: 1;
}

.mobile-nav-link.btn-style {
    justify-content: center;
    font-weight: 700;
    padding: 14px 20px;
    margin-bottom: 12px;
}

.mobile-nav-link.btn-style.login {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid var(--border);
    color: var(--primary);
}

.mobile-nav-link.btn-style.login:hover {
    background: rgba(168, 85, 247, 0.25);
    transform: translateX(0);
    transform: scale(1.02);
}

.mobile-nav-link.btn-style.register {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
}

.mobile-nav-link.btn-style.register:hover {
    transform: translateX(0);
    transform: scale(1.02);
    box-shadow: 0 5px 20px var(--shadow);
}

/* Scrollbar Styling for Mobile Menu */
.mobile-menu-content::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.mobile-menu-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.mobile-menu-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Hide desktop nav on mobile, show mobile button */
@media (max-width: 968px) {
    .mobile-menu-btn {
        display: flex;
    }

    .desktop-nav {
        display: none !important;
    }
}

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

/* Additional responsive adjustments */
@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
        max-width: 100vw;
    }

    .mobile-user-header {
        flex-direction: column;
        text-align: center;
    }
}
