:root {
    --primary-color: #053ca2;
    --primary-light: #1a5f7a;
    --secondary-color: #0099cc;
    --secondary-light: #2a9d8f;
    --accent-color: #e76f51;
    --light-color: #f8f9fa;
    --light-gray: #e9ecef;
    --medium-gray: #adb5bd;
    --dark-color: #343a40;
    --darker-color: #212529;
    --border-color: #dee2e6;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--dark-color);
    background-color: #f5f7fa;
    line-height: 1.6;
    overflow-x: hidden;
}

html[lang="zh-CN"] body {
    font-family: 'Noto Sans SC', sans-serif;
}

html[lang="zh-TW"] body {
    font-family: 'Microsoft JhengHei', sans-serif;
}

html[lang="en"] body {
    font-family: 'Arial', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul,
ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-title.center {
    text-align: center;
}

.section-title.center:after {
    left: 50%;
    transform: translateX(-50%);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 顶部导航条 */
.top-nav {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 0;
}

.top-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.date-info i {
    margin-left: 0.6rem;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.language-selector {
    position: relative;
}

.language-selector select {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.4rem 1.2rem 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.language-selector select option {
    background-color: white;
    color: var(--dark-color);
    padding: 0.5rem;
}

/* 用户头像区域 */
.user-avatar-section {
  display: flex;
  align-items: center;
  gap: 10px; /* 头像与退出按钮的间距 */
  position: relative;
}

.user-avatar-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* 头像 */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    /* object-fit: cover; */
    border: 1px solid rgba(255,255,255,0.4);
}
.user-avatar:hover {
  transform: scale(1.05); /*  hover 放大效果 */
}
.user-logout{
    
}

.auth-buttons {
    display: flex;
    gap: 0.8rem;
}

.auth-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-btn.register {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-btn.login {
    background-color: white;
    color: var(--primary-color);
}

/* 主导航栏 */
.main-header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

/* Logo设计 */
.logo {
    display: flex;
    align-items: center;
    /* 垂直居中 */
    gap: 1rem;
    height: 100%;
    /* 确保高度占满父容器 */
}

.logo-graphic {
    /* height: 80px; */
    position: relative;
    display: flex;
    /* 添加flex布局 */
    align-items: center;
    /* 垂直居中 */
    justify-content: center;
    /* 水平居中 */
}

.logo-graphic img {
    height: 60px;
    /* 调整为合适的高度 */
    width: auto;
    /* 保持宽高比 */
    object-fit: contain;
    /* 确保图片完整显示 */
    display: block;
    /* 消除图片底部的空白 */
    max-height: 100%;
    /* 确保不超过容器高度 */
}


/* PC端导航菜单 */
.main-nav {
    display: flex;
    gap: 1.2rem;
}

.nav-item {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    padding: 0.8rem 0.4rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
}

.nav-item:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-item:hover:after,
.nav-item.active:after {
    width: 100%;
}

/* PC端一级菜单隐藏箭头 */
.nav-dropdown>.nav-item i.fa-chevron-down {
    display: none;
}

/* 有三级菜单的二级菜单箭头 */
.has-submenu .submenu-toggle i.fa-chevron-right {
    display: inline-block;
}

/* 一级下拉菜单 */
.nav-dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: var(--shadow-hover);
    border-radius: var(--border-radius);
    padding: 0.8rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--dark-color);
    position: relative;
    font-size: 1.1rem;
}

.dropdown-content a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* 二级下拉菜单 */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 0;
    left: 100%;
    background-color: white;
    min-width: 200px;
    box-shadow: var(--shadow-hover);
    border-radius: var(--border-radius);
    padding: 0.8rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: var(--transition);
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.9rem;
    width: 200px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 60, 162, 0.1);
    width: 240px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--medium-gray);
}

/* 汉堡菜单按钮 */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* 页脚 */
footer {
    background-color: var(--darker-color);
    color: white;
    padding-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.4rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-col h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

.footer-col p {
    color: var(--medium-gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
}

.contact-text {
    text-align: left;
}

.contact-text p {
    margin-bottom: 0.3rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: var(--medium-gray);
    padding: 0.5rem 0;
}

.footer-links a:hover {
    color: white;
    padding-left: 0.5rem;
}

.copyright {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-light);
    transform: translateY(-5px);
}

/* 移动端菜单遮罩 */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.footer-col .logo-graphic {
    display: flex;
    flex-wrap: wrap;        /* ✅ 允许换行 */
    align-items: flex-start;/* ✅ 顶部对齐 */
    gap: 0.5rem;            /* ✅ 图标与文字间距（如有） */
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.4;       /* ✅ 多行更美观 */
    word-break: keep-all;   /* ✅ 中文不拆字 */
    overflow-wrap: break-word;
}

/* 2️⃣ 简介段落 */
.footer-col .footer-col-content p {
    display: block;
    width: 100%;
    margin-bottom: 0;
    line-height: 1.8;
    word-break: keep-all;   /* ✅ 中文不拆词 */
    overflow-wrap: break-word;
    white-space: normal;    /* ✅ 强制允许换行 */
}

/* 响应式设计 - 移动端适配 */
@media (max-width: 768px) {
    .top-nav .container {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .top-nav-left,
    .top-nav-right {
        width: 100%;
        justify-content: center;
    }

    /* 移动端导航菜单 */
    .hamburger-menu {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 2rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1001;
    }

    .main-nav.active {
        right: 0;
    }

    .nav-item {
        padding: 1rem 0;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item:after {
        display: none;
    }

    .nav-dropdown {
        width: 100%;
    }

    .logo-graphic img {
        height: 30px;
    }

    /* 移动端显示所有箭头 */
    .nav-dropdown>.nav-item i.fa-chevron-down,
    .has-submenu .submenu-toggle i.fa-chevron-right {
        display: inline-block;
        margin-left: auto;
        transition: transform 0.3s ease;
    }

    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown-content.active {
        max-height: 1000px;
    }

    .dropdown-content a {
        padding: 0.8rem 1rem 0.8rem 2rem;
        font-size: 0.95rem;
    }

    /* 移动端箭头旋转效果 */
    .nav-dropdown.active>.nav-item i.fa-chevron-down,
    .has-submenu.active>.submenu-toggle i.fa-chevron-right {
        transform: rotate(90deg);
    }

    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .submenu.active {
        max-height: 1000px;
    }

    .search-box input {
        width: 150px;
    }

    .search-box input:focus {
        width: 180px;
    }
}

/* 页脚移动端优化 */
@media (max-width: 768px) {
    footer {
        padding: 2rem 0 0 0;
        /* 减少上内边距 */
    }

    .footer-content {
        grid-template-columns: 1fr;
        /* 单列布局 */
        gap: 2rem;
        /* 减少间距 */
        padding: 0 1rem;
        /* 添加水平内边距 */
    }

    .footer-col {
        padding: 1.5rem;
        background-color: rgba(255, 255, 255, 0.05);
        /* 浅色背景 */
        border-radius: var(--border-radius);
    }

    .footer-col h3 {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        /* 可点击展开/收起 */
    }

    .footer-col h3:after {
        content: '+';
        font-size: 1.2rem;
        color: var(--secondary-color);
        background: none;
        width: auto;
        height: auto;
    }

    .footer-col h3.active:after {
        content: '-';
    }

    .footer-col-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .footer-col.active .footer-col-content {
        max-height: 1000px;
    }

    .contact-item {
        padding: 0.8rem 0;
    }

    .contact-icon {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .footer-links a {
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-links a:last-child {
        border-bottom: none;
    }

    .footer-links a:hover {
        padding-left: 0.8rem;
    }

    .copyright {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
        text-align: center;
    }
}

/* 移动端返回顶部按钮优化 */
@media (max-width: 768px) {
    .back-to-top {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1.2rem;
    }
}

/* 移动端下拉菜单箭头样式 */
.mobile-dropdown-arrow {
    transition: transform 0.3s ease;
}

.mobile-dropdown-arrow.active {
    transform: rotate(90deg);
}

/* 语言切换相关样式 */
.language-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.language-notification button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: opacity 0.3s ease;
}

.language-notification button:hover {
    opacity: 0.8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 临时修复：限制文本只显示一行 */
.nav-item,
[data-i18n] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}