:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-color: #667eea;
    --accent-color-alt: #764ba2;
    --card-bg: #ffffff;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --header-bg: #ffffff;
    --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --footer-bg: #333333;
    --footer-text: #ffffff;
}

/* 暗色模式变量 */
.dark {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-color: #667eea;
    --accent-color-alt: #764ba2;
    --card-bg: #2d2d2d;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    --header-bg: #2d2d2d;
    --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --footer-bg: #1a1a1a;
    --footer-text: #ffffff;
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 主题切换开关样式 */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.theme-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 导航栏样式 */
header {
    background-color: var(--header-bg);
    box-shadow: var(--header-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* 主内容区域样式 */
main {
    margin-top: 80px;
    padding: 2rem 0;
}

/* 英雄区域样式 */
.hero-section {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-alt) 100%);
    color: white;
    border-radius: 0 0 20px 20px;
    margin-bottom: 4rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero-image {
    flex: 1;
    min-width: 280px;
    display: flex;
    /*justify-content: center;*/
    align-items: center;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 功能特点区域样式 */
.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 页脚样式 */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .theme-switch-wrapper {
        order: 3;
    }
    
    .nav-links {
        order: 2;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin: 0.5rem 0;
    }
    
    main {
        margin-top: 180px;
    }
    
    .hero-section {
        padding: 4rem 1rem;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .features-section {
        padding: 0 1rem;
    }
}