/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar {
    padding: 20px 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 40px;
    width: auto;
    transition: all 0.3s ease;
}

.brand-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
    align-items: center;
}

/* 认证按钮样式 */
.nav-auth {
    display: flex;
    align-items: center;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-btn {
    padding: 8px 16px !important;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.auth-divider {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* 用户头像和下拉菜单 */
.user-profile {
    position: relative;
}

.user-avatar {
    position: relative;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    background: rgba(255, 255, 255, 0.1);
}

.avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.user-avatar:hover .avatar-img {
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.user-avatar:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.dropdown-item.logout-btn {
    color: #e17055;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    padding-top: 12px;
}

.dropdown-item.logout-btn:hover {
    background: rgba(233, 112, 85, 0.1);
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #f0f0f0;
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 滚动后导航栏保持透明 */
.header.scrolled {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header.scrolled .navbar {
    padding: 15px 0;
}

.header.scrolled .nav-brand {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.header.scrolled .brand-logo {
    height: 35px;
}

.header.scrolled .brand-text {
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header.scrolled .nav-link {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.header.scrolled .nav-link:hover {
    color: #f0f0f0;
}

.header.scrolled .bar {
    background: white;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 响应式导航栏 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
        padding: 20px 0;
        gap: 20px;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        color: white;
        text-shadow: none;
        padding: 15px 0;
        font-size: 1.1rem;
    }
    
    .header:not(.scrolled) .nav-link {
        color: white;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* 移动端导航栏始终保持透明风格 */
@media (max-width: 768px) {
    .header .nav-brand {
        color: white;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    
    .header .brand-text {
        background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}