/* --- NAVBAR CORE STYLES --- */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.95); /* Slightly darker for better contrast */
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(220, 38, 38, 0.15);
    width: 100%;
    height: 80px; /* Fixed height to match calculations */
}

/* Navbar Container Layout */
nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo Area */
nav .logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

/* Navigation Links - General */
.nav-link {
    position: relative;
    color: #b0b0b0;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    text-decoration: none;
    font-size: 1rem;
}

.nav-link:hover, .nav-link.active {
    color: #ff1744; /* Primary Red */
}

/* Underline Effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff1744;
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* --- DESKTOP NAVIGATION --- */
.desktop-nav {
    display: flex !important;
    align-items: center;
    gap: 2rem;
}

/* --- MOBILE MENU BUTTON (Hidden on Desktop) --- */
.mobile-menu-btn {
    display: none !important; /* Hidden by default */
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1002; /* Higher than everything */
    width: 30px;
    height: 30px;
    justify-content: center;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Mobile Menu Button Animation */
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* --- MOBILE MENU DRAWER (Right-to-Left Slide) --- */
.mobile-menu {
    display: none; /* Hidden on desktop */
    position: fixed;
    top: 80px; /* Starts exactly below the navbar */
    right: 0;
    width: 100%; /* Full width */
    height: calc(100vh - 80px); /* Full remaining height */
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    border-left: 1px solid rgba(220, 38, 38, 0.4);
    
    /* Animation Setup */
    transform: translateX(100%); /* Start off-screen right */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    flex-direction: column;
    padding-top: 1rem;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0); /* Slide in */
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1.2rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    opacity: 0; /* For stagger animation */
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.1s;
}

.mobile-link:hover {
    background: linear-gradient(90deg, rgba(255, 23, 68, 0.1) 0%, transparent 100%);
    color: #ff1744;
    padding-left: 2.5rem;
    border-left: 4px solid #ff1744;
}

/* --- AUTHENTICATION UI --- */
.btn-premium {
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    border-radius: 8px;
    background: #ff1744;
    color: white;
    border: 1px solid #ff1744;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.875rem;
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.3);
    transition: all 0.3s ease;
}

.btn-premium:hover {
    background: #ff2e52;
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.6);
    transform: translateY(-2px);
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    border-color: #ff1744;
    background: rgba(255, 23, 68, 0.1);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: #1a1a1a;
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #ff1744;
}

/* --- KICK INTEGRATION --- */
.dropdown-item.kick-item {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
}

.dropdown-item.kick-linked {
    background: rgba(83, 252, 24, 0.05);
}

.dropdown-item.kick-linked:hover {
    background: rgba(83, 252, 24, 0.1);
}

.dropdown-item img.kick-icon {
    height: 18px;
    width: auto;
    margin-left: -8px;
}

.kick-username-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    background: rgba(83, 252, 24, 0.1);
    border: 1px solid rgba(83, 252, 24, 0.3);
    border-radius: 4px;
    font-size: 0.75rem;
    color: #53fc18;
    white-space: nowrap;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    /* Hide Desktop Nav */
    .desktop-nav {
        display: none !important;
    }

    /* Show Hamburger Button */
    .mobile-menu-btn {
        display: flex !important;
    }
    
    /* Enable Mobile Menu Display (so animation works) */
    .mobile-menu {
        display: flex;
    }
    
    /* Padding adjustment for container */
    nav .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
/* --- Mobile Link Base Styles --- */
.mobile-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1.2rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    border-left: 4px solid transparent; /* Placeholder for border to prevent jumping */
}

/* --- Active & Hover States --- */
/* This targets both Hover AND the Active class added by JS */
.mobile-link:hover, 
.mobile-link.active {
    background: linear-gradient(90deg, rgba(255, 23, 68, 0.1) 0%, transparent 100%);
    color: #ff1744; /* Primary Red */
    padding-left: 2.5rem; /* Indent effect */
    border-left: 4px solid #ff1744; /* Red Border Indicator */
}

/* Animation Logic */
.mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.1s;
}