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

:root {
    --bg-deep: #0b0f19;
    --bg-card: #0f172a;
    --bg-card-hover: #111c2d;
    --border-default: #1e293b;
    --border-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --accent-blue: #3b82f6;
    --accent-blue-soft: #60a5fa;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-teal: #14b8a6;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --transition: 0.25s ease;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ===== 导航栏 (与首页统一) ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px;
    background: rgba(11, 15, 25, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-default);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: none;
}

.nav-logo-text {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.02em;
}

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

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition);
    padding: 6px 0;
    position: relative;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
}

.github-btn:hover {
    background: #273549;
    border-color: var(--border-hover);
}

.github-btn svg {
    fill: currentColor;
    width: 16px;
    height: 16px;
}

/* ===== 下载页头部 ===== */
.download-header {
    padding: 160px 24px 60px 24px;
    max-width: 1320px;
    margin: 0 auto;
    text-align: center;
}

.hero-eyebrow {
    font-size: 14px;
    color: var(--accent-blue-soft);
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    display: block;
}

.download-header h1 {
    font-size: 44px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.04em;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.download-header h1 span {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-soft) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 760px;
    margin: 0 auto 32px auto;
    line-height: 1.7;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: baseline;
    gap: 8px;
    background: rgba(30, 41, 59, 0.5);
    padding: 10px 18px;
    border-radius: 24px;
    border: 1px solid var(--border-default);
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-pill strong {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

/* ===== 核心下载卡片网格（5个卡片自动适配） ===== */
.download-grid-panel {
    max-width: 1320px;
    margin: 0 auto 80px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
}

.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 38px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition);
}

.platform-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}

.platform-info h2 {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.platform-tag {
    font-size: 11px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.25);
    white-space: nowrap;
}

.platform-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 28px 0;
    line-height: 1.6;
}

.meta-specs {
    margin-bottom: 28px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-tertiary);
}

.meta-specs div {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.meta-specs div:last-child {
    margin-bottom: 0;
}

.meta-specs span {
    color: #cbd5e1;
    font-weight: 500;
}

/* 下载按钮通用样式 */
.dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
}

/* iOS 按钮 */
.ios-download-btn {
    background: #1e293b;
    color: #ffffff;
    border: 1px solid #475569;
}
.ios-download-btn:hover {
    background: #273549;
    border-color: #64748b;
}

/* Windows 按钮 */
.win-download-btn {
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}
.win-download-btn:hover {
    background: #2563eb;
}

/* Android 按钮 */
.android-download-btn {
    background: var(--accent-green);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.android-download-btn:hover {
    background: #059669;
}

/* 规则包按钮 */
.rules-download-btn {
    background: #7c3aed;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}
.rules-download-btn:hover {
    background: #6d28d9;
}

/* 配置模板按钮 */
.template-download-btn {
    background: #d97706;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}
.template-download-btn:hover {
    background: #b45309;
}

/* ===== 附加工具版块 ===== */
.tools-extra-section {
    max-width: 1320px;
    margin: 0 auto 100px auto;
    padding: 0 24px;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.section-title p {
    font-size: 15px;
    color: var(--text-tertiary);
    margin: 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.tool-card {
    background: #0f172a;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    border-color: var(--accent-teal);
    transform: translateY(-3px);
}

.tool-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.tool-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.tool-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 20px 0;
    flex: 1;
}

.tool-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-teal);
    text-decoration: none;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tool-link:hover {
    text-decoration: underline;
}

.tool-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-tertiary);
    background: rgba(0,0,0,0.25);
    padding: 6px 10px;
    border-radius: 6px;
    word-break: break-all;
}

/* ===== 发行管道版块 ===== */
.release-pipeline-section {
    max-width: 1320px;
    margin: 0 auto 120px auto;
    padding: 0 24px;
}

.pipeline-box {
    background: linear-gradient(135deg, #0f172a 0%, #090d16 100%);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.pipeline-box h3 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pipeline-box h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
}

.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pipeline-item {
    border-left: 2px solid var(--border-hover);
    padding-left: 20px;
}

.pipeline-item.active {
    border-left-color: var(--accent-blue);
}

.pipeline-title {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 6px;
}

.pipeline-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* ===== 校验码与透明度说明版块 ===== */
.checksum-info-section {
    max-width: 1320px;
    margin: 0 auto 100px auto;
    padding: 0 24px;
}

.checksum-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 40px;
    align-items: center;
}

.checksum-text h3 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 14px 0;
}

.checksum-text p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.checksum-text code {
    background: #1e293b;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: #e2e8f0;
    font-size: 13px;
}

.card-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.card-link:hover {
    gap: 10px;
}

.checksum-example {
    background: #090d16;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checksum-hash {
    color: var(--accent-blue-soft);
    word-break: break-all;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-green);
    font-weight: 700;
    font-size: 13px;
    background: rgba(16, 185, 129, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    width: fit-content;
}

/* ===== 页脚 (与首页统一) ===== */
.footer-new {
    background-color: #090d16;
    border-top: 1px solid var(--border-default);
    padding: 80px 24px 60px 24px;
}

.footer-new-container {
    max-width: 1320px;
    margin: 0 auto;
}

.footer-main-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 50px;
    border-bottom: 1px solid var(--border-default);
    flex-wrap: wrap;
    gap: 48px;
}

.footer-brand-info {
    max-width: 420px;
}

.footer-brand-info h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 12px 0;
}

.footer-brand-info p {
    color: var(--text-tertiary);
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

.footer-links-group-wrapper {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-links-cluster {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-cluster span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-links-cluster a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition);
}

.footer-links-cluster a:hover {
    color: var(--accent-blue);
}

.footer-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 36px;
    font-size: 13px;
    color: #475569;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-meta-row a {
    color: #475569;
    text-decoration: none;
    margin-left: 24px;
    transition: color var(--transition);
}

.footer-meta-row a:hover {
    color: #64748b;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .download-grid-panel {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .checksum-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .pipeline-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer-main-row {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .footer-links-group-wrapper {
        justify-content: center;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }
    .nav-links {
        display: none;
    }
    .download-header {
        padding-top: 130px;
    }
    .download-header h1 {
        font-size: 32px;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .header-stats {
        gap: 12px;
    }
    .stat-pill {
        padding: 8px 14px;
        font-size: 13px;
    }
    .footer-meta-row {
        flex-direction: column;
        text-align: center;
    }
    .footer-meta-row div:last-child {
        margin-top: 8px;
    }
    .footer-meta-row a {
        margin: 0 12px;
    }
}