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

:root {
    --primary-color: #217346;
    --primary-dark: #1a5c38;
    --secondary-color: #2b579a;
    --accent-color: #0078d4;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* 头部样式 */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 20px rgba(33, 115, 70, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--white);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo .tagline {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.2rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.main-nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.main-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
    z-index: -1;
}

.main-nav a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.main-nav a:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.main-nav a.active {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Hero区域 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

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

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

.btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px solid var(--white);
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 学习路径区域 */
.learning-path-section {
    padding: 4rem 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.learning-path {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.path-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.path-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.path-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.path-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.path-card p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.path-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.path-link:hover {
    color: var(--primary-dark);
}

/* 特性区域 */
.features-section {
    padding: 4rem 0;
    background: var(--bg-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
}

.feature-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.feature-item p {
    color: var(--light-text);
    line-height: 1.7;
}

/* 页脚 */
.site-footer {
    background: var(--text-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* 教程页面样式 */
.tutorial-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.tutorial-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.tutorial-header h1 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.tutorial-meta {
    color: var(--light-text);
    font-size: 0.9rem;
}

.tutorial-content {
    line-height: 1.8;
}

.tutorial-content h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.tutorial-content h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.tutorial-content p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.tutorial-content ul,
.tutorial-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.tutorial-content li {
    margin-bottom: 0.5rem;
}

.code-block {
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.tip-box {
    background: #e8f5e9;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.tip-box strong {
    color: var(--primary-color);
}

.warning-box {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.note-box {
    background: #e3f2fd;
    border-left: 4px solid var(--accent-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .learning-path {
        grid-template-columns: 1fr;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.4rem;
    }

    .main-nav ul {
        gap: 0.3rem;
    }

    .main-nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}