/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
}

/* 导航栏样式 */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
}

/* Logo 样式 */
.logo {
    flex: 1;
}

.logo img {
    height: 40px;
    max-width: 100%;
    object-fit: contain;
}

/* 导航链接 - 桌面端 */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #EA3200;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #EA3200;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 菜单切换按钮 - 移动端 */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: #EA3200;
}

/* 移动端样式 */
@media (max-width: 768px) {
    nav {
        padding: 0 15px;
        height: 60px;
    }

    .menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    /* 添加背景遮罩 */
    .overlay {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 998;
    }

    .overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .logo img {
        height: 35px;
    }
    
    nav {
        height: 55px;
    }
    
    .menu-toggle {
        font-size: 20px;
    }
    
    .nav-links {
        top: 55px;
    }
    
    .nav-links a {
        font-size: 15px;
        padding: 12px 0;
    }
}

/* 动画效果 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-links.active li {
    animation: slideIn 0.3s ease forwards;
}

.nav-links.active li:nth-child(1) { animation-delay: 0.1s; }
.nav-links.active li:nth-child(2) { animation-delay: 0.2s; }
.nav-links.active li:nth-child(3) { animation-delay: 0.3s; }
.nav-links.active li:nth-child(4) { animation-delay: 0.4s; }
.nav-links.active li:nth-child(5) { animation-delay: 0.5s; }

/* 图标切换动画 */
.menu-toggle i {
    transition: transform 0.3s ease;
}

.menu-toggle.active i {
    transform: rotate(90deg);
}


/* 页脚基础样式 */
footer {
    background: #282828;
    color: #C6C6C6;
    padding: 2rem 0;
}

.sx-footer {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.left {
    width: 70%;
}

.right {
    width: 25%;
    text-align: center;
}

.footer-link {
    margin-right: 15px;
    color: #C6C6C6;
    text-decoration: none;
    /*去掉下划线*/
}

.footer-link:hover {
    color: #fff;
}

.footer-legal {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.footer-legal a {
    color: #939393;
    text-decoration: none;
    display: inline-block;
    margin: 0 10px;
    transition: color var(--transition);
}

.footer-legal a:hover {
    color: var(--secondary-color);
}

/* 页脚移动端样式 */
@media (max-width: 768px) {

    .sx-footer {
        flex-direction: column;
    }

    .left,
    .right {
        width: 100%;
        text-align: center;
    }

    .right {
        margin-top: 20px;
    }

    .footer-link {
        margin: 5px 0;
    }
}