/* ========================================
   Clash 官网 - 明亮极简设计系统
   ======================================== */

/* ---- CSS Variables ---- */
:root {
    --bg: #f9fafb;
    --bg-alt: #ffffff;
    --bg-hover: #f3f4f6;
    --border: #e5e7eb;
    --border-hover: #d1d5db;
    --text: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-light: #ffedd5;
    --accent-soft: #fff7ed;
    --green: #10b981;
    --green-light: #d1fae5;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.06), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --transition: all 0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ---- Container ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

/* ---- Navbar ---- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 0 28px; height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo {
    width: 34px; height: 34px;
    background: var(--accent); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; color: #fff;
}
.nav-name { font-size: 17px; font-weight: 700; color: var(--text); }
.nav-links { display: flex; gap: 2px; }
.nav-link {
    padding: 7px 16px; border-radius: 7px; font-size: 14px; font-weight: 500;
    color: var(--text-secondary); text-decoration: none; transition: var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--bg-hover); }
.nav-link.active { color: var(--accent-dark); background: var(--accent-light); }

/* ---- Hero ---- */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 120px 28px 100px; background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(249,115,22,0.06), transparent),
        radial-gradient(ellipse 50% 40% at 80% 50%, rgba(16,185,129,0.04), transparent);
}
.hero-inner { max-width: 680px; text-align: center; }
.hero-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border: 1px solid var(--border);
    border-radius: 50px; font-size: 13px; font-weight: 500;
    color: var(--accent-dark); background: var(--accent-soft);
    margin-bottom: 28px; animation: fadeUp 0.5s ease-out;
}
.hero-chip-dot {
    width: 6px; height: 6px; background: var(--green); border-radius: 50%;
}
.hero-title {
    font-size: clamp(40px, 7vw, 60px); font-weight: 800;
    line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 20px;
    animation: fadeUp 0.5s ease-out 0.1s both;
}
.hero-title .hl {
    background: linear-gradient(135deg, var(--accent) 0%, #ef4444 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 17px; color: var(--text-secondary); max-width: 540px;
    margin: 0 auto 36px; line-height: 1.7;
    animation: fadeUp 0.5s ease-out 0.2s both;
}
.hero-actions {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    animation: fadeUp 0.5s ease-out 0.3s both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 12px 24px; font-size: 15px; font-weight: 600;
    border-radius: 10px; text-decoration: none; cursor: pointer;
    transition: var(--transition); white-space: nowrap;
}
.btn-accent {
    background: var(--accent); color: #fff;
    box-shadow: 0 2px 8px rgba(249,115,22,0.25);
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(249,115,22,0.3); }
.btn-outline {
    background: var(--bg-alt); color: var(--text);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.btn-outline:hover { border-color: var(--border-hover); background: var(--bg-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: 12px; }
.btn-icon { font-size: 1em; }

/* ---- Stats ---- */
.stats { padding: 80px 0 60px; }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; background: var(--bg-alt);
}
.stat-item {
    padding: 32px 20px; text-align: center; transition: var(--transition);
    border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: var(--accent-soft); }
.stat-num {
    font-size: 28px; font-weight: 700; color: var(--accent); margin-bottom: 4px;
}
.stat-lbl { font-size: 13px; color: var(--text-muted); }

/* ---- Sections ---- */
.section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
    display: inline-block; padding: 4px 12px; border: 1px solid var(--border);
    border-radius: 50px; font-size: 12px; font-weight: 600;
    color: var(--accent-dark); background: var(--accent-soft);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px;
}
.section-title {
    font-size: clamp(28px, 4vw, 36px); font-weight: 700; margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.section-desc { font-size: 16px; color: var(--text-secondary); max-width: 520px; margin: 0 auto; }

/* ---- Feature Cards ---- */
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.feat-card {
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px 24px;
    transition: var(--transition); position: relative; overflow: hidden;
}
.feat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.feat-card-icon {
    font-size: 28px; margin-bottom: 16px;
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); border: 1px solid var(--accent-light);
}
.feat-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feat-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ---- Comparison Table ---- */
.compare { padding: 100px 0; }
.table-wrap {
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; background: var(--bg-alt); box-shadow: var(--shadow-sm);
}
.table-row {
    display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr;
    padding: 18px 24px; align-items: center; font-size: 14px;
    border-bottom: 1px solid var(--border); transition: var(--transition);
}
.table-row:last-child { border-bottom: none; }
.table-row.head {
    background: var(--accent-soft); font-weight: 600;
    color: var(--text); font-size: 13px; text-transform: uppercase; letter-spacing: 0.3px;
}
.table-row:hover:not(.head) { background: var(--bg-hover); }
.table-row .check { color: var(--green); font-weight: 600; }
.table-row .dash { color: var(--text-muted); }
.table-row .highlight { color: var(--accent); font-weight: 600; }

/* ---- Download Page ---- */
.dl-page { min-height: 100vh; padding: 130px 28px 80px; background:
    radial-gradient(ellipse 60% 50% at 50% -5%, rgba(249,115,22,0.05), transparent); }
.dl-content { max-width: 580px; margin: 0 auto; text-align: center; }
.dl-logo {
    width: 80px; height: 80px; margin: 0 auto 28px;
    background: var(--accent); border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: 700; color: #fff;
    box-shadow: 0 4px 16px rgba(249,115,22,0.25);
}
.dl-title { font-size: 34px; font-weight: 700; margin-bottom: 8px; }
.dl-sub { font-size: 15px; color: var(--text-secondary); margin-bottom: 40px; }

/* Platform Tabs */
.platform-tabs { display: flex; justify-content: center; gap: 6px; margin-bottom: 28px; }
.platform-tab {
    padding: 9px 20px; border-radius: 9px; font-size: 14px; font-weight: 500;
    color: var(--text-secondary); background: var(--bg-alt);
    border: 1px solid var(--border); cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow-sm);
}
.platform-tab:hover { border-color: var(--accent); color: var(--text); }
.platform-tab.active {
    background: var(--accent-soft); border-color: var(--accent);
    color: var(--accent-dark); box-shadow: var(--shadow);
}

/* Download Card */
.dl-card {
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 36px 32px;
    margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.dl-ver {
    display: inline-block; padding: 5px 14px;
    background: var(--green-light); border: 1px solid #a7f3d0;
    border-radius: 50px; font-size: 13px; font-weight: 600;
    color: var(--green); margin-bottom: 24px;
}
.dl-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; text-align: left; margin-bottom: 28px; }
.dl-info-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.dl-info-item:last-child, .dl-info-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.dl-info-lbl { color: var(--text-muted); }
.dl-info-val { color: var(--text); font-weight: 500; }
.dl-btn { width: 100%; justify-content: center; font-size: 16px; }
.dl-back { margin-top: 24px; font-size: 14px; }
.dl-back a { color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.dl-back a:hover { color: var(--text); }

/* ---- 404 Page ---- */
.e404-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 120px 28px 80px; }
.e404-inner { text-align: center; max-width: 480px; }
.e404-icon {
    font-size: 80px; margin-bottom: 8px; display: block;
    animation: float404 3s ease-in-out infinite;
}
@keyframes float404 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-3deg); }
    75% { transform: translateY(5px) rotate(3deg); }
}
.e404-code {
    font-size: clamp(90px, 18vw, 140px); font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; margin-bottom: 10px;
}
.e404-title { font-size: 24px; font-weight: 600; margin-bottom: 12px; }
.e404-desc { font-size: 15px; color: var(--text-secondary); margin-bottom: 32px; }
.e404-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---- Footer ---- */
.footer {
    padding: 36px 28px; text-align: center;
    border-top: 1px solid var(--border); color: var(--text-muted);
    font-size: 13px; background: var(--bg-alt);
}
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---- Scroll Animations ---- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- Page Transition ---- */
.page-in { animation: pageIn 0.4s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .navbar { padding: 0 18px; }
    .nav-link { padding: 6px 10px; font-size: 13px; }
    .hero { padding: 100px 18px 80px; }
    .hero-desc { font-size: 15px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 280px; justify-content: center; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2n) { border-right: none; }
    .stat-item:nth-child(1), .stat-item:nth-child(2) { border-bottom: 1px solid var(--border); }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .section { padding: 60px 0; }
    .table-row { grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr; padding: 12px 14px; font-size: 12px; }
    .dl-info-grid { grid-template-columns: 1fr; }
    .dl-card { padding: 24px; }
    .platform-tabs { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-item { border-right: none !important; border-bottom: 1px solid var(--border); }
    .stat-item:last-child { border-bottom: none; }
    .table-row { font-size: 11px; padding: 10px 8px; }
}
