/* ============================================================
   ZenSkill 官网 v2 — 对齐 zenlearning.cn 设计体系
   token 抄自主站实测: seed-primary #0071E3 / seed-accent #FF375F
   radius 10px / spacing 4px / Plus Jakarta Sans + Noto Serif SC
   ============================================================ */

:root {
  --seed-primary: #0071E3;
  --seed-primary-700: #0059b8;
  --seed-accent: #FF375F;
  --sky: #0EA5E9;
  --gold: #E8A13A;
  --violet: #7C5CFF;
  --seed-radius-base: 10px;

  /* 中性（oklch hue 264.4 与主站同源，已转 hex 近似） */
  --bg: #f7f8fa;
  --bg-2: #eef0f4;
  --card: #ffffff;
  --border: #e3e6ec;
  --border-strong: #d3d7e0;
  --fg: #1c1f26;
  --fg-2: #5b6472;
  --fg-3: #8b93a3;
  --navy: #0c1c3e;
  --navy-2: #123070;
  --hero-from: #0c1c3e;
  --hero-to: #0a4fd0;
  --term-bg: #0b1220;
  --svg-card: #ffffff;
  --svg-fg: #1c1f26;
  --svg-muted: #5b6472;
  --shadow: 0 1px 2px rgb(16 24 40 / .05);
  --shadow-lg: 0 12px 32px rgb(12 28 62 / .16);
  --shadow-hover: 0 10px 28px rgb(12 28 62 / .12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e131b;
    --bg-2: #131a24;
    --card: #171f2b;
    --border: #26303f;
    --border-strong: #35415330;
    --fg: #e8edf5;
    --fg-2: #a5aebf;
    --fg-3: #737e91;
    --navy: #0a1730;
    --svg-card: #171f2b;
    --svg-fg: #e8edf5;
    --svg-muted: #a5aebf;
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
    --shadow-lg: 0 12px 32px rgb(0 0 0 / .45);
    --shadow-hover: 0 10px 28px rgb(0 0 0 / .4);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15.5px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Noto Serif SC", "Plus Jakarta Sans", serif; }
code, pre, .mini-term, .mini-tui, .mini-code { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; }
a { color: var(--seed-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

/* ---------- ① 玻璃拟态顶栏 ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--card) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; color: var(--fg); }
.brand:hover { text-decoration: none; }
.logo {
  display: inline-flex; width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--seed-primary), var(--sky));
  color: #fff; font-size: 15px; font-weight: 800;
  align-items: center; justify-content: center;
}
.nav nav { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 600; }
.nav nav a { color: var(--fg-2); }
.nav nav a:hover { color: var(--fg); text-decoration: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 11px 24px; border-radius: var(--seed-radius-base);
  background: var(--seed-primary); color: #fff !important; font-weight: 700; font-size: 15px;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--seed-primary-700); transform: translateY(-1px); box-shadow: var(--shadow-hover); text-decoration: none; }
.btn.ghost { background: transparent; color: #fff !important; border: 1.5px solid rgb(255 255 255 / .55); }
.btn.ghost:hover { background: rgb(255 255 255 / .1); border-color: #fff; box-shadow: none; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; border-radius: 8px; }
.btn-block { display: block; text-align: center; padding: 10px 0; font-size: 14.5px; }

/* ---------- ② Hero ---------- */
.hero {
  background: linear-gradient(158deg, var(--hero-from) 0%, var(--hero-to) 78%, #1a6ef5 100%);
  color: #fff; padding: 84px 0 96px; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  font-size: 13px; letter-spacing: .12em; color: rgb(255 255 255 / .75);
  font-weight: 600; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px); line-height: 1.22; font-weight: 800;
  letter-spacing: .01em;
}
.hero h1 .accent { color: var(--seed-accent); }
.sub { margin-top: 22px; font-size: 16.5px; color: rgb(255 255 255 / .88); max-width: 560px; }
.cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .hint { margin-top: 18px; font-size: 13px; color: rgb(255 255 255 / .6); }

/* hero 终端 + 截图浮卡 */
.hero-visual { position: relative; }
.term {
  background: var(--term-bg); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid rgb(255 255 255 / .12);
}
.term-bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: rgb(255 255 255 / .06); border-bottom: 1px solid rgb(255 255 255 / .08);
}
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar span:nth-child(2) { background: #febc2e; }
.term-bar span:nth-child(3) { background: #28c840; }
.term-bar em { margin-left: auto; font-style: normal; font-size: 11.5px; color: rgb(255 255 255 / .45); font-family: "JetBrains Mono", monospace; }
.term-body { padding: 18px 18px 22px; font-size: 13.5px; line-height: 1.75; color: #d7e3f4; min-height: 132px; }
.t-prompt { color: #4dd97a; font-weight: 600; }
.t-out { color: #8fb8ff; white-space: pre-wrap; }
.caret { color: var(--sky); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-shot {
  position: absolute; right: -14px; bottom: -58px; width: 74%;
  border-radius: 12px; border: 1px solid rgb(255 255 255 / .5);
  box-shadow: 0 22px 60px rgb(4 18 55 / .55);
  transform: rotate(-1.2deg);
}

/* ---------- ③ 数据条 ---------- */
.stats { background: var(--navy); color: #fff; padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; text-align: center; }
.stats-grid b { display: block; font-size: 27px; font-weight: 800; color: #7ec2ff; font-family: "Plus Jakarta Sans", sans-serif; }
.stats-grid span { font-size: 12.5px; color: rgb(255 255 255 / .65); }

/* ---------- 通用 section ---------- */
.section { padding: 78px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 42px; }
.sec-head h2 { font-size: clamp(25px, 3vw, 33px); font-weight: 800; letter-spacing: .01em; }
.sec-head p { margin-top: 10px; color: var(--fg-2); font-size: 15.5px; }
.sub-h { font-size: 19px; margin: 44px 0 16px; }
.hint { font-size: 13px; color: var(--fg-3); margin-top: 14px; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card h3 { font-size: 16.5px; margin: 14px 0 6px; font-weight: 700; }
.card p { color: var(--fg-2); font-size: 14px; }

/* ④ 四交互面 */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card-tag {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .1em;
  padding: 3px 10px; border-radius: 999px;
}
.tag-cli { background: #e3f2e9; color: #1a7f45; }
.tag-tui { background: #efe9ff; color: #6b4de6; }
.tag-gui { background: #e1f0ff; color: #0071E3; }
.tag-mcp { background: #ffe9ee; color: var(--seed-accent); }
@media (prefers-color-scheme: dark) {
  .tag-cli { background: rgb(52 199 89 / .16); color: #5cd97e; }
  .tag-tui { background: rgb(124 92 255 / .18); color: #a894ff; }
  .tag-gui { background: rgb(0 113 227 / .18); color: #5aa7ff; }
  .tag-mcp { background: rgb(255 55 95 / .16); color: #ff7d97; }
}
.mini-term, .mini-tui, .mini-code {
  margin-top: 14px; background: var(--term-bg); color: #cfe0f5;
  border-radius: 8px; padding: 12px 14px; font-size: 12px; line-height: 1.65;
  overflow-x: auto; min-height: 92px; white-space: pre-wrap;
}
.mini-term .t-out { color: #8fb8ff; }
.mini-tui { color: #9fd8b0; }
.mini-tui .t-accent { color: #6ea8ff; }
.card-shot { margin-top: 14px; border-radius: 8px; border: 1px solid var(--border); min-height: 92px; object-fit: cover; object-position: top; height: 108px; width: 100%; }

/* ⑤ 画廊 */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.gallery .span2 { grid-column: 1 / -1; }
.shot-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .25s, transform .25s;
}
.shot-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.shot-card img { width: 100%; border-bottom: 1px solid var(--border); }
.shot-card figcaption { padding: 14px 18px 16px; font-size: 14px; color: var(--fg-2); }
.shot-card figcaption b { color: var(--fg); }

/* ⑥ 三层记忆 */
.mem-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; align-items: center; }
.mem-svg { width: 100%; height: auto; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); }
.mem-notes { display: flex; flex-direction: column; gap: 14px; }
.mem-note { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.mem-note b { display: block; font-size: 15px; margin-bottom: 4px; color: var(--seed-primary); font-family: "Noto Serif SC", serif; }
.mem-note span { font-size: 13.5px; color: var(--fg-2); }
.mem-note code { background: var(--bg-2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }

/* ⑦ 境界链 */
.realm { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.realm-chip {
  font-weight: 700; font-size: 13.5px; padding: 8px 18px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--border-strong); color: var(--fg-2);
}
.realm-chip.gold { border-color: var(--gold); color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--card)); }
.realm-arrow { color: var(--fg-3); font-weight: 700; }
.realm-grid { margin-top: 6px; }
.shot-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; }
.shot-inline img { border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ⑧ 步骤 */
.steps { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin: 0 auto; }
.step {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; box-shadow: var(--shadow);
}
.step-n {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--seed-primary); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 15.5px;
}
.step h3 { font-size: 15.5px; margin-bottom: 8px; }
.code-row { display: flex; gap: 10px; align-items: center; background: var(--term-bg); border-radius: 8px; padding: 9px 14px; }
.code-row code { color: #d7e3f4; font-size: 13.5px; flex: 1; overflow-x: auto; }
.copy {
  border: none; background: rgb(255 255 255 / .1); color: #bcd2ee; cursor: pointer;
  font-size: 12px; padding: 4px 12px; border-radius: 6px; font-family: inherit; transition: background .15s;
}
.copy:hover { background: rgb(255 255 255 / .22); }
.copy.ok { background: #1a7f45; color: #fff; }

/* ⑨ 下载 */
.dl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dl-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.dl-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.dl-card .os { font-size: 13px; color: var(--seed-primary); font-weight: 800; letter-spacing: .06em; }
.dl-card .fname { font-size: 12px; color: var(--fg-3); word-break: break-all; min-height: 34px; font-family: "JetBrains Mono", monospace; }
.dl-card .size { font-size: 12.5px; color: var(--fg-2); }
.dl-card .btn { margin-top: 10px; }
.skel {
  height: 178px; border-radius: 14px;
  background: linear-gradient(90deg, var(--bg-2) 25%, var(--border) 50%, var(--bg-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: var(--bg-2); color: var(--fg-2); font-weight: 700; font-size: 13px; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: color-mix(in srgb, var(--seed-primary) 4%, transparent); }
td a { font-size: 13.5px; font-weight: 600; }
td .dash { color: var(--fg-3); }
.badge {
  display: inline-block; background: color-mix(in srgb, var(--seed-primary) 12%, transparent);
  color: var(--seed-primary); border-radius: 6px; font-size: 11px; font-weight: 700;
  padding: 2px 8px; margin-left: 8px;
}
.badge.gray { background: var(--bg-2); color: var(--fg-3); }
.muted { color: var(--fg-2); }

/* ⑩ footer */
footer { background: var(--navy); color: rgb(255 255 255 / .8); padding: 52px 0 40px; margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 30px; }
.foot-brand .brand { color: #fff; margin-bottom: 10px; }
.foot-brand p { font-size: 13.5px; color: rgb(255 255 255 / .6); }
.foot-brand .lic { margin-top: 10px; font-size: 12.5px; color: rgb(255 255 255 / .45); }
footer h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; letter-spacing: .04em; }
footer a { display: block; color: rgb(255 255 255 / .65); font-size: 13.5px; padding: 4px 0; }
footer a:hover { color: #fff; text-decoration: none; }
.foot-note { font-size: 12.5px; color: rgb(255 255 255 / .45); margin-top: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 70px; }
  .hero-shot { position: static; width: 100%; transform: none; margin-top: 18px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .mem-wrap { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav nav a:not(.btn) { display: none; }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .gallery, .dl-grid, .shot-inline { grid-template-columns: 1fr; }
  .gallery .span2 { grid-column: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero { padding: 60px 0 72px; }
}
