/* Navbar Styles */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: rgba(11, 11, 11, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #2a2a2a;
    padding: 0;
    will-change: transform;
    transform: translateZ(0);
}

@media (max-width: 768px) {
    .navbar {
        transform: none !important;
    }
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.desktop-logo {
    display: flex;
    grid-column: 1;
    justify-self: start;
}

.mobile-nav-right {
    display: none;
}

.mobile-logo {
    display: none;
}

.mobile-toggle {
    display: none;
}

@media (max-width: 968px) {
    .nav-container {
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
        padding: 0.8rem 1rem;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    
    .desktop-logo {
        display: none !important;
    }
    
    .mobile-toggle {
        display: flex !important;
        grid-column: 1;
        justify-self: start;
        z-index: 10;
        flex-shrink: 0;
    }
    
    .mobile-logo {
        display: flex !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%) !important;
        z-index: 5;
        margin: 0;
        width: auto;
        pointer-events: auto;
        top: auto;
        bottom: auto;
        transition: none !important;
    }
    
    .mobile-logo:active,
    .mobile-logo:focus,
    .mobile-logo:hover {
        transform: translateX(-50%) !important;
    }
    
    .mobile-nav-right {
        display: flex !important;
        grid-column: 3;
        justify-self: end;
        z-index: 10;
        flex-shrink: 0;
    }
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #d12b2b;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logo:hover {
    transform: scale(1.05);
}

.mobile-logo {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    justify-content: center;
    grid-column: 2;
    justify-self: center;
}

.nav-menu a {
    color: #a0a0a0;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: #e6e6e6;
    background: rgba(209, 43, 43, 0.1);
}

.nav-menu a.active {
    color: #d12b2b;
    background: rgba(209, 43, 43, 0.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
    grid-column: 3;
    justify-self: end;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #e6e6e6;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.profile-link:hover {
    background: rgba(209, 43, 43, 0.1);
    color: #d12b2b;
}

.avatar-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d12b2b, #a81f1f);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.btn-logout {
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #a0a0a0;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-logout:hover {
    border-color: #d12b2b;
    color: #d12b2b;
    background: rgba(209, 43, 43, 0.1);
}

.mobile-toggle {
    display: none;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.mobile-toggle:hover {
    background: rgba(209, 43, 43, 0.1);
    border-color: #d12b2b;
    color: #d12b2b;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.mobile-toggle.active {
    background: rgba(209, 43, 43, 0.15);
    border-color: #d12b2b;
    color: #d12b2b;
    box-shadow: 0 6px 16px rgba(209, 43, 43, 0.4);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 1rem;
    right: 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    z-index: 998;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    pointer-events: none;
    will-change: transform, opacity, visibility;
    max-width: calc(100vw - 2rem);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.mobile-nav:not(.active) {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.mobile-nav.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

@media (max-width: 968px) {
    .mobile-nav {
        display: flex;
    }
}

.mobile-nav a {
    color: #a0a0a0;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: rgba(209, 43, 43, 0.1);
    color: #d12b2b;
}

.mobile-nav a.logout {
    color: #d12b2b;
    border-top: 1px solid #2a2a2a;
    margin-top: 0.5rem;
    padding-top: 1.5rem;
}

.mobile-nav-right {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.mobile-logo {
    display: none;
}

.mobile-profile-dropdown {
    position: relative;
}

.mobile-profile-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    padding: 2px;
}

.mobile-profile-btn:hover {
    box-shadow: 0 0 0 2px rgba(209, 43, 43, 0.5);
}

.mobile-dropdown-menu {
    display: none;
    position: fixed;
    top: 70px;
    right: 1rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #151515 100%);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    width: 300px;
    max-width: calc(100vw - 2rem);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(209, 43, 43, 0.1);
    z-index: 1001;
    overflow: hidden;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.mobile-dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    z-index: 1;
}

@media (max-width: 968px) {
    .mobile-dropdown-menu {
        right: 1rem;
        left: auto;
        width: 280px;
        max-width: calc(100vw - 2rem);
    }
}

.mobile-dropdown-menu.active {
    display: block;
}

.mobile-dropdown-menu .dropdown-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(209, 43, 43, 0.05);
    position: relative;
    z-index: 2;
}

.mobile-dropdown-menu .dropdown-header .avatar-small {
    width: 45px;
    height: 45px;
    border: 2px solid var(--accent-red);
    box-shadow: 0 0 15px rgba(209, 43, 43, 0.3);
}

.mobile-dropdown-menu .dropdown-user-info {
    flex: 1;
}

.mobile-dropdown-menu .dropdown-username {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 0;
}

.mobile-dropdown-menu .dropdown-email {
    display: none;
}

.mobile-dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.mobile-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    margin: 0.15rem 0.5rem;
    border-radius: 10px;
}

.mobile-dropdown-menu .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent-red);
    border-radius: 0 3px 3px 0;
    transition: height 0.2s ease;
}

.mobile-dropdown-menu .dropdown-item:hover {
    background: rgba(209, 43, 43, 0.1);
    color: var(--text-primary);
    transform: translateX(5px);
}

.mobile-dropdown-menu .dropdown-item:hover::before {
    height: 60%;
}

.mobile-dropdown-menu .dropdown-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    font-weight: 500;
}

.mobile-dropdown-menu .dropdown-item-content i {
    width: 22px;
    text-align: center;
    color: var(--accent-red);
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.mobile-dropdown-menu .dropdown-item:hover .dropdown-item-content i {
    color: var(--accent-red);
    transform: scale(1.1);
}

.mobile-dropdown-menu .dropdown-item-badge {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(209, 43, 43, 0.4);
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 968px) {
    .nav-menu {
        display: none;
    }
    
    .desktop-nav-right {
        display: none !important;
    }
    
    .mobile-toggle {
        display: flex !important;
        flex-shrink: 0;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .mobile-nav-right {
        display: flex !important;
        flex-shrink: 0;
        align-items: center;
        gap: 0.75rem;
    }
    
    .mobile-logo {
        display: flex !important;
        flex-shrink: 0;
    }
    
    .nav-container {
        grid-template-columns: auto 1fr auto;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
        grid-template-columns: auto 1fr auto;
        height: 60px;
    }
    
    .navbar {
        height: 60px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .avatar-small {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .mobile-notif {
        font-size: 1.1rem;
        padding: 0.5rem;
    }
    
    .notif-badge {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        top: -6px;
        right: -6px;
    }
    
    .mobile-toggle {
        padding: 0.5rem 0.75rem;
        font-size: 1.1rem;
    }
    
    .profile-link {
        padding: 0.4rem 0.8rem;
    }
    
    .nav-dropdown .dropdown-menu {
        min-width: 260px;
        right: 0;
        top: calc(100% + 5px);
    }
}

