/* ================================================================
 * SOFT 门户 · 花粉鸭soft — 共享样式
 * 设计令牌集中在此，所有页面复用，避免各页样式漂移。
 * ================================================================ */

:root {
  --bg: #0b1020;
  --bg-soft: #131a2e;
  --bg-elev: #182036;
  --border: #26304d;
  --border-soft: #1e2740;

  --text: #eaf1ff;
  --text-muted: #8fa0c4;
  --text-dim: #64749a;

  --accent: #66ccff;
  --accent-deep: #2aa8e8;
  --accent-soft: rgba(102, 204, 255, 0.12);

  --ok: #3fb950;
  --warn: #d29922;
  --err: #f85149;

  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);

  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Courier New", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;

  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 18% 0%, rgba(102, 204, 255, 0.10), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(42, 168, 232, 0.07), transparent 42%);
  background-attachment: fixed;
}

::selection { background: rgba(102, 204, 255, 0.35); }

a { color: var(--accent); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 16, 32, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(102, 204, 255, 0.4);
}
.brand .sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  font-family: var(--mono);
  display: block;
  line-height: 1.1;
}

.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); }
.nav a.active { color: var(--accent); background: var(--accent-soft); }

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.topbar-meta .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 5px;
  vertical-align: middle;
}
.topbar-meta .dot.off { background: var(--warn); }

/* ---------------- 通用区块 ---------------- */
section { padding: 64px 0; }
section.tight { padding: 44px 0; }
.section-head { margin-bottom: 34px; }
.section-head .kicker {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin-top: 6px;
  letter-spacing: -0.01em;
}
.section-head p { color: var(--text-muted); margin-top: 8px; max-width: 660px; }

.divider { border-top: 1px solid var(--border); }

/* ---------------- Hero ---------------- */
.hero { padding: 76px 0 56px; text-align: center; }
.hero .badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(102, 204, 255, 0.32);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  letter-spacing: 0.05em;
}
.hero h1 {
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  max-width: 640px;
  margin: 20px auto 30px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s, background .2s, border-color .2s, box-shadow .2s;
  font-family: var(--sans);
}
.btn-primary {
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: #04121f;
  box-shadow: 0 8px 22px rgba(102, 204, 255, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(102, 204, 255, 0.38); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------------- 卡片 ---------------- */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.card p { color: var(--text-muted); font-size: 0.93rem; }

/* 软件卡片 */
.soft-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.soft-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.soft-card .sc-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 0;
}
.soft-card .sc-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  display: grid; place-items: center;
  font-size: 1.7rem;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(102, 204, 255, 0.28);
}
.soft-card .sc-title { flex: 1; min-width: 0; }
.soft-card .sc-title h3 { font-size: 1.14rem; margin-bottom: 2px; }
.soft-card .sc-title .full { font-size: 0.78rem; color: var(--text-dim); font-family: var(--mono); }
.soft-card .sc-body { padding: 16px 22px 20px; flex: 1; }
.soft-card .sc-body p { color: var(--text-muted); font-size: 0.93rem; }
.soft-card .sc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: rgba(7, 12, 26, 0.4);
  flex-wrap: wrap;
}

/* 徽章 */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--sans);
  white-space: nowrap;
}
.tag.live { color: var(--ok); background: rgba(63, 185, 80, 0.14); }
.tag.beta { color: var(--warn); background: rgba(210, 153, 34, 0.14); }
.tag.dev { color: var(--text-muted); background: var(--border); }
.tag.plat {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(102, 204, 255, 0.25);
  font-family: var(--mono);
}
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* 功能条目 */
.feature-list { display: grid; gap: 14px; }
.feature-item {
  display: flex;
  gap: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color .2s;
}
.feature-item:hover { border-color: var(--accent); }
.feature-item .fi-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1.4; }
.feature-item .fi-body h3 { font-size: 1rem; margin-bottom: 4px; }
.feature-item .fi-body p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------------- 下载 ---------------- */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.dl-group {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.dl-group .dl-name { font-size: 1.08rem; font-weight: 700; margin-bottom: 2px; }
.dl-group .dl-meta {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.dl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 18px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  text-align: center;
  font-family: var(--sans);
  font-size: 1rem;
}
.dl-btn:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(102, 204, 255, 0.18); }
.dl-btn .dl-icon { font-size: 1.7rem; }
.dl-btn .dl-label { font-weight: 600; }
.dl-btn .dl-sub { font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim); }

/* 多下载源（蓝奏云 / 123云盘 / 直链…） */
.dl-sources { display: grid; gap: 10px; }
.dl-src {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  transition: border-color .2s, transform .2s, background .2s;
}
.dl-src:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(3px);
}
.dl-src .dl-src-main { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.dl-src .dl-src-note {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
}
.dl-src .pwd {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--warn);
  background: rgba(210, 153, 34, 0.13);
  border: 1px solid rgba(210, 153, 34, 0.3);
  padding: 2px 9px;
  border-radius: 999px;
}

.note {
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 0.87rem;
  color: var(--text-muted);
}
.note strong { color: var(--text); }

/* ---------------- 统计条 ---------------- */
.stats {
  display: flex;
  justify-content: center;
  gap: 44px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.stats .stat { text-align: center; }
.stats .stat b {
  display: block;
  font-family: var(--mono);
  font-size: 1.6rem;
  color: var(--accent);
}
.stats .stat span { color: var(--text-dim); font-size: 0.82rem; }

/* ---------------- 面包屑 ---------------- */
.crumbs {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 18px 0 0;
}
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 6px; }

/* ---------------- 页脚 ---------------- */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-inner .copy { color: var(--text-dim); font-size: 0.84rem; }
.footer-inner .links { display: flex; gap: 18px; }
.footer-inner .links a { color: var(--text-muted); text-decoration: none; font-size: 0.84rem; }
.footer-inner .links a:hover { color: var(--accent); }

/* ---------------- Toast ---------------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(120px);
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: transform .35s, opacity .35s;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
  font-family: var(--mono);
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ---------------- 版本更新条 ---------------- */
#versionBar {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  background: var(--accent);
  color: #04121f;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  z-index: 210;
  box-shadow: 0 -6px 24px rgba(102, 204, 255, 0.3);
}
#versionBar.show { display: block; }

/* ---------------- 我们的信念 ---------------- */
.belief-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 26px 30px;
  box-shadow: var(--shadow);
}
.belief-card img {
  display: block;
  width: 100%;
  max-width: 570px;
  height: auto;
  border-radius: 6px;
  background: #fff;
}
.belief-caption {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  font-weight: 500;
}
.belief-sub {
  font-size: 0.88rem;
  color: var(--text-dim);
  text-align: center;
  max-width: 560px;
  line-height: 1.8;
}

/* ---------------- 站点选择弹窗 ---------------- */
.picker-mask {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 18, 0.74);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 300;
}
.picker-mask.show { display: flex; }

.picker {
  width: 100%;
  max-width: 470px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px 22px;
  box-shadow: var(--shadow-lg);
  animation: pickerIn .22s ease;
}
@keyframes pickerIn {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.picker h3 { font-size: 1.2rem; margin-bottom: 8px; }
.picker .p-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 18px;
}
.picker .p-desc b { color: var(--text); }

.site-opt {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  margin-bottom: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .2s, background .2s;
}
.site-opt:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.site-opt .s-ico { font-size: 1.5rem; flex-shrink: 0; }
.site-opt .s-main { flex: 1; min-width: 0; }
.site-opt .s-main .s-name { font-weight: 700; font-size: 0.97rem; margin-bottom: 2px; }
.site-opt .s-main .s-url {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  word-break: break-all;
}
.site-opt .s-badge {
  font-size: 0.68rem;
  font-family: var(--mono);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-opt .s-badge.primary {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(102, 204, 255, 0.35);
}
.site-opt .s-badge.secondary {
  color: var(--text-muted);
  background: var(--border);
}

.picker .p-tip {
  margin-top: 6px;
  padding: 12px 15px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.picker .p-foot { display: flex; justify-content: flex-end; margin-top: 16px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; }
  .nav { margin-left: 0; width: 100%; justify-content: flex-start; }
  .topbar-meta { display: none; }
  .hero { padding: 52px 0 40px; }
  section { padding: 44px 0; }
  .stats { gap: 26px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
