/* superpowers-zh 官网样式 —— 深色开发者风格 */
:root {
  --bg: #0a0b10;
  --bg-soft: #12141c;
  --bg-card: #161924;
  --border: #242838;
  --border-soft: #1c2030;
  --text: #e7e9f0;
  --text-dim: #9aa0b4;
  --text-faint: #6b7186;
  --accent: #7c6cff;
  --accent-2: #4dd6c8;
  --accent-grad: linear-gradient(110deg, #7c6cff 0%, #4dd6c8 100%);
  --good: #3ddc84;
  --bad: #ff6b6b;
  --radius: 14px;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

code, pre, .cmd-hero code, .cmd-out code {
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;
}

a { color: inherit; text-decoration: none; }

/* 背景光晕 */
body::before {
  content: "";
  position: fixed;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(124,108,255,0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto;
  padding: 16px 24px;
  backdrop-filter: blur(12px);
}
.nav::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(10,11,16,0.6);
  border-bottom: 1px solid var(--border-soft);
  z-index: -1;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 600; }
.brand b { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav nav { display: flex; gap: 24px; font-size: 14px; }
.nav nav a { color: var(--text-dim); transition: color .2s; }
.nav nav a:hover { color: var(--text); }

main { position: relative; z-index: 1; }
section { max-width: var(--maxw); margin: 0 auto; padding: 80px 24px; }

.section-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.section-sub { text-align: center; color: var(--text-dim); margin-bottom: 36px; font-size: 15px; }
.section-sub code { background: var(--bg-soft); padding: 2px 7px; border-radius: 6px; color: var(--accent-2); font-size: 13px; }

/* ---------- HERO ---------- */
.hero { text-align: center; padding-top: 70px; padding-bottom: 60px; }
.badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-dim);
  background: var(--bg-soft);
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--text-dim); font-size: clamp(15px, 2.2vw, 18px); max-width: 640px; margin: 0 auto 36px; }

.cmd-hero, .cmd-out {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 460px; margin: 0 auto;
  background: #06070b;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 14px 20px;
}
.cmd-hero code { font-size: 16px; color: var(--accent-2); }
.copy-btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.copy-btn.done { color: var(--good); border-color: var(--good); }

.hero-cta { display: flex; gap: 14px; justify-content: center; margin: 32px 0 50px; flex-wrap: wrap; }
.btn {
  padding: 12px 26px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .2s; border: 1px solid transparent; display: inline-block;
}
.btn-primary { background: var(--accent-grad); color: #0a0b10; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--bg-soft); }
.btn-ghost:hover { border-color: var(--accent); }

.stats {
  display: flex; gap: 40px; justify-content: center; flex-wrap: wrap;
  padding-top: 20px;
}
.stats div { display: flex; flex-direction: column; align-items: center; }
.stats b { font-size: 30px; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { font-size: 13px; color: var(--text-faint); margin-top: 2px; }

/* ---------- 效果对比 ---------- */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare-col { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-card); }
.compare-col.bad { border-color: rgba(255,107,107,0.3); }
.compare-col.good { border-color: rgba(61,220,132,0.3); }
.compare-label { padding: 12px 18px; font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--border-soft); }
.compare-col.bad .compare-label { color: var(--bad); background: rgba(255,107,107,0.06); }
.compare-col.good .compare-label { color: var(--good); background: rgba(61,220,132,0.06); }
.compare-col pre {
  padding: 18px; font-size: 13px; line-height: 1.75; color: var(--text-dim);
  white-space: pre-wrap; word-break: break-word;
}

/* ---------- 安装命令生成器 ---------- */
.install-box {
  max-width: 560px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.install-box label { display: block; font-size: 14px; color: var(--text-dim); margin-bottom: 8px; }
#toolSel {
  width: 100%; padding: 12px 14px; margin-bottom: 18px;
  background: #06070b; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 15px; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa0b4' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.cmd-out { max-width: 100%; }
.cmd-out code { font-size: 15px; color: var(--accent-2); overflow-x: auto; }
.install-note { margin-top: 14px; font-size: 13px; color: var(--text-faint); line-height: 1.6; }

/* ---------- Skills ---------- */
.skill-controls { display: flex; flex-direction: column; gap: 16px; align-items: center; margin-bottom: 32px; }
#search {
  width: 100%; max-width: 460px; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 15px;
}
#search:focus { outline: none; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  padding: 7px 15px; border-radius: 100px; font-size: 13px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim);
  transition: all .2s;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #0a0b10; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: all .2s; position: relative;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.card-head h3 { font-size: 17px; font-weight: 700; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.tag-cn { background: rgba(255,107,107,0.12); color: #ff8a8a; border: 1px solid rgba(255,107,107,0.25); }
.card-id { display: inline-block; font-size: 12px; color: var(--text-faint); margin-bottom: 12px; }
.card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.65; }
.empty { text-align: center; color: var(--text-faint); padding: 40px; }

/* ---------- 工具墙 ---------- */
.tool-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.tool-pill {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 10px;
}
.tool-name { font-weight: 600; font-size: 14px; }
.tool-type { font-size: 11px; color: var(--text-faint); border: 1px solid var(--border); padding: 1px 7px; border-radius: 5px; }

/* ---------- 书 / 赞助 ---------- */
.book-inner {
  background: linear-gradient(135deg, rgba(124,108,255,0.12), rgba(77,214,200,0.08));
  border: 1px solid var(--border); border-radius: 18px; padding: 44px;
  text-align: center;
}
.book-inner h2 { font-size: 26px; margin-bottom: 12px; }
.book-inner p { color: var(--text-dim); margin-bottom: 24px; max-width: 560px; margin-left: auto; margin-right: auto; }

.sponsor-card {
  display: flex; align-items: center; gap: 24px; max-width: 620px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color .2s;
}
.sponsor-card:hover { border-color: var(--accent); }
.sponsor-card img { border-radius: 10px; flex-shrink: 0; }
.sponsor-card b { display: block; font-size: 17px; margin-bottom: 6px; }
.sponsor-card span { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }
.sponsor-cta { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-faint); }
.sponsor-cta b { color: var(--accent-2); }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--border-soft); margin-top: 40px; padding: 40px 24px; }
.foot-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
}
.foot-inner strong { display: block; }
.foot-inner span { font-size: 13px; color: var(--text-faint); }
.foot-inner nav { display: flex; gap: 22px; font-size: 14px; }
.foot-inner nav a { color: var(--text-dim); transition: color .2s; }
.foot-inner nav a:hover { color: var(--accent-2); }
.copyright { max-width: var(--maxw); margin: 24px auto 0; font-size: 12.5px; color: var(--text-faint); text-align: center; }
.copyright a { color: var(--text-dim); }
/* 扫码关注 */
.foot-qr { max-width: var(--maxw); margin: 0 auto 36px; text-align: center; }
.qr-title { font-size: 14px; color: var(--text-dim); font-weight: 600; margin-bottom: 18px; }
.qr-row { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.qr-card { margin: 0; }
.qr-card img { width: 158px; height: auto; border-radius: 12px; background: #fff; display: block; border: 1px solid var(--border-soft); }
.qr-card figcaption { margin-top: 10px; font-size: 12.5px; color: var(--text-faint); }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  section { padding: 56px 18px; }
  .nav nav { gap: 16px; font-size: 13px; }
  .nav nav a:nth-child(1), .nav nav a:nth-child(2) { display: none; }
  .compare-grid { grid-template-columns: 1fr; }
  .stats { gap: 28px; }
  .sponsor-card { flex-direction: column; text-align: center; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
}

/* ========== 扩充板块 ========== */

/* 为什么选择 — 卖点网格 */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.feat {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: all .2s;
}
.feat:hover { border-color: var(--accent); transform: translateY(-2px); }
.feat-icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; border-radius: 12px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(124,108,255,0.18), rgba(77,214,200,0.12));
}
.feat h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.feat p { font-size: 14px; color: var(--text-dim); line-height: 1.7; }

/* 工作流可视化 */
.pl-track {
  display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.pl-step {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; flex: 1 1 220px; max-width: 250px; transition: border-color .2s;
}
.pl-step:hover { border-color: var(--accent); }
.pl-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-grad); color: #0a0b10; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.pl-body { display: flex; flex-direction: column; gap: 3px; }
.pl-body b { font-size: 15px; }
.pl-body code { font-size: 11px; color: var(--text-faint); }
.pl-body span { font-size: 12.5px; color: var(--text-dim); }
.pl-arrow { display: flex; align-items: center; color: var(--accent); font-size: 20px; font-weight: 700; }

/* 使用场景 */
.uc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.usecase {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color .2s;
}
.usecase:hover { border-color: var(--accent); }
.uc-tag {
  display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 12px;
  border-radius: 8px; margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(124,108,255,0.2), rgba(77,214,200,0.15)); color: var(--text);
}
.uc-skills { display: block; font-size: 12.5px; color: var(--accent-2); margin-bottom: 10px; }
.usecase p { font-size: 14px; color: var(--text-dim); line-height: 1.7; }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 0 22px; transition: border-color .2s;
}
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  cursor: pointer; padding: 18px 0; font-size: 16px; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 22px; font-weight: 400; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 0 20px; font-size: 14.5px; color: var(--text-dim); line-height: 1.75; }

/* 收尾 CTA */
.cta-inner {
  background: linear-gradient(135deg, rgba(124,108,255,0.16), rgba(77,214,200,0.10));
  border: 1px solid var(--border); border-radius: 20px; padding: 56px 32px; text-align: center;
}
.cta-inner h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin-bottom: 12px; }
.cta-inner > p { color: var(--text-dim); margin-bottom: 28px; font-size: 16px; }
.cta-cmd {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 auto 28px;
  background: #06070b; border: 1px solid var(--border); border-radius: 12px; padding: 12px 12px 12px 20px;
}
.cta-cmd code { font-size: 16px; color: var(--accent-2); }
.cta .hero-cta { margin: 0; }

@media (max-width: 720px) {
  .pl-arrow { display: none; }
  .pl-step { max-width: none; }
}

/* ========== 浅色主题 ========== */
html[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-soft: #eef0f7;
  --bg-card: #ffffff;
  --border: #e2e5ee;
  --border-soft: #eaecf3;
  --text: #1a1d2b;
  --text-dim: #545a70;
  --text-faint: #8b91a6;
}
html[data-theme="light"] body::before { background: radial-gradient(circle, rgba(124,108,255,0.10), transparent 60%); }
html[data-theme="light"] .nav::after { background: rgba(247,248,252,0.7); }
html[data-theme="light"] .cmd-hero, html[data-theme="light"] .cmd-out,
html[data-theme="light"] #toolSel, html[data-theme="light"] .cta-cmd,
html[data-theme="light"] .doc-body pre, html[data-theme="light"] .doc-body code { background: #f0f2f8; }
html[data-theme="light"] .btn-primary, html[data-theme="light"] .pl-num { color: #fff; }
html[data-theme="light"] .chip.active { color: #fff; }

/* ========== 导航：语言 / 主题按钮 ========== */
.lang-switch { font-weight: 600; border: 1px solid var(--border); padding: 3px 10px; border-radius: 7px; }
.lang-switch:hover { border-color: var(--accent); }
.theme-btn {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim);
  width: 30px; height: 28px; border-radius: 7px; cursor: pointer; font-size: 15px; line-height: 1;
}
.theme-btn:hover { color: var(--text); border-color: var(--accent); }

/* 卡片改为链接 */
a.card { display: block; color: inherit; }
.card-more { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--accent-2); font-weight: 600; }
a.card:hover .card-more { color: var(--accent); }

/* ========== 三列页脚 ========== */
.foot-cols { align-items: flex-start; }
.foot-brand strong { display: block; font-size: 16px; }
.foot-brand strong b { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.foot-brand span { font-size: 13px; color: var(--text-faint); display: block; margin-top: 4px; max-width: 240px; }
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-col h4 { font-size: 13px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.foot-col a { font-size: 14px; color: var(--text-dim); transition: color .2s; }
.foot-col a:hover { color: var(--accent-2); }

/* ========== Skill 详情(操作文档)页 ========== */
.doc { max-width: 820px; margin: 0 auto; padding: 36px 24px 0; }
.doc-back { display: inline-block; font-size: 14px; color: var(--text-dim); margin: 8px 0 24px; transition: color .2s; }
.doc-back:hover { color: var(--accent-2); }
.doc-head { border-bottom: 1px solid var(--border-soft); padding-bottom: 28px; margin-bottom: 8px; }
.doc-titles { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.doc-titles h1 { font-size: clamp(26px, 5vw, 38px); font-weight: 800; letter-spacing: -0.02em; }
.doc-titles code { font-size: 13px; color: var(--text-faint); background: var(--bg-soft); padding: 3px 9px; border-radius: 6px; }
.doc-lead { color: var(--text-dim); font-size: 16px; margin-top: 14px; line-height: 1.7; }
.doc-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; align-items: center; }
.doc-cmd { margin: 0; max-width: 320px; }
.doc-notice {
  background: rgba(124,108,255,0.1); border: 1px solid rgba(124,108,255,0.25);
  border-radius: 10px; padding: 12px 16px; font-size: 14px; color: var(--text-dim); margin: 24px 0;
}

/* Markdown 正文排版 */
.doc-body { font-size: 15.5px; line-height: 1.8; color: var(--text); }
.doc-body h1, .doc-body h2, .doc-body h3, .doc-body h4 { font-weight: 700; line-height: 1.35; margin: 1.8em 0 .7em; letter-spacing: -0.01em; }
.doc-body h1 { font-size: 26px; } .doc-body h2 { font-size: 22px; padding-bottom: .3em; border-bottom: 1px solid var(--border-soft); }
.doc-body h3 { font-size: 18px; } .doc-body h4 { font-size: 16px; color: var(--text-dim); }
.doc-body p { margin: .9em 0; }
.doc-body a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.doc-body ul, .doc-body ol { margin: .8em 0; padding-left: 1.5em; }
.doc-body li { margin: .35em 0; }
.doc-body li > ul, .doc-body li > ol { margin: .3em 0; }
.doc-body code { background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; font-size: 13.5px; color: var(--accent-2); }
.doc-body pre {
  background: #06070b; border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; overflow-x: auto; margin: 1.1em 0; position: relative;
}
.doc-body pre code { background: none; padding: 0; color: #cdd3e6; font-size: 13.5px; line-height: 1.7; }
.doc-body pre[data-lang]:not([data-lang=""])::before {
  content: attr(data-lang); position: absolute; top: 8px; right: 12px;
  font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em;
}
.doc-body blockquote {
  border-left: 3px solid var(--accent); background: var(--bg-soft);
  padding: 10px 16px; margin: 1.1em 0; border-radius: 0 8px 8px 0; color: var(--text-dim);
}
.doc-body hr { border: none; border-top: 1px solid var(--border-soft); margin: 2em 0; }
.md-table { overflow-x: auto; margin: 1.2em 0; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc-body th, .doc-body td { border: 1px solid var(--border); padding: 9px 13px; text-align: left; }
.doc-body th { background: var(--bg-soft); font-weight: 600; }

@media (max-width: 720px) {
  .nav nav { gap: 12px; }
  .nav nav a:nth-child(1), .nav nav a:nth-child(2), .nav nav a:nth-child(3) { display: none; }
  .foot-cols { flex-direction: row; flex-wrap: wrap; gap: 32px; }
}
