/**
 * NexGameHub - Navbar Styles
 * Navigation principale unifiée
 */

/* ========================================
   NAVBAR BASE
   ======================================== */
.navbar {
    background: #141938;
    border-bottom: 1px solid #1e293b;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.navbar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ========================================
   LOGO
   ======================================== */
.navbar-brand .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-brand .logo-img {
    height: 45px;
    width: auto;
    transition: transform 0.3s;
}

.navbar-brand .logo:hover .logo-img {
    transform: scale(1.05);
}

/* ========================================
   MOBILE TOGGLE
   ======================================== */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.navbar-toggler:hover {
    background: #1e293b;
}

/* ========================================
   NAVBAR MENU
   ======================================== */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: space-between;
    margin-left: 2rem;
}

.navbar-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ========================================
   NAV LINKS
   ======================================== */
.nav-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    color: #fff;
    background: rgba(79, 70, 229, 0.15);
}

.nav-link.active {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
}

/* ========================================
   DROPDOWNS BASE
   ======================================== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    border: none;
    border-radius: 25px;
    padding: 10px 18px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.nav-dropdown-btn:hover {
    transform: translateY(-2px);
}

.nav-dropdown-btn .chevron {
    font-size: 10px;
    transition: transform 0.3s;
}

.nav-dropdown.open .nav-dropdown-btn .chevron {
    transform: rotate(180deg);
}

/* Collection Dropdown Button */
.collection-dropdown .nav-dropdown-btn {
    background: linear-gradient(135deg, #10b981, #059669);
}

.collection-dropdown .nav-dropdown-btn:hover {
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

/* Hub Dropdown Button */
.hub-dropdown .nav-dropdown-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.hub-dropdown .nav-dropdown-btn:hover {
    box-shadow: 0 5px 20px rgba(79, 70, 229, 0.4);
}

/* Hub Badge */
.hub-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   DROPDOWN MENU
   ======================================== */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    min-width: 280px;
    display: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
    z-index: 1001;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.25s ease;
}

@keyframes dropdownFadeIn {
    from { 
        opacity: 0; 
        transform: translateX(-50%) translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0); 
    }
}

/* ========================================
   DROPDOWN SECTIONS
   ======================================== */
.dropdown-section {
    padding: 8px 0;
}

.dropdown-section:not(:last-child) {
    border-bottom: 1px solid #334155;
}

.dropdown-section-title {
    padding: 8px 18px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-section-title i {
    font-size: 10px;
}

/* ========================================
   DROPDOWN ITEMS
   ======================================== */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.15), transparent);
    color: #fff;
    padding-left: 22px;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    color: #4f46e5;
    transition: all 0.2s;
}

.dropdown-item:hover i {
    color: #06b6d4;
    transform: scale(1.1);
}

/* Collection dropdown icons */
.collection-dropdown .dropdown-item i {
    color: #10b981;
}

.collection-dropdown .dropdown-item:hover i {
    color: #34d399;
}

/* Item Description */
.item-desc {
    font-size: 11px;
    color: #64748b;
    margin-left: auto;
}

/* Item Badge */
.item-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Premium Item */
.dropdown-item.premium-item {
    color: #fbbf24;
}

.dropdown-item.premium-item i {
    color: #fbbf24;
}

.dropdown-item.premium-item:hover {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.15), transparent);
}

/* ========================================
   SUPPORT BUTTON
   ======================================== */
.nav-support-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #9333ea, #ec4899);
    color: #fff !important;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-support-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.nav-support-btn:hover::before {
    left: 100%;
}

.nav-support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.5);
}

.nav-support-btn .heart-icon {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
}

/* ========================================
   NAVBAR ACTIONS (RIGHT SIDE)
   ======================================== */
.navbar-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Auth Buttons */
.btn-outline {
    padding: 8px 18px;
    border: 2px solid #4f46e5;
    color: #4f46e5;
    background: transparent;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-outline:hover {
    background: #4f46e5;
    color: #fff;
}

.btn-primary {
    padding: 8px 18px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

/* ========================================
   USER MENU
   ======================================== */
.user-menu {
    position: relative;
}

.user-menu-btn {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 6px 12px 6px 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.user-menu-btn:hover {
    background: #334155;
    border-color: #4f46e5;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.user-menu-btn span {
    font-weight: 500;
    font-size: 14px;
}

.user-menu-btn i.fa-chevron-down {
    font-size: 10px;
    color: #64748b;
    transition: transform 0.3s;
}

.user-menu.open .user-menu-btn i.fa-chevron-down {
    transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    min-width: 220px;
    display: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.25s ease;
}

.user-dropdown .dropdown-item.logout {
    color: #ef4444;
}

.user-dropdown .dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.15);
}

.user-dropdown .dropdown-item.logout i {
    color: #ef4444;
}

.user-dropdown .dropdown-item.premium {
    color: #fbbf24;
}

.user-dropdown .dropdown-item.premium i {
    color: #fbbf24;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 1100px) {
    .navbar-toggler {
        display: block;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #141938;
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        border-top: 1px solid #1e293b;
        margin-left: 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    }

    .navbar-menu.show {
        display: flex;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }
    
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 16px;
        border-radius: 10px;
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 16px;
        border-radius: 10px;
    }
    
    .nav-dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 5px;
        border-radius: 12px;
        box-shadow: none;
        border: 1px solid #334155;
    }

    .navbar-actions {
        width: 100%;
        flex-direction: column;
        padding-top: 1rem;
        border-top: 1px solid #1e293b;
        margin-top: 0.5rem;
    }
    
    .navbar-actions .btn-outline,
    .navbar-actions .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }
    
    .user-menu {
        width: 100%;
    }
    
    .user-menu-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 14px;
    }
    
    .user-dropdown {
        position: static;
        width: 100%;
        margin-top: 5px;
        border-radius: 12px;
        box-shadow: none;
    }
    
    .nav-support-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 0 15px;
    }
    
    .navbar-brand .logo-img {
        height: 38px;
    }
    
    .user-menu-btn span {
        display: none;
    }
    
    .user-menu-btn {
        padding: 6px;
    }
}
