/* ==========================================================================
   玖源社UPK编辑工具 · 官网样式
   深色工具风：深底 + 琥珀金主色 + 蓝色辅色
   ========================================================================== */

:root {
  --bg: #0a0e14;
  --bg-soft: #0f141d;
  --panel: #131a25;
  --panel-2: #182131;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eef8;
  --text-dim: #9aa8bd;
  --text-mute: #6b7889;
  --gold: #ffb02e;
  --gold-soft: rgba(255, 176, 46, 0.12);
  --blue: #4ea8ff;
  --blue-soft: rgba(78, 168, 255, 0.12);
  --green: #3ddc97;
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1160px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(720px 420px at 12% -8%, rgba(255, 176, 46, 0.10), transparent 62%),
    radial-gradient(760px 460px at 88% 4%, rgba(78, 168, 255, 0.10), transparent 64%);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0; }

code, kbd, .mono { font-family: var(--mono); font-size: 0.92em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 22px;
  position: relative;
  z-index: 1;
}

/* ============================ 顶部导航 ============================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 20, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #ffc65c, #ef8f1c);
  color: #241503;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 6px 16px rgba(255, 176, 46, 0.28);
}

.brand-sub {
  color: var(--text-mute);
  font-weight: 500;
  font-size: 12px;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.16s, background 0.16s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.nav-links a.is-active { color: var(--gold); background: var(--gold-soft); }

.nav-cta {
  margin-left: 8px;
  padding: 9px 16px !important;
  border-radius: 9px;
  background: linear-gradient(140deg, #ffc65c, #f0a021);
  color: #241503 !important;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(255, 176, 46, 0.24);
}
.nav-cta:hover { filter: brightness(1.05); background: linear-gradient(140deg, #ffc65c, #f0a021) !important; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

/* ============================ 通用区块 ============================ */
section { padding: 74px 0; position: relative; }
section.tight { padding: 54px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.sec-title { font-size: clamp(24px, 3.4vw, 34px); }
.sec-desc { color: var(--text-dim); margin-top: 12px; max-width: 680px; font-size: 15px; }

.sec-head { margin-bottom: 38px; }

/* ============================ Hero ============================ */
.hero {
  padding: 66px 0 58px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 1.18fr;
  gap: 46px;
  align-items: center;
}

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
.badge b { color: var(--text); font-weight: 600; }
.badge.gold { border-color: rgba(255, 176, 46, 0.35); background: var(--gold-soft); color: #ffcf85; }
.badge.blue { border-color: rgba(78, 168, 255, 0.32); background: var(--blue-soft); color: #a8d4ff; }

.hero h1 {
  font-size: clamp(30px, 4.6vw, 48px);
  letter-spacing: -0.02em;
}
.hero h1 .hl {
  background: linear-gradient(100deg, #ffd48a, #ff9f1a 62%, #ff7a3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 16px;
  max-width: 560px;
}

.hero-lead strong { color: var(--text); font-weight: 600; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.14s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(140deg, #ffc65c, #f0a021);
  color: #241503;
  box-shadow: 0 12px 30px rgba(255, 176, 46, 0.26);
}
.btn-primary:hover { box-shadow: 0 16px 36px rgba(255, 176, 46, 0.34); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); }

.btn svg { width: 17px; height: 17px; }

.hero-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 13px;
  color: var(--text-mute);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* 应用截图窗口 */
.shot-frame {
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.shot-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  border-radius: 14px;
}

.shot-bar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.shot-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a4453;
  display: block;
}
.shot-bar i:nth-child(1) { background: #ff5f57; }
.shot-bar i:nth-child(2) { background: #febc2e; }
.shot-bar i:nth-child(3) { background: #28c840; }
.shot-bar .shot-title {
  margin-left: 8px;
  font-size: 11.5px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shot-frame img { width: 100%; height: auto; }

.shot-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-mute);
  text-align: right;
}

/* ============================ 卡片网格 ============================ */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.008));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 22px;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}
.card:hover {
  border-color: rgba(255, 176, 46, 0.32);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255, 176, 46, 0.05), rgba(255, 255, 255, 0.012));
}

.card-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold);
  margin-bottom: 14px;
}
.card-ico svg { width: 20px; height: 20px; }
.card-ico.blue { background: var(--blue-soft); color: var(--blue); }

.card h3 { font-size: 15.5px; margin-bottom: 7px; }
.card p { color: var(--text-dim); font-size: 13.8px; line-height: 1.65; }

/* ============================ 工作流步骤 ============================ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: rgba(255, 176, 46, 0.22);
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}
.step h4 { font-size: 15px; margin-bottom: 7px; }
.step p { color: var(--text-dim); font-size: 13.5px; }

/* ============================ 下载 ============================ */
.dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.dl-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dl-card.recommended { border-color: rgba(255, 176, 46, 0.4); box-shadow: 0 0 0 1px rgba(255, 176, 46, 0.12); }

.dl-head { display: flex; align-items: flex-start; gap: 12px; }
.dl-head .dl-ico {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold); flex: 0 0 auto;
}
.dl-head .dl-ico.blue { background: var(--blue-soft); color: var(--blue); }
.dl-title { font-size: 16px; font-weight: 700; }
.dl-sub { font-size: 12.6px; color: var(--text-mute); margin-top: 3px; }

.dl-file {
  font-family: var(--mono);
  font-size: 12.3px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  word-break: break-all;
}

.dl-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.6px; color: var(--text-mute); }
.dl-card .btn { justify-content: center; }

.req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.6px;
  margin-top: 8px;
}
.req-table th, .req-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.req-table th { color: var(--text-mute); font-weight: 600; width: 128px; white-space: nowrap; }
.req-table td { color: var(--text-dim); }
.req-table tr:last-child th, .req-table tr:last-child td { border-bottom: none; }

/* ============================ 提示块 ============================ */
.note {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  padding: 16px 18px;
  color: var(--text-dim);
  font-size: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.note .note-ico { color: var(--blue); flex: 0 0 auto; margin-top: 2px; }
.note strong { color: var(--text); }
.note.gold { border-color: rgba(255, 176, 46, 0.3); background: rgba(255, 176, 46, 0.06); }
.note.gold .note-ico { color: var(--gold); }
.note.warn { border-color: rgba(255, 122, 61, 0.32); background: rgba(255, 122, 61, 0.07); }
.note.warn .note-ico { color: #ff8a5c; }
.note a { color: inherit; text-decoration: underline; }

/* ============================ FAQ 折叠 ============================ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }

details.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}
details.faq[open] { border-color: rgba(255, 176, 46, 0.28); background: rgba(255, 176, 46, 0.045); }

details.faq > summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  font-weight: 600;
  font-size: 14.6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--text-mute);
  font-family: var(--mono);
  font-size: 17px;
  transition: transform 0.18s, color 0.18s;
}
details.faq[open] > summary::after { content: "−"; color: var(--gold); }

.faq-body {
  padding: 0 18px 16px 18px;
  color: var(--text-dim);
  font-size: 14px;
}
.faq-body p + p { margin-top: 8px; }
.faq-body ul, .faq-body ol { margin: 8px 0 0; padding-left: 20px; }
.faq-body li { margin-bottom: 5px; }

/* ============================ 文档/教程正文 ============================ */
.doc {
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 40px;
  align-items: start;
  padding: 40px 0 70px;
}

.toc {
  position: sticky;
  top: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
  padding: 16px 14px;
}
.toc h4 { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-mute); margin-bottom: 10px; }
.toc a {
  display: block;
  color: var(--text-dim);
  font-size: 13.4px;
  padding: 6px 9px;
  border-radius: 7px;
  border-left: 2px solid transparent;
}
.toc a:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); text-decoration: none; }
.toc a.sub { padding-left: 20px; font-size: 12.8px; color: var(--text-mute); }

.doc-body h2 {
  font-size: 23px;
  margin: 42px 0 14px;
  padding-top: 8px;
  scroll-margin-top: 84px;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-size: 16.5px; margin: 26px 0 10px; color: #fff; scroll-margin-top: 84px; }
.doc-body p { color: var(--text-dim); font-size: 14.6px; margin: 10px 0; }
.doc-body ul, .doc-body ol { color: var(--text-dim); font-size: 14.6px; padding-left: 22px; margin: 10px 0; }
.doc-body li { margin-bottom: 6px; }
.doc-body strong { color: var(--text); }
.doc-body code {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  color: #ffd08a;
}
.doc-body pre {
  background: #060a10;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
  color: #cfe0f5;
  margin: 14px 0;
}
.doc-body pre code { background: none; border: none; padding: 0; color: inherit; }

.kbd {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.8px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
table.tbl th, table.tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.tbl thead th {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
table.tbl td { color: var(--text-dim); }
table.tbl code { font-size: 12.6px; }
table.tbl tr:last-child td { border-bottom: none; }

/* ============================ 更新日志 ============================ */
.log {
  position: relative;
  padding-left: 26px;
}
.log::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 176, 46, 0.5), rgba(255, 255, 255, 0.06));
}
.log-item { position: relative; padding-bottom: 34px; }
.log-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--gold);
}
.log-item .log-ver {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.log-ver .ver {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold);
}
.log-ver .date { font-size: 12.6px; color: var(--text-mute); }
.log-ver .tag {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(78, 168, 255, 0.3);
  background: var(--blue-soft);
  color: #a8d4ff;
}
.log-ver .tag.new { border-color: rgba(61, 220, 151, 0.3); background: rgba(61, 220, 151, 0.1); color: #8ff0c2; }

.log-item ul { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 14px; }
.log-item li { margin-bottom: 5px; }

/* ============================ 页脚 ============================ */
.footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  padding: 46px 0 30px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 30px;
}
.footer h5 {
  font-size: 12.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 12px;
}
.footer a { color: var(--text-dim); font-size: 13.6px; display: block; padding: 4px 0; }
.footer a:hover { color: var(--gold); text-decoration: none; }
.footer-brand p { color: var(--text-mute); font-size: 13.2px; margin-top: 12px; max-width: 300px; }

.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 12.6px;
  color: var(--text-mute);
}
.footer-bottom .spacer { margin-left: auto; }

/* ============================ 其他 ============================ */
.anchor-offset { scroll-margin-top: 84px; }

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(19, 26, 37, 0.9);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
  z-index: 40;
  backdrop-filter: blur(8px);
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { color: var(--gold); border-color: rgba(255, 176, 46, 0.4); }

/* 淡入 */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s, transform 0.5s; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================ 响应式 ============================ */
@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards.three { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
  .toc h4 { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  section { padding: 54px 0; }
  .nav-inner { height: 56px; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 14px 16px;
    background: rgba(10, 14, 20, 0.98);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; }
  .nav-cta { margin-left: 0; text-align: center; }
  .nav-toggle { display: block; }
  .brand-sub { display: none; }
  .cards, .cards.three, .cards.two { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 34px; }
  .hero-meta { font-size: 12.4px; gap: 6px 16px; }
  .doc-body h2 { font-size: 20px; }
  .toc { grid-template-columns: 1fr; }
}
