/* ===== 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: 1100px;
    --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: 1200px;
    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 ===== */
.compare-hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px 20px;
}

.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);
}

.compare-hero h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.compare-hero h1 span {
    color: var(--primary-color);
}

.hero-desc {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
}

.hero-desc strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ===== 快速概览双卡片 ===== */
.quick-overview-section {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    padding: 0 24px;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.overview-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;
    align-items: center;
}

.overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.overview-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.badge-mod {
    background-color: #ede9fe;
    color: #7c3aed;
}

.badge-pro {
    background-color: #fce7f3;
    color: #be185d;
}

.overview-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.overview-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
    flex: 1;
}

.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);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

/* ===== 章节标题 ===== */
.section-title {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
    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;
}

/* ===== 核心性能指标条 ===== */
.compare-metrics-section {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    padding: 0 24px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.metric-item {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.metric-value {
    font-size: 20px;
    font-weight: 800;
}

.mod-value {
    color: #7c3aed;
    font-size: 18px;
}

.pro-value {
    color: #be185d;
    font-size: 18px;
}

.metric-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===== 详细功能对比表格 ===== */
.detail-compare-section {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    padding: 0 24px;
}

.compare-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.compare-table thead th {
    background-color: #faf5ff;
    padding: 18px 20px;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid var(--border-dark);
}

.compare-table thead th:first-child {
    text-align: left;
    border-right: 1px solid var(--border-color);
}

.compare-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    color: #334155;
}

.compare-table tbody td:first-child {
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
    border-right: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.compare-table tbody tr:last-child td {
    border-bottom: none;
}

.compare-table tbody tr:hover td {
    background-color: #faf5ff;
}

.compare-table .badge-mod,
.compare-table .badge-pro {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* ===== 适用场景推荐 ===== */
.scenario-section {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    padding: 0 24px;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.scenario-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    text-align: center;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.scenario-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-3px);
}

.scenario-icon {
    font-size: 36px;
}

.scenario-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.scenario-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.scenario-recommend {
    margin-top: 8px;
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

/* ===== 最新特性差异卡片 ===== */
.latest-features-section {
    max-width: var(--max-width);
    margin: 0 auto 60px;
    padding: 0 24px;
}

.feature-diff-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #fdf2f8 100%);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-lg);
    padding: 36px 32px;
}

.feature-diff-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.feature-diff-card p {
    font-size: 15px;
    color: #334155;
    line-height: 1.8;
}

/* ===== 决策建议总结 ===== */
.summary-section {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    padding: 0 24px;
}

.summary-box {
    background: var(--bg-light);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
}

.summary-box h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
}

.summary-box ul {
    list-style: none;
}

.summary-box li {
    font-size: 16px;
    color: #334155;
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
    line-height: 1.6;
}

.summary-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.summary-box a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.summary-box a:hover {
    text-decoration: underline;
}

/* ===== 页脚 ===== */
footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 70px 0 30px;
    font-size: 14px;
    border-top: 1px solid #1e293b;
}

.footer-container {
    max-width: 1200px;
    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: 1200px;
    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;
    }

    .compare-hero {
        padding: 60px 20px 20px;
    }

    .compare-hero h1 {
        font-size: 32px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .compare-table {
        font-size: 13px;
    }

    .compare-table thead th,
    .compare-table tbody td {
        padding: 12px 10px;
    }

    .scenario-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .compare-hero h1 {
        font-size: 28px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scenario-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
    }

    .footer-links-table {
        flex-direction: column;
        gap: 30px;
    }
}