/* ==========================================================================
   Novus OS 官网 — 全站样式（深色 / 浅色双主题）
   ========================================================================== */

/* ---------- 主题变量 ---------- */
:root {
    --bg: #080b14;
    --bg-2: #0d1220;
    --panel: #131a2c;
    --panel-2: #1a2338;
    --panel-3: #212c45;
    --border: #26314c;
    --border-soft: #1d2740;
    --text: #e8eefb;
    --text-2: #c6d2e8;
    --muted: #8d9bb6;
    --brand: #6366f1;
    --brand-2: #22d3ee;
    --brand-3: #a855f7;
    --green: #34d399;
    --amber: #fbbf24;
    --pink: #f472b6;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, .3);
    --glow-1: rgba(99, 102, 241, .22);
    --glow-2: rgba(34, 211, 238, .14);
    --code-bg: rgba(255, 255, 255, .06);
    --radius: 18px;
    --radius-sm: 12px;
    --maxw: 1180px;
    --font: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #f4f7fd;
    --bg-2: #ffffff;
    --panel: #ffffff;
    --panel-2: #f2f6fd;
    --panel-3: #e8effa;
    --border: #dde6f4;
    --border-soft: #e9eff8;
    --text: #0d1424;
    --text-2: #24344f;
    --muted: #5d6d87;
    --brand: #4f46e5;
    --brand-2: #0891b2;
    --brand-3: #9333ea;
    --green: #059669;
    --amber: #d97706;
    --pink: #db2777;
    --shadow: 0 16px 44px rgba(21, 40, 82, .12);
    --shadow-sm: 0 6px 18px rgba(21, 40, 82, .09);
    --glow-1: rgba(79, 70, 229, .14);
    --glow-2: rgba(8, 145, 178, .10);
    --code-bg: rgba(15, 23, 42, .06);
    color-scheme: light;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background:
        radial-gradient(1100px 680px at 82% -12%, var(--glow-1), transparent 62%),
        radial-gradient(900px 560px at -5% 4%, var(--glow-2), transparent 58%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font);
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s, color .3s;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
code { font-family: var(--mono); font-size: .9em; background: var(--code-bg); padding: 2px 7px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { padding: 88px 0; position: relative; }

/* ---------- 顶部导航 ---------- */
.nav {
    position: sticky; top: 0; z-index: 60;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }

.logo { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 18px; letter-spacing: .3px; }
.logo .mark {
    width: 33px; height: 33px; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    display: grid; place-items: center; font-size: 18px; color: #fff;
    box-shadow: 0 5px 18px var(--glow-1);
}
.logo .ver { color: var(--muted); font-weight: 500; font-size: 12px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links > a:not(.btn) {
    color: var(--muted); font-size: 14.5px; padding: 8px 13px; border-radius: 9px;
    transition: color .2s, background .2s;
}
.nav-links > a:not(.btn):hover { color: var(--text); background: var(--panel-2); }
.nav-links > a.active { color: var(--text); background: var(--panel-2); }
.nav-right { display: flex; align-items: center; gap: 10px; }

.icon-btn {
    width: 38px; height: 38px; display: grid; place-items: center;
    border-radius: 10px; border: 1px solid var(--border);
    background: var(--panel); color: var(--text); cursor: pointer; font-size: 16px;
    transition: .2s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand-2); transform: translateY(-1px); }
[data-theme="light"] .icon-btn:hover { color: var(--brand); }

.menu-toggle { display: none; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 11px; font-size: 14.5px; font-weight: 600;
    border: 1px solid transparent; cursor: pointer; transition: .22s; white-space: nowrap;
    font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 24px var(--glow-1); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px var(--glow-1); }
.btn-ghost { background: var(--panel); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); transform: translateY(-2px); }
.btn-green { background: linear-gradient(135deg, var(--green), #22c55e); color: #04231a; box-shadow: 0 8px 24px rgba(52, 211, 153, .28); }
.btn-green:hover { transform: translateY(-2px); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 13px; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }

/* ---------- Hero ---------- */
.hero { padding: 104px 0 76px; text-align: center; }
.hero .badge {
    display: inline-flex; align-items: center; gap: 9px; margin-bottom: 28px;
    padding: 6px 15px; border-radius: 999px; font-size: 13px; color: var(--muted);
    background: var(--panel); border: 1px solid var(--border);
}
.hero .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.hero h1 {
    font-size: clamp(40px, 7.4vw, 78px); line-height: 1.04; font-weight: 800; letter-spacing: -1.5px;
    background: linear-gradient(120deg, var(--text) 28%, var(--brand-2) 62%, var(--brand) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 24px;
}
.hero p.lead { font-size: clamp(16px, 2.1vw, 19.5px); color: var(--muted); max-width: 780px; margin: 0 auto 40px; }
.hero p.lead b { color: var(--text-2); font-weight: 600; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 56px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.chip {
    padding: 8px 16px; border-radius: 10px; background: var(--panel);
    border: 1px solid var(--border); font-size: 13.5px; color: var(--muted);
}
.chip b { color: var(--text); font-weight: 600; }

/* ---------- 页头（内页） ---------- */
.page-head { padding: 76px 0 44px; text-align: center; }
.page-head .kicker { color: var(--brand-2); font-weight: 700; font-size: 13px; letter-spacing: 2.4px; text-transform: uppercase; }
.page-head h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -1px; margin: 14px 0 16px; }
.page-head p { color: var(--muted); max-width: 700px; margin: 0 auto; font-size: 16.5px; }
.page-head .divider { width: 60px; height: 3px; border-radius: 2px; margin: 26px auto 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* ---------- 区块标题 ---------- */
.sec-head { text-align: center; max-width: 700px; margin: 0 auto 52px; }
.sec-head .kicker { color: var(--brand-2); font-weight: 700; font-size: 13px; letter-spacing: 2.4px; text-transform: uppercase; }
.sec-head h2 { font-size: clamp(27px, 3.8vw, 40px); font-weight: 800; letter-spacing: -.6px; margin: 12px 0 14px; }
.sec-head p { color: var(--muted); font-size: 16px; }

/* ---------- 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
    background: linear-gradient(180deg, var(--panel), var(--bg-2));
    border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 20px; text-align: center;
    transition: .25s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--brand); }
.stat .num {
    font-size: 32px; font-weight: 800;
    background: linear-gradient(120deg, var(--brand-2), var(--brand));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .lbl { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* ---------- 卡片 / 特性 ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; transition: .26s; position: relative; overflow: hidden;
}
.card::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--glow-1), transparent 45%);
    opacity: 0; transition: .26s;
}
.card:hover { transform: translateY(-5px); border-color: var(--brand); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card .ico {
    width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
    font-size: 23px; background: var(--panel-2); border: 1px solid var(--border);
    margin-bottom: 17px; position: relative;
}
.card h3 { font-size: 17.5px; margin-bottom: 9px; position: relative; }
.card p { color: var(--muted); font-size: 14.2px; position: relative; }
.card .tagline { display: inline-block; margin-top: 14px; font-size: 12px; font-family: var(--mono); color: var(--brand-2); position: relative; }

/* ---------- 项目速览 ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.split .txt p { color: var(--muted); margin-bottom: 16px; font-size: 15.5px; }
.split .txt p b { color: var(--text-2); }
.panel {
    background: linear-gradient(150deg, var(--panel), var(--bg-2));
    border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; position: relative; overflow: hidden;
}
.panel .glow { position: absolute; width: 210px; height: 210px; border-radius: 50%; background: radial-gradient(circle, var(--glow-1), transparent 70%); top: -70px; right: -70px; }
.panel h4 { margin-bottom: 14px; font-size: 16px; position: relative; }
.kv { list-style: none; position: relative; }
.kv li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--border-soft); font-size: 14.2px; color: var(--muted); }
.kv li:last-child { border-bottom: none; }
.kv li .k { color: var(--brand-2); font-weight: 700; min-width: 68px; flex-shrink: 0; }

/* ---------- 架构 ---------- */
.arch { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 14px; }
.arch-item {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 17px 19px; display: flex; gap: 14px; align-items: flex-start; transition: .22s;
}
.arch-item:hover { border-color: var(--brand-2); transform: translateY(-3px); }
.arch-item .tag {
    flex-shrink: 0; font-size: 11.5px; font-weight: 700; color: var(--brand-2);
    background: var(--panel-2); border: 1px solid var(--border);
    padding: 4px 9px; border-radius: 7px; min-width: 52px; text-align: center; font-family: var(--mono);
}
.arch-item h4 { font-size: 15px; margin-bottom: 3px; }
.arch-item p { color: var(--muted); font-size: 13.2px; }

/* ---------- 里程碑时间线 ---------- */
.timeline { position: relative; max-width: 860px; margin: 0 auto; padding-left: 10px; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--brand), var(--brand-2), transparent); }
.tl-item { position: relative; padding: 0 0 28px 58px; }
.tl-item .node {
    position: absolute; left: 9px; top: 4px; width: 21px; height: 21px; border-radius: 50%;
    background: var(--bg); border: 3px solid var(--brand-2); box-shadow: 0 0 0 4px var(--glow-2);
}
.tl-item.done .node { border-color: var(--green); box-shadow: 0 0 0 4px rgba(52, 211, 153, .16); }
.tl-item h4 { font-size: 16.5px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tl-item .badge-tag {
    font-size: 11px; font-weight: 600; color: var(--green);
    border: 1px solid var(--green); background: rgba(52, 211, 153, .1);
    padding: 2px 9px; border-radius: 6px;
}
.tl-item.wip .badge-tag { color: var(--amber); border-color: var(--amber); background: rgba(251, 191, 36, .1); }
.tl-item p { color: var(--muted); font-size: 14.2px; margin-top: 5px; }

/* ---------- 下载页 ---------- */
.dl-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 34px; }

.dl-card {
    background: linear-gradient(165deg, var(--panel), var(--bg-2));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px; position: relative; overflow: hidden; transition: .26s;
}
.dl-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.dl-card::after {
    content: ""; position: absolute; top: -80px; right: -80px; width: 220px; height: 220px;
    border-radius: 50%; background: radial-gradient(circle, var(--glow-1), transparent 70%);
}
.dl-card.test::after { background: radial-gradient(circle, rgba(168, 85, 247, .22), transparent 70%); }
.dl-card .dl-tag {
    display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700;
    padding: 5px 12px; border-radius: 999px; letter-spacing: .4px;
    background: var(--panel-2); border: 1px solid var(--border); color: var(--green);
}
.dl-card.test .dl-tag { color: var(--brand-3); border-color: var(--brand-3); }
.dl-card .dl-name { font-size: 21px; font-weight: 800; margin: 16px 0 6px; word-break: break-all; position: relative; }
.dl-card .dl-ver { font-size: 13.5px; color: var(--brand-2); font-family: var(--mono); position: relative; }
.dl-card .dl-meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 14px 0 22px; color: var(--muted); font-size: 13.5px; position: relative; }
.dl-card .dl-meta span { display: inline-flex; align-items: center; gap: 6px; }
.dl-card .dl-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.dl-card .dl-sha {
    margin-top: 18px; font-size: 11.5px; color: var(--muted); font-family: var(--mono);
    word-break: break-all; line-height: 1.55; position: relative;
    background: var(--code-bg); padding: 10px 12px; border-radius: 9px;
}
.dl-card.empty-state { display: grid; place-items: center; text-align: center; min-height: 250px; }
.dl-card.empty-state p { color: var(--muted); font-size: 14.5px; }

/* 镜像列表 */
.list-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.list-head {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 20px 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.list-head h3 { font-size: 18px; }
.list-head .cnt { color: var(--muted); font-size: 13.5px; }
.chan-block { padding: 6px 24px 20px; }
.chan-block + .chan-block { border-top: 1px solid var(--border-soft); }
.chan-title { display: flex; align-items: center; gap: 10px; padding: 16px 0 10px; font-weight: 700; font-size: 15px; }
.chan-title .ds { color: var(--muted); font-weight: 400; font-size: 12.8px; }

.iso-row {
    display: flex; align-items: center; gap: 15px; padding: 14px 16px;
    border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
    background: var(--panel-2); margin-bottom: 9px; transition: .2s;
}
.iso-row:hover { border-color: var(--brand-2); transform: translateX(3px); }
.iso-row .fico { font-size: 22px; flex-shrink: 0; }
.iso-row .meta { flex: 1; min-width: 0; }
.iso-row .meta .name { font-weight: 600; font-size: 14.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iso-row .meta .info { color: var(--muted); font-size: 12.5px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.iso-row .meta .info .sha { font-family: var(--mono); font-size: 11.5px; }
.iso-row .actions { flex-shrink: 0; display: flex; gap: 8px; }

.verify-note {
    display: flex; gap: 14px; align-items: flex-start; margin-top: 26px;
    background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--brand-2);
    border-radius: var(--radius-sm); padding: 18px 20px;
}
.verify-note .ico { font-size: 20px; }
.verify-note h4 { font-size: 15px; margin-bottom: 5px; }
.verify-note p { color: var(--muted); font-size: 13.5px; }
.verify-note code { word-break: break-all; }

/* 步骤 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; position: relative; }
.step .num {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
    font-weight: 800; font-size: 15px; margin-bottom: 14px;
}
.step h4 { font-size: 15.5px; margin-bottom: 7px; }
.step p { color: var(--muted); font-size: 13.5px; }

/* ---------- 技术栈 ---------- */
.tech { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.tech span {
    padding: 9px 17px; border-radius: 10px; background: var(--panel);
    border: 1px solid var(--border); font-size: 13.5px; color: var(--muted); transition: .2s;
}
.tech span:hover { border-color: var(--brand-2); color: var(--text); }

/* ---------- CTA ---------- */
.cta-band {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-radius: 24px; padding: 48px 40px; text-align: center; color: #fff; position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; margin-bottom: 12px; }
.cta-band p { opacity: .9; max-width: 560px; margin: 0 auto 26px; font-size: 15.5px; }
.cta-band .btn-white { background: #fff; color: #111827; }
.cta-band .btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, .28); }
.cta-band .btn-outline { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); color: #fff; }
.cta-band .btn-outline:hover { background: rgba(255, 255, 255, .26); }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--border); padding: 46px 0 58px; background: var(--bg-2); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; }
.foot-grid .copy { color: var(--muted); font-size: 13.5px; margin-top: 14px; max-width: 340px; }
.foot-col h5 { font-size: 14px; margin-bottom: 14px; }
.foot-col a { display: block; color: var(--muted); font-size: 13.5px; padding: 5px 0; transition: color .2s; }
.foot-col a:hover { color: var(--brand-2); }
.foot-bottom { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; }

/* ---------- 动效（仅在启用 JS 时生效，避免脚本失败导致内容不可见） ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.show { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .feat-grid { grid-template-columns: 1fr 1fr; }
    .dl-hero-grid { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .nav-links {
        display: none; position: absolute; top: 66px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 4px;
        background: var(--bg-2); border-bottom: 1px solid var(--border);
        padding: 14px 22px 18px; box-shadow: var(--shadow-sm);
    }
    .nav-links.open { display: flex; }
    .nav-links > a:not(.btn) { padding: 11px 12px; }
    .menu-toggle { display: grid; }
    .feat-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr; }
    .foot-grid { grid-template-columns: 1fr; }
    section { padding: 62px 0; }
    .hero { padding: 72px 0 56px; }
    .iso-row { flex-wrap: wrap; }
    .iso-row .actions { width: 100%; justify-content: flex-end; }
}

/* ---------- 自动同步状态条 ---------- */
.sync-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 22px;
    font-size: 13.5px; color: var(--muted);
}
.sync-dot {
    width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
    background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6);
}
.sync-dot.working { animation: pulse 1.1s ease-out infinite; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
    70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.sync-text { color: var(--text-2); font-weight: 500; }
.sync-text.dim { color: var(--muted); font-weight: 400; }
.sync-sep { color: var(--border); }
.sync-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .slider {
    width: 38px; height: 21px; border-radius: 999px; background: var(--panel-3);
    border: 1px solid var(--border); position: relative; transition: .22s; flex-shrink: 0;
}
.switch .slider::after {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 15px; height: 15px; border-radius: 50%; background: var(--muted); transition: .22s;
}
.switch input:checked + .slider { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; }
.switch input:checked + .slider::after { left: 20px; background: #fff; }
.switch-label { font-size: 13px; color: var(--muted); }
.switch input:checked ~ .switch-label { color: var(--text-2); }

/* 下载按钮更新高亮 */
.btn.flash { animation: flashBg 1.6s ease; }
@keyframes flashBg {
    0%, 100% { box-shadow: 0 8px 24px var(--glow-1); }
    25%      { box-shadow: 0 0 0 4px rgba(52, 211, 153, .45); }
    60%      { box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }
}

/* 新版本提示 */
.toast {
    position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 24px);
    background: var(--panel); color: var(--text); border: 1px solid var(--brand);
    border-left: 3px solid var(--green);
    padding: 13px 22px; border-radius: 12px; font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow); opacity: 0; pointer-events: none;
    transition: opacity .35s, transform .35s; z-index: 200; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
    .sync-actions { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* ---------- 三通道下载卡片 ---------- */
.dl-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.dl-card.stable::after { background: radial-gradient(circle, rgba(52, 211, 153, .22), transparent 70%); }
.dl-card.test::after   { background: radial-gradient(circle, rgba(251, 191, 36, .20), transparent 70%); }
.dl-card.dev::after    { background: radial-gradient(circle, rgba(168, 85, 247, .22), transparent 70%); }
.dl-card.stable .dl-tag { color: var(--green); border-color: var(--green); background: rgba(52, 211, 153, .08); }
.dl-card.test .dl-tag   { color: var(--amber); border-color: var(--amber); background: rgba(251, 191, 36, .08); }
.dl-card.dev .dl-tag    { color: var(--brand-3); border-color: var(--brand-3); background: rgba(168, 85, 247, .08); }
.dl-card .dl-name { font-size: 17.5px; }

/* ---------- 其他版本选择器 ---------- */
.ver-picker {
    background: linear-gradient(165deg, var(--panel), var(--bg-2));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; margin-bottom: 24px; scroll-margin-top: 80px;
}
.vp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.vp-head h3 { font-size: 19px; margin-bottom: 5px; }
.vp-head p { color: var(--muted); font-size: 13.8px; }
.vp-body { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }

.ver-select {
    width: 100%; padding: 13px 14px; font-size: 14px; font-family: var(--font);
    background: var(--panel-2); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
    transition: border-color .2s; appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 19px) 55%, calc(100% - 13px) 55%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
.ver-select:hover { border-color: var(--brand-2); }
.ver-select:focus { outline: none; border-color: var(--brand); }
.ver-select option, .ver-select optgroup { background: var(--panel-2); color: var(--text); }

.vp-info { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.vp-row { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border-soft); font-size: 13.5px; }
.vp-row:last-child { border-bottom: none; }
.vp-row span { color: var(--muted); min-width: 68px; flex-shrink: 0; }
.vp-row b { font-weight: 600; color: var(--text-2); word-break: break-all; }
.vp-row b.sha { font-family: var(--mono); font-size: 11.5px; color: var(--amber); }

.vp-actions { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; }
.vp-empty { color: var(--muted); text-align: center; padding: 26px 0; }
.ver-picker .hint { color: var(--muted); font-size: 13px; margin-top: 12px; }

@media (max-width: 980px) {
    .dl-grid-3 { grid-template-columns: 1fr; }
    .vp-body { grid-template-columns: 1fr; }
}

/* ---------- 历史版本页：工具条与筛选 ---------- */
.vlist-toolbar {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 22px;
}
.search-box {
    flex: 1 1 320px; display: flex; align-items: center; gap: 10px;
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
    padding: 10px 14px; transition: border-color .2s;
}
.search-box:focus-within { border-color: var(--brand); }
.search-box .si { opacity: .6; font-size: 15px; }
.search-box input {
    flex: 1; border: none; outline: none; background: transparent;
    color: var(--text); font-size: 14px; font-family: var(--font);
}
.search-box input::placeholder { color: var(--muted); }
.vfilters { display: flex; gap: 10px; flex-wrap: wrap; }
.chip-filter {
    border: 1px solid var(--border); background: var(--panel-2);
    color: var(--muted); border-radius: 999px; padding: 8px 15px;
    font-size: 13px; cursor: pointer; transition: .2s; font-family: var(--font);
}
.chip-filter b { color: var(--text-2); margin-left: 4px; font-weight: 700; }
.chip-filter:hover { border-color: var(--brand-2); color: var(--text-2); }
.chip-filter.active {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent; color: #fff;
}
.chip-filter.active b { color: #fff; }
.vlist-empty { font-size: 14px; }

@media (max-width: 720px) {
    .vlist-toolbar { flex-direction: column; align-items: stretch; }
    .vfilters { justify-content: space-between; }
}

/* ---------- 其他版本入口卡片 ---------- */
.version-cta {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    background: linear-gradient(150deg, var(--panel), var(--bg-2));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px 28px; margin-bottom: 24px;
}
.version-cta::after { background: radial-gradient(circle, rgba(168, 85, 247, .18), transparent 70%); }
.vc-ico {
    width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px;
    display: grid; place-items: center; font-size: 26px;
    background: rgba(168, 85, 247, .12); border: 1px solid rgba(168, 85, 247, .3);
}
.vc-body { flex: 1; min-width: 240px; }
.vc-body h3 { font-size: 18px; margin-bottom: 6px; }
.vc-body p { color: var(--muted); font-size: 14px; }
.vc-actions { display: flex; gap: 12px; flex-wrap: wrap; }
