/* NextSub 官网样式 —— 零依赖纯 CSS，配色与软件主题一致 */

:root {
  --bg: #ffffff;
  --bg-soft: #f2f2f7;
  --card: #ffffff;
  --text: #1c1c1e;
  --text-2: #6e6e73;
  --text-3: #8e8e93;
  --border: #e0e0e5;
  --accent: #007aff;
  --accent-dark: #0062cc;
  --green: #34c759;
  --orange: #ff9500;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --bg-soft: #1f1f24;
    --card: #1f1f24;
    --text: #f2f2f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --border: #33333a;
    --accent: #0a84ff;
    --accent-dark: #409cff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
        "PingFang SC", "Hiragino Sans GB", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

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

/* ── 顶部导航 ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--text-2); font-size: 14.5px; }
.nav a:hover, .nav a.active { color: var(--text); text-decoration: none; }

/* ── 按钮 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-lg { padding: 13px 26px; font-size: 16px; }

/* ── 通用区块 ── */
main { display: block; }
.section { padding: 56px 0; }
.section.tight { padding: 32px 0; }
.section.soft { background: var(--bg-soft); }
h1 { font-size: 40px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.5px; }
h2 { font-size: 26px; margin: 0 0 14px; letter-spacing: -.3px; }
h3 { font-size: 18px; margin: 0 0 8px; }
p { margin: 0 0 14px; color: var(--text-2); }
.lead { font-size: 18px; color: var(--text-2); }
.muted { color: var(--text-3); font-size: 14px; }
.center { text-align: center; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

/* ── 首屏 ── */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 { max-width: 780px; margin: 0 auto 16px; }
.hero .lead { max-width: 620px; margin: 0 auto 26px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13.5px; color: var(--text-3); }

/* ── 卡片网格 ── */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.card.soft { background: var(--bg-soft); border-color: transparent; }
.card h3 { display: flex; align-items: center; gap: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .ico { font-size: 20px; }

/* ── 徽标 ── */
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; vertical-align: middle;
}
.badge.free { background: rgba(52, 199, 89, .14); color: #1a8f3c; }
.badge.vip { background: rgba(255, 149, 0, .16); color: #b26a00; }
.badge.plan { background: rgba(0, 122, 255, .12); color: var(--accent); }
@media (prefers-color-scheme: dark) {
  .badge.free { color: #5bd47f; }
  .badge.vip { color: #ffb340; }
}

/* ── 占位（截图/视频）── */
.shot {
  aspect-ratio: 16 / 9; border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: repeating-linear-gradient(45deg, var(--bg-soft) 0 12px, transparent 12px 24px);
  display: grid; place-items: center; color: var(--text-3); font-size: 14px;
}
.shot.p4x3 { aspect-ratio: 4 / 3; }

/* ── 表格 ── */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-2); font-weight: 600; font-size: 14px; }
td { color: var(--text-2); }
td:first-child { color: var(--text); }
.table-wrap { overflow-x: auto; }

/* ── 价格卡 ── */
.price-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.price-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 26px; box-shadow: var(--shadow);
}
.price-card.featured { border-color: var(--accent); border-width: 2px; }
.price-name { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.price-amount { font-size: 38px; font-weight: 700; letter-spacing: -1px; }
.price-amount small { font-size: 15px; font-weight: 500; color: var(--text-3); }
.price-list { list-style: none; padding: 0; margin: 18px 0 22px; }
.price-list li { padding: 6px 0 6px 24px; position: relative; color: var(--text-2); font-size: 14.5px; }
.price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* ── FAQ ── */
details.faq {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 10px; background: var(--card);
}
details.faq summary { cursor: pointer; font-weight: 600; color: var(--text); outline: none; }
details.faq summary::marker { color: var(--text-3); }
details.faq p { margin: 10px 0 2px; }

/* ── 提示条 ── */
.note {
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 12px 16px; background: var(--bg-soft);
  color: var(--text-2); font-size: 14.5px;
}
.note.warn { border-left-color: var(--orange); }

/* ── 法务长文 ── */
.prose { max-width: 780px; }
.prose h2 { margin-top: 34px; }
.prose h3 { margin-top: 22px; }
.prose ul { color: var(--text-2); padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose .muted { font-size: 13.5px; }

/* ── 许可清单 ── */
.lic-list { list-style: none; padding: 0; margin: 24px 0 0; }
.lic-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.lic-name { font-weight: 700; color: var(--text); }
.lic-meta { color: var(--text-2); font-size: 14.5px; }
.lic-url { font-size: 13.5px; word-break: break-all; }

/* ── 页脚 ── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 40px 0 28px; margin-top: 40px; }
.footer-cols { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr 1fr; }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); margin: 0 0 10px; }
.site-footer a { display: block; color: var(--text-2); font-size: 14.5px; padding: 3px 0; }
.footer-brand { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; }

/* ── 响应式 ── */
@media (max-width: 760px) {
  h1 { font-size: 30px; }
  h2 { font-size: 22px; }
  .hero { padding: 40px 0 28px; }
  .section { padding: 40px 0; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .site-header .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .nav { width: 100%; margin-left: 0; gap: 14px; }
  .site-header .btn { display: none; }
}
