/* 导航栏样式 - 使用置顶设计 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    position: sticky; /* 使用sticky而不是fixed，这样在滚动到顶部之前不会固定 */
    top: 0;
    z-index: 1000;
    width: 100%; /* 确保宽度为100% */
    left: 0; /* 确保左对齐 */
    box-sizing: border-box; /* 确保padding不会增加元素宽度 */
}

.white-bg header {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.white-bg .logo a {
    color: #000;
}

/* Logo样式 */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.logo-img {
    height: 50px;
    margin-right: 15px;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0;
    letter-spacing: 0.05em;
}

/* 导航链接样式 */
nav {
    display: flex;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 菜单切换按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 语言切换按钮 */
.language-switch {
    display: flex;
    margin-left: 20px;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.lang-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.lang-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 响应式样式 */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
}