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

:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --primary-light: #ebf5fb;
    --secondary: #2c3e50;
    --secondary-light: #ecf0f1;
    --accent: #1abc9c;
    --accent-dark: #16a085;
    --accent-light: #d1f2eb;
    --light: #ecf0f1;
    --dark: #1a1a2e;
    --dark-light: #f8f9fa;
    --gray: #7f8c8d;
    --gray-light: #bdc3c7;
    --success: #27ae60;
    --success-light: #d5f4e6;
    --warning: #f39c12;
    --warning-light: #fdebd0;
    --danger: #e74c3c;
    --danger-light: #fadbd8;
    
    /* 默认暗色主题变量 */
    --bg-color: #121212;
    --bg-secondary: #0f0f1a;
    --bg-card: rgba(26, 26, 46, 0.8);
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-muted: #95a5a6;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --header-bg: rgba(26, 26, 46, 0.95);
    --hero-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --card-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    --footer-bg: #0a0a14;
    --footer-text: #ecf0f1;
    --invert-img: invert(100%); 
}

/* 亮色主题变量 */
@media (prefers-color-scheme: light) {
    :root {
        --bg-color: #f8f9fa;
        --bg-secondary: #ffffff;
        --bg-card: rgba(255, 255, 255, 0.95);
        --text-primary: #2c3e50;
        --text-secondary: #34495e;
        --text-muted: #7f8c8d;
        --border-color: rgba(0, 0, 0, 0.08);
        --shadow-color: rgba(0, 0, 0, 0.08);
        --header-bg: rgba(255, 255, 255, 0.98);
        --hero-gradient: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
        --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        --footer-bg: #2c3e50;
        --footer-text: #ecf0f1;
        --invert-img: none; 
    }
}

/* 手动主题切换的类 */
.light-theme {
    --bg-color: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-muted: #7f8c8d;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.08);
    --header-bg: rgba(255, 255, 255, 0.98);
    --hero-gradient: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --footer-bg: #2c3e50;
    --footer-text: #ecf0f1;
    --invert-img: none; 
}

.dark-theme {
    --bg-color: #121212;
    --bg-secondary: #0f0f1a;
    --bg-card: rgba(26, 26, 46, 0.9);
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-muted: #95a5a6;
    --border-color: rgba(255, 255, 255, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --header-bg: rgba(26, 26, 46, 0.95);
    --hero-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --card-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    --footer-bg: #0a0a14;
    --footer-text: #ecf0f1;
    --invert-img: invert(100%); 
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* 头部导航 - 手机端优化 */
header {
    background-color: var(--header-bg);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: 70px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo i {
    color: var(--primary);
    margin-right: 8px;
}

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

/* 桌面端导航 */
.desktop-nav {
    display: flex;
}

.desktop-nav ul {
    display: flex;
    list-style: none;
}

.desktop-nav ul li {
    margin-left: 25px;
}

.desktop-nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 1rem;
    white-space: nowrap;
}

.desktop-nav ul li a:hover {
    color: var(--primary);
}

/* 移动端汉堡菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    transition: all 0.3s;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 移动端导航菜单 - 修复初始状态 */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    z-index: 999;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

.mobile-nav.active {
    display: block;
    max-height: 500px;
    opacity: 1;
    padding: 20px 0;
}

.mobile-nav ul {
    list-style: none;
    width: 100%;
}

.mobile-nav ul li {
    width: 100%;
    text-align: center;
}

.mobile-nav ul li a {
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 15px 20px;
    font-size: 1.1rem;
    transition: all 0.3s;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav ul li:last-child a {
    border-bottom: none;
}

.mobile-nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.mobile-nav .cta-button {
    display: block;
    margin: 20px auto 0;
    width: 80%;
    text-align: center;
}

.cta-button {
    background-color: var(--primary);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    white-space: nowrap;
}

.cta-button:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 7px 14px rgba(52, 152, 219, 0.2);
}

/* 页脚 */
footer {
    background-color: var(--footer-bg);
    padding: 70px 0 30px;
    color: var(--footer-text);
}

@media (max-width: 768px) {
    footer {
        padding: 50px 0 25px;
    }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--footer-text);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 15px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--accent);
}

.light-theme .footer-column ul li a,
.dark-theme .footer-column ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    border: none;
}

@media (max-width: 768px) {
    .theme-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        bottom: 20px;
        right: 20px;
    }
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

/* 响应式设计 - 手机端导航栏优化 */
@media (max-width: 992px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-container .cta-button {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
}

@media (min-width: 993px) {
    .mobile-nav {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
}

@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 576px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 打印样式 */
@media print {
    .theme-toggle {
        display: none;
    }
    
    .hero-buttons {
        display: none;
    }
    
    header {
        position: static;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .mobile-nav {
        display: none;
    }
}

