.header {
    background-color: var(--primary-color);
    color: var(--dark-text);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 16px;
}

.header_container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Header Left Section */
.header_left {
    display: flex;
    align-items: center;
    gap: 32px;
}

button:focus {
    outline: none;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.logo img {
    width: 40px;
    height: 35px;
    object-fit: contain;
    margin-right: 13px;
}

/* Navigation Links */
.nav_links ul {
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav_links ul li {
    position: relative;
    margin-right: 50px;
    cursor: pointer;
}

.nav_links ul li .menu_data {
    cursor: pointer;
    position: absolute;
    top: 100%;
    left: 50%;
    background: #FFFFFF;
    border-radius: 12px;
    display: none;
    transform: translateX(-45%);
    opacity: 0;
    transition: opacity 0.3s ease;
    min-width: 135px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    padding: 6px 26px;
    border-top: 3px solid #4154f1;
}

.nav_links ul li:hover .menu_data {
    display: block;
    opacity: 1;
}

.nav_links a {
    color: var(--dark-text);
    text-decoration: none;
    padding: 8px 0;
    position: relative;
    font-weight: 500;
    font-size: 16px;
    display: block;
    transition: color 0.3s ease;
    cursor: pointer;
    white-space: nowrap; /* 禁止文本换行 */
    padding-left: 0.6em;
}

.nav_links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav_links a:hover::after,
.nav_links a:focus::after {
    width: 100%;
}

/* Header Right Section */
.header_right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

/* User Info */
.user_info {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    cursor: pointer;
}

.user_avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dropdown_menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 8px 0;
}

.dropdown_menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown_menu a {
    display: block;
    padding: 8px 16px;
    color: var(--dark-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown_menu a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: space-between;
}

.current-language {
    font-size: 14px;
    color: var(--dark-text);
    color: #000000;
}

.arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--dark-text);
    transition: transform 0.3s ease;
}

.language-dropdown {
    position: absolute;
    right: 0;
    width: 160px;
    background-color: #fff;
    border-radius: 19px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: none;
    margin-top: 8px;
    padding: 8px;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 13px;
    transition: background-color 0.3s ease;
    color: #000000;
    justify-content: space-between;
}

.language-option:hover {
    background-color: #f5f5f5;
}

/* Login Button */
.login_start {
    background: #4154F1;
    border-radius: 34px;
    border: none;
    padding: 12px 24px;
    color: #FFFFFF;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.login_start:hover {
    background: #ffffff;
    transform: translateY(-2px);
    color: #4154f1;
    border: 1px solid #4154f1;
}

.menu_toggle {
    display: none;
}

.logo {
    display: block;
    cursor: pointer;
}

.login_text {
    max-width: 8ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.menu_data a {
    position: relative;
}

.menu_data a::before {
    content: ""; /* Changed from 'contain' to 'content' */
    width: 5px;
    height: 5px;
    background: #9CA0A9;
    position: absolute;
    left: -10px; /* Added left position - adjust as needed */
    top: 50%;
    transform: translateY(-50%);
    border-radius: 2.5px;
}


.menu_data + a:after {
    display: none;
}

.menu_data + a {
    pointer-events: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .menu_data + a {
        display: none;
    }

    .header_container {
        height: 56px;
        padding: 0 12px;
    }

    .header_left {
        gap: 16px;
    }

    .logo img {
        width: 32px;
        height: 28px;
        margin-right: 8px;
    }

    .nav_links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        padding-top: 8vw;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 90;
        overflow: hidden;
    }

    .nav_links.mobile_open {
        transform: translateX(0);
    }

    .nav_links ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav_links ul li {
        width: 100%;
        text-align: center;
        padding-right: 0;
    }

    .nav_links ul li .menu_data {
        position: static;
        width: 100%;
        transform: none;
        box-shadow: none;
        background-color: transparent;
        display: none;
        padding: 0;
    }

    .nav_links ul li:hover .menu_data,
    .nav_links ul li:focus-within .menu_data {
        display: flex;
        flex-direction: column;
    }

    .nav_links a {
        padding: 16px;
        font-size: 18px;
    }

    .menu_toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        z-index: 100;
        padding: 0;
    }

    .menu_toggle .close_icon {
        display: none;
        font-size: 24px;
    }

    .menu_toggle.mobile_open .menu_icon_img {
        display: none;
    }

    .menu_toggle.mobile_open .close_icon {
        display: block;
    }

    .header_right {
        gap: 12px;
    }

    .user_avatar {
        width: 32px;
        height: 32px;
    }

    .login_start {
        padding: 10px 16px;
        font-size: 14px;
    }

    .language-dropdown {
        width: 140px;
    }

    .menu_toggle {
        display: block;
    }

    .logo {
        display: none;
    }

    .nav_links ul li .menu_data {
        display: flex;
        flex-direction: column;
        opacity: 1;
        border-top: none;
    }
}

/* Accessibility Improvements */
a:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #014c8d;
}

::-webkit-scrollbar-track {
    border-radius: 10px;
    background: #FFF;
}

.footer-language {
    width: 150px;
}

.footer-language-box .language-trigger {
    border: 2px solid #c8c8c8;
    margin-top: 20px;
    border-radius: 15px;
}

.footer-language-box .language-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
}


.footer-language-box .current-language {
    font-size: 16px;
    color: var(--dark-text);
    color: #000000;
}

.footer-language-box .arrow {
    width: 0;
    height: 0;
    border-top: none;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--dark-text);
    transition: transform 0.3s ease;
}

.arrow_hover {
    transform: rotate(180deg);
}

.footer-language-box .current-language {
    margin-left: 5px;
}