/* ===== CSS 变量定义 ===== */
:root {
    --primary-color: #a855f7;
    --primary-hover: #9333ea;
    --accent-color: #ec4899;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #fdf8f6;
    --bg-card: #faf5ff;
    --border-color: #f1e4fc;
    --border-dark: #e2d4f0;
    --shadow-sm: 0 4px 14px rgba(168, 85, 247, 0.12);
    --shadow-md: 0 12px 24px -10px rgba(168, 85, 247, 0.15);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius-md: 12px;
    --radius-lg: 20px;
    --max-width: 1200px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s ease;
}

/* ===== 全局重置 ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* ===== 导航栏 ===== */
header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-box {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 20px;
    gap: 12px;
}

.logo-img {
    width: 32px;
    height: 32px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
}

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

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

/* ===== 下载页 Hero ===== */
.download-hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px 30px;
}

.hero-text {
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background-color: #f3e8ff;
    color: var(--primary-hover);
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    gap: 6px;
}

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

.hero-text h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-text h1 span {
    color: var(--primary-color);
}

.hero-desc {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 800px;
    line-height: 1.7;
}

.hero-desc strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ===== 章节通用标题 ===== */
.section-title {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 20px;
}

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

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 54px;
    font-size: 16px;
}

/* ===== 双版本选择向导（创意版块） ===== */
.version-select-section {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    padding: 0 24px;
}

.version-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.version-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    text-align: center;
    transition: all var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.version-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.version-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
    align-self: center;
}

.badge-mod {
    background-color: #ede9fe;
    color: #7c3aed;
}

.badge-pro {
    background-color: #fce7f3;
    color: #be185d;
}

.version-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
}

.version-features {
    list-style: none;
    text-align: left;
    margin-bottom: 28px;
    flex: 1;
}

.version-features li {
    padding: 6px 0;
    font-size: 15px;
    color: #334155;
    position: relative;
    padding-left: 24px;
}

.version-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.btn-outline {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-fast);
    align-self: center;
}

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

/* ===== 下载卡片网格 ===== */
.download-section {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    padding: 0 24px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.download-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px 28px;
    text-align: center;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.download-card:hover {
    background-color: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.platform-icon {
    width: 64px;
    height: 64px;
    background-color: #ffffff;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.1);
}

.download-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.version-tag {
    font-size: 13px;
    color: var(--accent-color);
    font-weight: 600;
    background-color: #fce7f3;
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    align-self: center;
}

.platform-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
    flex: 1;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.btn-download {
    display: block;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--bg-white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
    transition: all var(--transition-fast);
    text-align: center;
}

.btn-download:hover {
    opacity: 0.9;
    box-shadow: 0 6px 16px rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
}

.btn-download-alt {
    background: linear-gradient(135deg, #7c3aed 0%, #be185d 100%);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

/* ===== 下载保障区块（创意版块） ===== */
.verify-section {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    padding: 0 24px;
}

.verify-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #fdf2f8 100%);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    box-shadow: var(--shadow-sm);
}

.verify-icon {
    flex-shrink: 0;
    background-color: #ffffff;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.verify-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: #166534;
    margin-bottom: 12px;
}

.verify-text p {
    font-size: 15px;
    color: #166534;
    line-height: 1.7;
    margin-bottom: 16px;
}

.verify-text p strong {
    font-weight: 700;
}

.text-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.text-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ===== 安装环境参考（创意版块） ===== */
.env-reference {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    padding: 0 24px;
}

.env-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.env-item {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    text-align: center;
    transition: all var(--transition-fast);
}

.env-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.env-os {
    display: block;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 8px;
}

.env-req {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.env-arch {
    display: inline-block;
    background-color: #f3e8ff;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    margin-top: 8px;
}

/* ===== 页脚 ===== */
footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 70px 0 30px;
    font-size: 14px;
    border-top: 1px solid #1e293b;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-info {
    flex: 1 1 300px;
}

.footer-info h4 {
    color: var(--bg-white);
    font-size: 17px;
    margin-bottom: 18px;
    font-weight: 700;
}

.footer-info p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.footer-links {
    flex: 2 1 500px;
}

.footer-links-table {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col {
    flex: 1 1 150px;
}

.footer-col h5 {
    color: var(--bg-white);
    font-size: 14px;
    margin-bottom: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

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

.footer-col a {
    color: #94a3b8;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 50px auto 0;
    padding: 24px 24px 0;
    border-top: 1px solid #1e293b;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 16px 24px;
        align-items: flex-start;
    }

    .nav-menu {
        flex-wrap: wrap;
        gap: 16px;
        margin-top: 12px;
    }

    .download-hero {
        padding: 60px 20px 30px;
    }

    .hero-text h1 {
        font-size: 32px;
    }

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

    .version-select-grid {
        grid-template-columns: 1fr;
    }

    .verify-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-container {
        flex-direction: column;
    }

    .footer-links-table {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 26px;
    }

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