/* ========================================
   ENHANCED NAVIGATION BAR STYLES
   Modern, Responsive, and Feature-Rich
   ======================================== */

/* ===== HEADER & NAVIGATION BASE ===== */

/* Add padding to body to prevent content from hiding under fixed header */
body {
    padding-top: 72px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(5, 8, 17, 0.95);
    border-bottom: 1px solid rgba(78, 205, 196, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(78, 205, 196, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0) !important;
}

header.scrolled {
    background: rgba(5, 8, 17, 0.98);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(78, 205, 196, 0.15);
    border-bottom-color: rgba(78, 205, 196, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    max-width: 1400px;
    margin: 0 auto;
    gap: 32px;
    position: relative;
}

/* ===== LOGO SECTION ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4ecdc4 0%, #2c5aa0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 700;
    box-shadow: 
        0 0 30px rgba(78, 205, 196, 0.6),
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.logo-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.logo:hover .logo-badge {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 
        0 0 40px rgba(78, 205, 196, 0.8),
        0 6px 20px rgba(0, 0, 0, 0.5);
}

/* ===== NAVIGATION LINKS ===== */
.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
}

.nav-links a,
.nav-link {
    color: #b8c5d6;
    transition: all 0.3s ease;
    position: relative;
    padding: 10px 16px;
    border-radius: 0;
    background: transparent;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.nav-links a::before,
.nav-link::before {
    content: '' !important;
    position: absolute !important;
    bottom: 6px !important;
    left: 16px !important;
    right: 16px !important;
    height: 2px !important;
    background: linear-gradient(90deg, #4ecdc4, #6366f1) !important;
    transform: scaleX(0) !important;
    transform-origin: left !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 2px !important;
}

.nav-links a:hover,
.nav-link:hover {
    color: #4ecdc4;
    background: transparent;
}

.nav-links a:hover::before,
.nav-link:hover::before {
    transform: scaleX(1) !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nav-links a.active,
.nav-link.active {
    color: #4ecdc4;
    background: transparent;
}

.nav-links a.active::before,
.nav-link.active::before {
    transform: scaleX(1);
}

/* ===== DROPDOWN MENU ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: rgba(13, 19, 32, 0.98);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(78, 205, 196, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    z-index: 100;
}

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

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #b8c5d6;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.9rem;
}

.nav-dropdown-item:hover {
    background: rgba(78, 205, 196, 0.12);
    color: #4ecdc4;
    transform: translateX(4px);
}

.nav-dropdown-item-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-dropdown-divider {
    height: 1px;
    background: rgba(78, 205, 196, 0.15);
    margin: 6px 0;
}

/* ===== ACTION BUTTONS ===== */
.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-btn {
    padding: 10px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4ecdc4, #2c5aa0);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(78, 205, 196, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

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

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

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(78, 205, 196, 0.5);
}

.nav-btn:active {
    transform: translateY(0);
}

.nav-btn.secondary {
    background: rgba(78, 205, 196, 0.1);
    border: 2px solid rgba(78, 205, 196, 0.4);
    backdrop-filter: blur(10px);
    color: #4ecdc4;
}

.nav-btn.secondary:hover {
    background: rgba(78, 205, 196, 0.18);
    border-color: rgba(78, 205, 196, 0.6);
}

.nav-btn.icon-only {
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== NOTIFICATION BADGE ===== */
.nav-notification {
    position: relative;
}

.nav-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.7);
    }
}

/* ===== SEARCH BAR ===== */
.nav-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.nav-search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: rgba(78, 205, 196, 0.08);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 999px;
    color: #e8eef7;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-search-input:focus {
    outline: none;
    background: rgba(78, 205, 196, 0.12);
    border-color: rgba(78, 205, 196, 0.4);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.nav-search-input::placeholder {
    color: #7a8ba0;
}

.nav-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a8ba0;
    font-size: 1.1rem;
    pointer-events: none;
}

/* ===== MOBILE MENU ===== */
.mobile-menu-btn {
    display: none;
    background: rgba(78, 205, 196, 0.1);
    border: 2px solid rgba(78, 205, 196, 0.3);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    z-index: 1001;
}

.mobile-menu-btn:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.5);
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #4ecdc4;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: rgba(13, 19, 32, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(78, 205, 196, 0.2);
    padding: 80px 24px 24px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
}

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

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.mobile-menu-links a,
.mobile-menu-links .nav-link {
    padding: 14px 16px;
    color: #b8c5d6;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.mobile-menu-links a:hover,
.mobile-menu-links .nav-link:hover {
    background: rgba(78, 205, 196, 0.12);
    color: #4ecdc4;
    transform: translateX(4px);
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(78, 205, 196, 0.15);
}

/* ===== PROGRESS INDICATOR ===== */
.nav-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #4ecdc4, #6366f1, #8b5cf6);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 0 3px 0 0;
}

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

.nav-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(78, 205, 196, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: cover;
}

.nav-user-avatar:hover {
    border-color: #4ecdc4;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

.nav-user-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 240px;
    background: rgba(13, 19, 32, 0.98);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(78, 205, 196, 0.1);
    backdrop-filter: blur(20px);
    z-index: 100;
}

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

.nav-user-info {
    padding: 12px;
    border-bottom: 1px solid rgba(78, 205, 196, 0.15);
    margin-bottom: 8px;
}

.nav-user-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.nav-user-email {
    font-size: 0.8rem;
    color: #7a8ba0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .nav-search {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 12px 0;
        gap: 16px;
    }

    .nav-links,
    .nav-search {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .logo {
        font-size: 0.85rem;
    }

    .logo-badge {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }

    .nav-actions {
        gap: 8px;
    }

    .nav-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .nav-btn.hide-mobile {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo div:last-child {
        display: none;
    }

    .nav-actions .nav-btn:not(.icon-only) {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown-menu,
.nav-user-menu {
    animation: slideDown 0.3s ease;
}

/* ===== ACCESSIBILITY ===== */
.nav-links a:focus,
.nav-btn:focus,
.mobile-menu-btn:focus {
    outline: 2px solid #4ecdc4;
    outline-offset: 2px;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    background: rgba(78, 205, 196, 0.1);
    border: 2px solid rgba(78, 205, 196, 0.3);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.5);
    transform: rotate(15deg);
}
