/* Main Navigation Styles */
.main-nav {
    background: linear-gradient(135deg, #0a0a14, #1a1a2e);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
    display: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    color: var(--gray);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: rgba(245,166,35,0.05);
}

.nav-link.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.nav-link i {
    font-size: 14px;
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

/* Dropdown Backdrop (Mobile) */
.dropdown-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.dropdown-backdrop.active {
    display: block;
    opacity: 1;
}

.nav-dropdown-toggle .fa-chevron-down {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s;
}

.nav-dropdown.active .nav-dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    padding: 8px 0;
    max-height: 400px;
    overflow-y: auto;
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--gray);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    background: rgba(245,166,35,0.1);
    color: var(--gold);
    border-left-color: var(--gold);
    padding-left: 24px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

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

.mobile-menu-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.mobile-menu-close:hover {
    color: var(--gold);
}

.mobile-menu-nav {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.mobile-menu-link {
    display: block;
    padding: 15px 0;
    color: var(--gray);
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid rgba(45,45,74,0.5);
    transition: color 0.3s;
}

.mobile-menu-link:hover {
    color: var(--gold);
}

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

.mobile-menu-section {
    margin: 10px 0;
    padding: 10px 0;
    border-top: 1px solid rgba(45,45,74,0.5);
    border-bottom: 1px solid rgba(45,45,74,0.5);
}

.mobile-menu-section-title {
    padding: 12px 20px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-menu-sublink {
    display: block;
    padding: 10px 20px 10px 40px;
    color: var(--gray);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.mobile-menu-sublink:hover {
    color: var(--gold);
    background: rgba(245,166,35,0.05);
    border-left-color: var(--gold);
    padding-left: 44px;
}

/* Join Modal */
.join-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.join-modal.active {
    display: flex;
}

.join-modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

.join-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.join-modal-header h3 {
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
}

.join-modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.join-modal-close:hover {
    color: var(--gold);
}

.join-modal-body p {
    color: var(--gray);
    margin-bottom: 20px;
}

.btn-join-modal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: #25d366;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-join-modal:hover {
    background: #1da851;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        position: relative;
    }
    
    .nav-inner {
        justify-content: flex-start;
        padding: 0 10px;
    }
    
    .nav-link {
        padding: 12px 12px;
        font-size: 11px;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .btn-join-header {
        display: none;
    }
    
    /* Mobile Dropdown Adjustments */
    .nav-dropdown {
        position: static;
    }
    
    .nav-dropdown-menu {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 50%;
        transform: translateY(-50%) translateY(-10px);
        min-width: auto;
        max-width: calc(100vw - 20px);
        max-height: 70vh;
        overflow-y: auto;
        z-index: 1001;
    }
    
    .nav-dropdown.active .nav-dropdown-menu {
        transform: translateY(-50%);
    }
    
    .nav-dropdown-item {
        padding: 16px 20px;
        font-size: 15px;
        border-bottom: 1px solid rgba(45,45,74,0.3);
    }
    
    .nav-dropdown-item:last-child {
        border-bottom: none;
    }
    
    .nav-dropdown-toggle .fa-chevron-down {
        font-size: 9px;
    }
    
    /* Show backdrop only on mobile */
    .dropdown-backdrop {
        display: none;
    }
    
    .dropdown-backdrop.active {
        display: block;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}
