/* --- 全局变量 (保持一致) --- */
:root {
    --primary-color: #4f46e5;
    --secondary-color: #0ea5e9;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-main: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

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

/* --- 头部导航复用 --- */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
    z-index: 1002;
}

.logo span {
    color: var(--text-main);
}

.logo-footer {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -1px;
}

.logo-footer span {
    color: var(--text-white);
}

.nav-links {
    display: flex;
    gap: 30px;
}

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

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

.auth-buttons {
    display: flex;
    gap: 15px;
}

.auth-buttons .login {
    margin-top: 10px;
    font-weight: 600;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* --- Footer --- */
footer {
    background: var(--dark-bg);
    color: #94a3b8;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    border-top: 1px solid #334155;
    padding-top: 20px;
    font-size: 0.9rem;
}

/* --- 移动端适配 (Responsive) --- */
.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    z-index: 1002;
    color: var(--primary-color);
}

/* 移动端菜单遮罩层 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 移动端菜单容器 */
.mobile-nav-container {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 1001;
    padding: 80px 30px 30px;
    transition: right 0.4s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-nav-container.active {
    right: 0;
}

/* 移动端菜单关闭按钮 */
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    color: var(--text-main);
    cursor: pointer;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.mobile-menu-close:hover {
    background-color: #f1f5f9;
}

/* 移动端导航链接 */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.mobile-nav-links a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: color 0.3s;
}

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

/* 移动端登录注册按钮 */
.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-auth-buttons .btn {
    width: 100%;
    text-align: center;
}

.mobile-auth-buttons .login {
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    padding: 15px 0;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .nav-links, .auth-buttons {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .stats-bar {
        padding: 30px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .copyright span {
        display: none;
    }

    /* 移动端菜单动画 */
    .mobile-nav-container.active ~ .mobile-menu-overlay {
        opacity: 1;
        visibility: visible;
    }
}

@media (min-width: 769px) {
    .mobile-menu-overlay,
    .mobile-nav-container {
        display: none;
    }
}

