/*
 * pocketdown.com —— 渐变光感（深色专用）
 *
 * ⚠️ 这一版**不跟随系统的浅色偏好**。光晕、毛玻璃、渐变文字这套语言只在深色底上
 * 成立；硬做一个浅色版本会得到一个又灰又平、光晕看不见的半成品。深色专用是这类
 * 站点的常规做法，也是唯一能把这个方向做对的做法。
 * 扩展自己仍然跟随系统配色 —— 那是产品界面，规则不同。
 *
 * 品牌渐变（青 → 蓝 → 紫）和扩展 logo 用的是同一组色值，改一边要改两边。
 */
:root {
  color-scheme: dark;

  --cy: #00e5ff;
  --bl: #3a7bff;
  --pu: #a14dff;
  --brand: linear-gradient(110deg, var(--cy), var(--bl) 48%, var(--pu));

  --bg: #08090f;
  --bg-soft: #0d0f18;
  /* 卡片是半透明的 —— 底下的光晕要能透上来，这是整套视觉的关键 */
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hi: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.16);

  --text: #edeff7;
  --muted: #98a0b8;
  --accent: #8b93ff;
  --on-accent: #0b0d14;
  --success: #46e0a8;

  --radius: 16px;
  --radius-sm: 10px;
  --font: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/* ---- 极光背景 -------------------------------------------------------------
 * 三团半径很大的径向渐变叠在一起，固定不动。用 fixed 而不是跟着滚动：光源应该
 * 像房间里的灯，内容从它前面流过。
 */
body::before {
  content: '';
  position: fixed;
  inset: -30vh -20vw auto;
  height: 120vh;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 46% at 18% 12%, rgba(0, 229, 255, 0.20), transparent 70%),
    radial-gradient(42% 50% at 76% 6%,  rgba(161, 77, 255, 0.20), transparent 70%),
    radial-gradient(46% 42% at 48% 34%, rgba(58, 123, 255, 0.16), transparent 72%);
  filter: blur(30px);
}

/* 细网格，几乎看不见 —— 作用是给大片深色一点结构感，不让它塌成一块黑 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 55% at 50% 0%, #000 30%, transparent 85%);
}

/* 光标跟随的微光。JS 只更新两个 CSS 变量，不碰布局 —— 不会触发重排。 */
#cursorGlow {
  position: fixed;
  left: 0; top: 0;
  width: 460px; height: 460px;
  margin: -230px 0 0 -230px;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s;
  background: radial-gradient(circle, rgba(123, 131, 255, 0.13), transparent 62%);
  transform: translate3d(var(--mx, 50vw), var(--my, 30vh), 0);
}
#cursorGlow.on { opacity: 1; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }

a { color: var(--accent); text-decoration-color: rgba(139, 147, 255, 0.35); }
a:hover { text-decoration-color: currentColor; }

/* ---- 导航 ---------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 9, 15, 0.6);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 22px;
  height: 64px; max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand span { font-weight: 700; font-size: 16px; letter-spacing: -0.015em; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
/* flex 默认允许收缩到内容宽度以下 —— 不锁住的话窄屏上 "Add to browser" 会断成两行 */
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; flex: 0 0 auto; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
/* `.nav-links a` 的特异性高于 `.btn-primary`，不重新声明按钮文字会变成灰的 */
.nav-links a.btn { color: var(--text); font-size: 13.5px; padding: 8px 16px; }
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover { color: var(--on-accent); }

/* ---- 按钮 ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--border-hi); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 14.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .18s, border-color .18s, transform .18s, filter .18s;
}
/* 只给**次级**按钮换底色。写成 `.btn:hover` 会连主按钮一起改：它的特异性
   (0,2,0) 高过 `.btn-primary` (0,1,0)，而 `background` 简写又会把
   background-image 一并清成 none —— 主按钮的渐变会在 hover 时消失，
   只剩深色文字压在深色底上，等于按钮瞬间看不见。 */
.btn:not(.btn-primary):hover {
  background: var(--surface-hi);
  border-color: rgba(255, 255, 255, 0.28);
}
.btn:hover { transform: translateY(-1px); }

/* 主按钮用品牌渐变。加一层内高光，免得纯渐变看起来是贴上去的色块。 */
.btn-primary {
  position: relative;
  border: none;
  color: var(--on-accent);
  background: var(--brand);
  box-shadow: 0 6px 26px -8px rgba(90, 120, 255, 0.75);
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 55%);
  pointer-events: none;
}
/* hover 时渐变要**留着**并稍微提亮，文字才始终是深色压在亮底上。
   background 在这里重申一遍是刻意的：万一将来又有人写 `.btn:hover { background }`，
   这一行会把它挡住。 */
.btn-primary:hover {
  color: var(--on-accent);
  background: var(--brand);
  filter: brightness(1.1) saturate(1.06);
  box-shadow: 0 10px 34px -8px rgba(90, 120, 255, 0.9);
}
.btn-lg { padding: 15px 30px; font-size: 15.5px; }

/* ---- 排版 ---------------------------------------------------------------- */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }

h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 20px;
  font-weight: 700;
}
h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.15; letter-spacing: -0.028em; margin: 0 0 14px;
}
h3 { font-size: 17px; margin: 0 0 8px; letter-spacing: -0.012em; }
.lead { font-size: 18.5px; color: var(--muted); margin: 0 0 30px; }

/* 渐变填充文字。⚠️ 只用在大号粗体上 —— 小字用渐变填充会让笔画变淡，读起来吃力。 */
.grad {
  background: var(--brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 22px;
  backdrop-filter: blur(8px);
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
}

.hero { text-align: center; padding: 116px 0 88px; }
.hero .lead { max-width: 640px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 24px; font-size: 13.5px; color: var(--muted); }

/* ---- 卡片 ---------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(14px);
  transition: border-color .2s, background .2s, transform .2s;
}
/* 顶部一道极淡的高光，模拟玻璃边缘受光 */
.card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
}
.card:hover { border-color: var(--border-hi); background: var(--surface-hi); }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feat-icon {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(140deg, rgba(0,229,255,.16), rgba(161,77,255,.16));
  border: 1px solid var(--border);
  color: #cfd6ff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 15px;
}
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---- 隐私对照 ------------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split .card { overflow: hidden; }
/* 左右两张卡用不同色的顶光区分「完全本地」和「计量」 */
.split .card.local::before { background: linear-gradient(90deg, transparent, var(--success), transparent); }
.split .card.metered::before { background: linear-gradient(90deg, transparent, var(--cy), transparent); }
.split h3 { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.tag {
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(139, 147, 255, .14); color: #b9bfff;
  border: 1px solid rgba(139, 147, 255, .22);
}
.tag.ok { background: rgba(70, 224, 168, .12); color: var(--success); border-color: rgba(70, 224, 168, .25); }

.callout {
  position: relative;
  border-radius: var(--radius);
  padding: 20px 24px; margin: 22px 0;
  background: linear-gradient(120deg, rgba(0,229,255,.07), rgba(161,77,255,.07));
  border: 1px solid var(--border);
}
.callout p { margin: 0; font-size: 14.5px; color: var(--text); }

/* ---- 定价 ---------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { padding: 30px 26px; display: flex; flex-direction: column; }

/* 推荐档：渐变描边。用 mask 抠出 1px 边，纯 border 做不出渐变。 */
.plan.featured { background: var(--surface-hi); }
.plan.featured::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.plan-tag {
  position: absolute; top: -12px; left: 26px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  padding: 4px 13px; border-radius: 999px;
  background: var(--brand); color: var(--on-accent);
  box-shadow: 0 4px 18px -4px rgba(90,120,255,.8);
}
.plan-name { font-size: 14px; font-weight: 700; margin-bottom: 8px; letter-spacing: .01em; }
.price { font-size: 46px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; }
.price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-alt { font-size: 13.5px; color: var(--muted); margin-top: 7px; }
.save { color: var(--success); font-weight: 700; white-space: nowrap; }
.plan ul { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 11px; }
.plan li { font-size: 14.5px; padding-left: 26px; position: relative; color: var(--text); }
.plan li::before {
  content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700;
}
/* margin-top:auto 而不是给 ul 加 flex:1 —— 后者会把 ul 这个 grid 的行距一起撑开 */
.plan .btn { width: 100%; margin-top: auto; }
.plans-note { margin: 26px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }

/* ---- FAQ / 法律文档 ------------------------------------------------------- */
details.faq { border-bottom: 1px solid var(--border); padding: 18px 2px; }
details.faq summary {
  cursor: pointer; font-weight: 600; font-size: 15.5px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
  transition: color .15s;
}
details.faq summary:hover { color: var(--accent); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 21px; line-height: 1; }
details.faq[open] summary::after { content: '−'; }
details.faq p { color: var(--muted); font-size: 14.5px; margin: 12px 0 2px; }

/* 法律页面：可读性优先，装饰收到最低 */
.doc h2 { margin-top: 44px; font-size: 24px; }
.doc h3 { margin-top: 26px; font-size: 16.5px; }
.doc p, .doc li { color: #d3d8e8; font-size: 15.5px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { font-weight: 600; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.doc code {
  font-family: var(--mono); font-size: 13px;
  background: rgba(139,147,255,.12); color: #c3c9ff;
  padding: 2px 6px; border-radius: 5px;
}
.updated { color: var(--muted); font-size: 14px; margin-top: -8px; }

/* ---- 页脚 ---------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0; margin-top: 40px;
  color: var(--muted); font-size: 13.5px;
}
.foot-inner { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.foot-inner nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ---- 状态页 --------------------------------------------------------------- */
.status { text-align: center; padding: 110px 0; }
.status-mark {
  width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 26px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, rgba(70,224,168,.18), rgba(0,229,255,.14));
  border: 1px solid rgba(70,224,168,.3);
  color: var(--success);
}
.status-mark.wait {
  background: linear-gradient(140deg, rgba(0,229,255,.16), rgba(161,77,255,.16));
  border-color: var(--border-hi); color: #b9bfff;
}
.steps { text-align: left; max-width: 440px; margin: 30px auto 0; display: grid; gap: 13px; }
.step { display: flex; gap: 13px; align-items: flex-start; font-size: 14.5px; }
.step b {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--accent);
  font-size: 12px; display: flex; align-items: center; justify-content: center;
}

/* ---- 滚动渐现 ------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* 作者样式里的 display 会覆盖 UA 的 [hidden]{display:none} —— 比如 .btn 是
   inline-flex，带 hidden 的按钮照样会显示。扩展的 theme.css 早有这一条，网站补上。 */
[hidden] {
  display: none !important;
}

/* 用户要求减少动效时，一切动画和光标光晕都关掉 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
  #cursorGlow { display: none; }
}

@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; max-width: 430px; margin: 0 auto; }
  .plan-tag { left: 50%; transform: translateX(-50%); }
}

@media (max-width: 860px) {
  .grid-3, .grid-2, .split { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .hero { padding: 76px 0 56px; }
  .nav-links { gap: 16px; }
  .nav-links .hide-sm { display: none; }
  #cursorGlow { display: none; }   /* 触屏上没有光标可跟 */
}

/* 手机：导航一行放不下 品牌 + Pricing + 按钮，把每一项都收一点 */
@media (max-width: 520px) {
  .nav-inner { gap: 12px; padding: 0 16px; height: 58px; }
  .brand span { font-size: 15px; }
  .brand img { width: 26px; height: 26px; }
  .nav-links { gap: 14px; }
  .nav-links a.btn { padding: 8px 13px; font-size: 13px; }
  .wrap { padding: 0 16px; }
}

/* 极窄屏（320px 一类）连 品牌 + Pricing + 按钮 都放不下，只留品牌和主按钮。
   Pricing 在页脚还有一个入口，不会丢。 */
@media (max-width: 370px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ---- 教程与事实表 --------------------------------------------------------- */
.crumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 48px 0 18px; font-size: 13px; color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); }

.guide h1 { font-size: clamp(30px, 4.4vw, 42px); margin-bottom: 14px; }
.guide .answer p { font-size: 16px; line-height: 1.7; }

/* 步骤：大号序号，一眼扫得到走到第几步 */
.doc ol.guide-steps { list-style: none; counter-reset: step; padding: 0; margin: 18px 0; }
.doc ol.guide-steps li {
  counter-increment: step; position: relative;
  padding: 2px 0 2px 46px; margin-bottom: 16px;
}
.doc ol.guide-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13.5px; font-weight: 700; color: var(--on-accent);
  background: var(--brand);
}
.doc ol.guide-steps li strong { color: var(--text); }

/* 样例输出。横向滚动而不是折行 —— Markdown 的缩进和表格一折就看不懂了 */
.doc pre {
  margin: 16px 0 20px; padding: 18px 20px;
  border-radius: 12px; overflow-x: auto;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 13px; line-height: 1.65; color: #d7dcf0;
}
.doc pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

.guide-cta { margin: 44px 0 8px; }
.fineprint { margin-top: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* 首页事实表 */
.facts-card { padding: 6px 22px; }
.facts { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 13px 0; border-bottom: 1px solid var(--border); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 150px; padding-right: 18px; color: var(--muted); font-weight: 600; font-size: 13px; }
.facts td { color: #d3d8e8; line-height: 1.6; }

/* 教程卡片：整张可点 */
.guide-card { display: block; text-decoration: none; color: inherit; }
.guide-card h2, .guide-card h3 { font-size: 17px; margin: 0 0 8px; }
.guide-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.guide-card:hover h2, .guide-card:hover h3 { color: var(--accent); }

.guides-head { padding-bottom: 24px; }
.guides-head h1 { margin-top: 0; }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding-top: 8px; }

@media (max-width: 720px) {
  .guide-grid { grid-template-columns: 1fr; }
  .facts th { width: 104px; }
}
