header {
    background: var(--gradient);
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 60px;
    position: relative;
}

/* 汉堡菜单按钮 */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 1001;
    width: 32px;
    height: 32px;
    justify-content: center;
    align-items: center;
}

.hamburger-menu span {
    display: block;
    width: 18px;
    height: 2px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger-menu:hover {
    background: rgba(255,255,255,0.1);
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 品牌Logo */
.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* 桌面端导航菜单 */
.desktop-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 0.5rem;
}

.desktop-menu li {
    margin: 0;
    padding: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 用户信息样式 */
.user-info {
    position: relative;
    margin-right: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.user-profile:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.user-avatar {
    font-size: 1.2rem;
}

.username {
    font-weight: 500;
}

/* 移动端导航菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 20px rgba(0,0,0,0.2);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gradient);
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-brand {
    font-size: 1.1rem;
    font-weight: 600;
}

.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-menu:hover {
    background: rgba(255,255,255,0.2);
}

/* 移动端导航列表 */
.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 1rem 0;
    flex: 1;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
    gap: 1rem;
}

.mobile-nav-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    transform: translateX(5px);
}

.mobile-nav-link.active {
    background: var(--gradient);
    color: white;
}

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-weight: 500;
    font-size: 1rem;
}

/* 移动端用户信息 */
.mobile-user-info {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1rem;
}

.mobile-user-profile {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(41,98,255,0.1) 0%, rgba(0,57,203,0.1) 100%);
    text-decoration: none;
    color: #333;
    gap: 1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-status {
    font-size: 0.8rem;
    color: #666;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    width: fit-content;
}

/* 移动端菜单底部 */
.mobile-menu-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.version-info {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.copyright {
    font-size: 0.8rem;
    color: #999;
}

/* 移动端遮罩层 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

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

/* 特殊链接样式 */
.logout-link {
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.8rem !important;
    padding: 0.3rem 0.8rem !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 15px !important;
}

.logout-link:hover {
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
}

.auth-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

.auth-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
        order: 1;
    }
    
    .desktop-menu {
        display: none;
    }
    
    .nav-brand {
        flex: 1;
        justify-content: center;
        order: 2;
    }
    
    .navbar {
        padding: 0 1rem;
        height: 60px;
        gap: 0;
    }
    
    /* 确保主内容不被导航栏遮挡 */
    body {
        padding-top: 60px;
    }
    
    /* 移动端导航链接特殊样式 */
    .mobile-nav-link.logout-link {
        color: #dc3545 !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-nav-link.logout-link:hover {
        background: #f8d7da !important;
        color: #721c24 !important;
    }
    
    .mobile-nav-link.auth-btn {
        background: var(--gradient);
        color: white !important;
        margin: 1rem 1.5rem;
        border-radius: 25px;
        justify-content: center;
    }
    
    .mobile-nav-link.auth-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(41,98,255,0.3);
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 0.5rem;
    }
    
    .nav-brand a {
        font-size: 1rem;
    }
    
    .mobile-menu {
        width: 100%;
    }
    
    .hamburger-menu {
        padding: 4px;
        width: 28px;
        height: 28px;
    }
    
    .hamburger-menu span {
        width: 16px;
        height: 1.5px;
        margin: 2px 0;
    }
    
    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    
    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }
}

/* 动画效果 */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 滚动条样式 */
.mobile-menu::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
