/* 导航栏样式 - 深蓝色主题 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.1);
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand:hover {
    transform: scale(1.05);
    text-decoration: none;
}

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

/* 社交链接样式 */
.social-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.1);
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.social-link i {
    transition: transform 0.3s ease;
}

.social-link:hover i {
    transform: scale(1.1);
}

/* X图标SVG样式 */
.x-icon-svg {
    width: 1.1rem;
    height: 1.1rem;
    transition: transform 0.3s ease;
}

.social-link.x-link:hover .x-icon-svg {
    transform: scale(1.1);
}

/* 用户菜单样式 */
.user-menu {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.user-menu-button:hover {
    background: var(--background-light);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.user-menu-button .icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s;
}

.user-menu.active .user-menu-button .icon {
    transform: rotate(180deg);
}

.user-menu-content {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 180px;
    background: var(--background-card);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.user-menu.active .user-menu-content {
    display: block;
    animation: menuSlideIn 0.2s ease-out;
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-menu-item {
    display: block;
    padding: 0.875rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.user-menu-item:hover {
    background: var(--background-light);
    color: var(--primary-color);
    text-decoration: none;
}

/* 登录注册按钮 */
.auth-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.login-button {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    background: var(--background-card);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.login-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.register-button {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    display: inline-block;
}

.register-button:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .social-links {
        gap: 0.5rem;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .x-icon-svg {
        width: 1rem;
        height: 1rem;
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 0.75rem;
    }

    .auth-buttons {
        gap: 0.5rem;
    }

    .login-button,
    .register-button {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }
    
    .social-links {
        gap: 0.4rem;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .x-icon-svg {
        width: 0.9rem;
        height: 0.9rem;
    }
}

@media (max-width: 480px) {
    .auth-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .login-button,
    .register-button {
        width: 100px;
        text-align: center;
    }
    
    .social-links {
        gap: 0.3rem;
    }
    
    .social-link {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    
    .x-icon-svg {
        width: 0.85rem;
        height: 0.85rem;
    }
}

@media (max-width: 380px) {
    .social-links {
        flex: 0;
        gap: 0.25rem;
    }
    
    .social-link {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .x-icon-svg {
        width: 0.8rem;
        height: 0.8rem;
    }
}

/* 新Header布局适配（header-left / header-right） */

.header-container{
    width:100%;
    max-width:1200px;
    margin:0 auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.1);
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-left .logo {
    height: 36px;
    width: auto;
    display: block; /* 保证在所有页面中垂直居中一致 */
}

.header-left .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.header-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s ease;
}

.header-link:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

.header-center{
    display:flex;
    gap:1.5rem;
}

.header-center .header-link{
    font-weight:600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

