:root {
    --primary: #1a3a6c;
    --secondary: #2c5282;
    --accent: #4c7db5;
    --light: #f0f4f8;
    --dark: #0d1b2a;
    --gray: #718096;
    --light-gray: #e2e8f0;
    --white: #ffffff;
    --warning: #e67e22;
    --success: #27ae60;
    --lang-bg: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部 */
header {
    background: var(--white);
    color: var(--primary);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    z-index: 101;
}

.logo-img {
    width: 205px;
    height: 65px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 导航 */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 4px;
}

nav a:hover, nav a.active {
    background-color: var(--light-gray);
    color: var(--primary);
}

/* 语言切换 */
.language-switcher {
    position: relative;
    z-index: 101;
    margin-left: 20px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--lang-bg);
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: var(--light);
    border-color: var(--accent);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 140px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 200;
}

.language-switcher.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
}

.lang-option:hover {
    background: var(--light);
    color: var(--primary);
}

.lang-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
}

.flag-cn {
    background: linear-gradient(to bottom, #de2910 0%, #de2910 33%, #ffde00 33%, #ffde00 66%, #de2910 66%, #de2910 100%);
}

.flag-us {
    background: linear-gradient(to bottom, 
        #b22234 0%, #b22234 7.7%, 
        #ffffff 7.7%, #ffffff 15.4%, 
        #b22234 15.4%, #b22234 23.1%, 
        #ffffff 23.1%, #ffffff 30.8%, 
        #b22234 30.8%, #b22234 38.5%, 
        #ffffff 38.5%, #ffffff 46.2%, 
        #b22234 46.2%, #b22234 54%, 
        #3c3b6e 54%, #3c3b6e 100%);
    position: relative;
}

.flag-us::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 53.8%;
    background: #3c3b6e;
}

/* 移动端按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 24px;
    cursor: pointer;
    z-index: 101;
}

/* 电脑版布局 */
@media (min-width: 769px) {
    .header-container {
        justify-content: flex-start;
    }
    .logo {
        margin-right: auto;
    }
    nav {
        margin-right: 20px;
    }
}

/* 移动端 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    nav ul.show {
        display: flex;
    }

    nav a {
        display: block;
        padding: 15px;
        text-align: center;
    }

    .language-switcher {
        position: absolute;
        right: 50px;
        top: 50%;
        transform: translateY(-50%);
    }

    .lang-btn span {
        display: none;
    }
}