/* =========================================================
   天龙八部SF — 全站样式
   视觉基调：水墨深底 + 鎏金描边，标题用宋体族突出武侠感
   ========================================================= */

:root {
  --ink: #0A0C0F;
  --ink-2: #101318;
  --surface: #14171D;
  --surface-2: #1A1E25;

  --gold: #C9A227;
  --gold-2: #E3C766;
  --gold-dim: rgba(201,162,39,.5);
  --line: rgba(201,162,39,.16);
  --line-2: rgba(201,162,39,.32);

  --text: #E9E7E2;
  --text-2: #A6A29A;
  --text-3: #6F6B64;

  --r: 4px;
  --r-md: 8px;
  --max: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
           "SimSun", "宋体", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 水墨底纹：极淡的径向与斜向纹理，避免纯色死板 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 18% -8%, rgba(201,162,39,.07), transparent 68%),
    radial-gradient(760px 460px at 88% 6%, rgba(201,162,39,.045), transparent 70%),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,.012) 22px 23px);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.page { position: relative; z-index: 1; }

/* ---------- 排版 ---------- */
.h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.25; font-weight: 700; letter-spacing: .02em;
}
.h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35; font-weight: 700; letter-spacing: .02em;
  position: relative; padding-left: 16px;
}
.h2::before {
  content: ""; position: absolute; left: 0; top: .22em; bottom: .22em;
  width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}
.h3 { font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.lead { font-size: 15px; color: var(--text-2); }
.muted { color: var(--text-3); }
.gold { color: var(--gold-2); }

/* ---------- 顶栏 ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10,12,15,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-in {
  max-width: var(--max); margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.seal {
  width: 36px; height: 36px; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 19px; font-weight: 700;
  color: var(--ink); background: linear-gradient(150deg, var(--gold-2), var(--gold));
  border-radius: var(--r);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-size: 16.5px; font-weight: 700; letter-spacing: .04em; }
.brand-slogan { font-size: 10.5px; color: var(--text-3); letter-spacing: .14em; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: 18px; }
.nav a {
  padding: 8px 14px; border-radius: var(--r);
  font-size: 14px; color: var(--text-2);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav a:hover { color: var(--gold-2); background: rgba(201,162,39,.08); }
.nav a.is-active { color: var(--gold-2); }
.nav a.is-active::after {
  content: ""; display: block; height: 1px; margin: 5px auto -6px;
  background: var(--gold-dim);
}

.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14.5px; font-weight: 500;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn-gold {
  background: linear-gradient(150deg, var(--gold-2), var(--gold));
  color: #1A1408; font-weight: 600;
}
.btn-gold:hover { filter: brightness(1.08); }
.btn-line { background: rgba(201,162,39,.08); color: var(--gold-2); border-color: var(--line-2); }
.btn-line:hover { background: rgba(201,162,39,.16); }
.btn-sm { padding: 7px 15px; font-size: 13px; }

/* ---------- 首页 Hero ---------- */
.hero { padding: 76px 0 54px; }
.hero-in { max-width: 760px; }
.hero .h1 { margin: 18px 0 18px; }
.hero .h1 em { font-style: normal; color: var(--gold-2); }
.hero .lead { font-size: 15.5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.eyebrow {
  display: inline-block;
  font-size: 12px; letter-spacing: .22em;
  padding: 6px 14px; border-radius: var(--r);
  color: var(--gold-2);
  background: rgba(201,162,39,.08);
  border: 1px solid var(--line-2);
}

/* ---------- 统计 ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  margin-top: 56px;
}
.stat { background: var(--ink-2); padding: 22px 18px; text-align: center; }
.stat b {
  display: block; font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; color: var(--gold-2);
}
.stat span { font-size: 12.5px; color: var(--text-3); }

/* ---------- 区块 ---------- */
.section { padding: 66px 0; }
.section-tight { padding: 44px 0; }
.sec-head { margin-bottom: 28px; }
.sec-head .h2 + .lead { margin-top: 10px; }

/* ---------- 分类入口 ---------- */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat {
  display: block; padding: 22px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.cat:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-3px); }
.cat-ico { font-size: 22px; margin-bottom: 10px; filter: grayscale(.3); }
.cat .h3 { margin-bottom: 6px; }
.cat p { font-size: 12.5px; color: var(--text-3); }
.cat-count { font-size: 11.5px; color: var(--gold-dim); margin-top: 10px; letter-spacing: .06em; }

/* ---------- 攻略列表 ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.guide-card {
  display: block; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.guide-card:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }
.guide-card .h3 { font-size: 16px; margin-bottom: 7px; }
.guide-card p {
  font-size: 13px; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.guide-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--text-3); margin-top: 12px; }
.guide-meta .tag {
  color: var(--gold-2); border: 1px solid var(--line-2);
  background: rgba(201,162,39,.07);
  padding: 1px 8px; border-radius: var(--r); letter-spacing: .06em;
}

/* 列表页分类分组 */
.group { margin-bottom: 44px; }
.group-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.group-head .h2 { padding-left: 16px; }
.group-head span { font-size: 12.5px; color: var(--text-3); }

/* ---------- 文章页 ---------- */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-3); padding: 24px 0 0; }
.crumb a:hover { color: var(--gold-2); }
.crumb .sep { opacity: .4; }

.article { max-width: 820px; }
.article-head { padding: 22px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.article-title {
  font-family: var(--serif);
  font-size: clamp(25px, 3.6vw, 36px); font-weight: 700;
  line-height: 1.3; letter-spacing: .02em; margin: 15px 0 14px;
}
.article-lead { font-size: 15px; color: var(--text-2); }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--text-3); margin-top: 16px; }

.article-body { padding-bottom: 10px; }
.article-body h2 {
  font-family: var(--serif); font-size: 21px; font-weight: 700;
  margin: 38px 0 14px; padding-left: 14px; position: relative; line-height: 1.4;
}
.article-body h2::before {
  content: ""; position: absolute; left: 0; top: .2em; bottom: .2em;
  width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}
.article-body h3 { font-family: var(--serif); font-size: 16.5px; font-weight: 700; margin: 24px 0 10px; color: var(--gold-2); }
.article-body p { font-size: 15px; line-height: 1.95; color: #CFCBC4; margin-bottom: 15px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; }
.article-body ul { list-style: none; }
.article-body ul li { position: relative; padding-left: 16px; }
.article-body ul li::before {
  content: ""; position: absolute; left: 0; top: .82em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold-dim);
}
.article-body ol { list-style: decimal; }
.article-body ol li { padding-left: 4px; }
.article-body li { font-size: 15px; line-height: 1.9; color: #CFCBC4; margin-bottom: 8px; }
.article-body strong { color: var(--gold-2); font-weight: 600; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 13.5px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 13px; text-align: left; }
.article-body th { background: rgba(201,162,39,.08); color: var(--gold-2); font-weight: 600; white-space: nowrap; }
.article-body td { color: #CFCBC4; }
.article-body blockquote {
  border-left: 2px solid var(--gold-dim); padding: 4px 0 4px 16px;
  margin: 0 0 16px; color: var(--text-2); font-size: 14px;
}

/* 文内提示 */
.note {
  background: rgba(201,162,39,.06); border: 1px solid var(--line);
  border-left: 3px solid var(--gold); border-radius: var(--r-md);
  padding: 14px 18px; margin: 0 0 18px;
  font-size: 13.5px; color: var(--text-2);
}
.note b { color: var(--gold-2); }

/* 文末 */
.article-foot { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.article-foot .rel-title { font-family: var(--serif); font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.rel-list { display: grid; gap: 9px; }
.rel-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 15px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 13.5px; color: var(--text-2);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.rel-list a:hover { border-color: var(--line-2); color: var(--gold-2); }
.rel-list a::before { content: "—"; color: var(--gold-dim); }

.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); margin-top: 26px; }
.back-link:hover { color: var(--gold-2); }

/* ---------- CTA 条 ---------- */
.cta-band {
  border-radius: var(--r-md); padding: 44px 36px; text-align: center;
  background: linear-gradient(150deg, rgba(201,162,39,.1), rgba(201,162,39,.03));
  border: 1px solid var(--line-2);
}
.cta-band .h2 { padding-left: 0; display: inline-block; }
.cta-band .h2::before { display: none; }
.cta-band .lead { max-width: 540px; margin: 12px auto 0; }
.cta-band .btn { margin-top: 24px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 44px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 34px; }
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.footer p { font-size: 12.5px; color: var(--text-3); max-width: 340px; }
.footer h4 { font-family: var(--serif); font-size: 13.5px; font-weight: 700; margin-bottom: 13px; }
.footer li + li { margin-top: 9px; }
.footer li a { font-size: 13px; color: var(--text-2); transition: color .18s var(--ease); }
.footer li a:hover { color: var(--gold-2); }
.footer-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 11.5px; color: var(--text-3);
}

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 72px 0 40px; }
.nf-code {
  font-family: var(--serif); font-size: clamp(72px, 16vw, 140px);
  font-weight: 700; line-height: 1; letter-spacing: .04em;
  background: linear-gradient(160deg, var(--gold-2), rgba(201,162,39,.25));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nf .h2 { padding-left: 0; display: inline-block; margin-top: 14px; }
.nf .h2::before { display: none; }
.nf .lead { max-width: 480px; margin: 14px auto 0; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

/* ---------- 门派速查 ---------- */
.sect-nav { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  display: inline-flex; align-items: center;
  padding: 8px 16px; border-radius: var(--r-md);
  font-size: 13.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line);
  cursor: pointer; transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease);
}
a.chip:hover, .chip:hover { color: var(--gold-2); border-color: var(--line-2); }
.chip.is-active { color: #1A1408; background: linear-gradient(150deg, var(--gold-2), var(--gold)); border-color: transparent; font-weight: 600; }

/* ---------- 攻略列表：筛选与表格 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.table-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.guide-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.guide-table th, .guide-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.guide-table thead th {
  font-family: var(--serif); font-weight: 700; font-size: 13px;
  color: var(--gold-2); background: rgba(201,162,39,.06);
  white-space: nowrap;
}
.guide-table tbody tr:last-child td { border-bottom: 0; }
.guide-table tbody tr { transition: background .16s var(--ease); }
.guide-table tbody tr:hover { background: rgba(201,162,39,.05); }
.guide-table td a { color: var(--text); }
.guide-table td a:hover { color: var(--gold-2); }
.guide-table .col-cat { white-space: nowrap; color: var(--gold-2); }
.guide-table .col-date, .guide-table .col-words { white-space: nowrap; color: var(--text-3); font-size: 12.5px; }

/* ---------- 文章页侧栏 ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 44px; align-items: start; }
.side { position: sticky; top: 84px; display: grid; gap: 14px; }
.side-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 20px;
}
.side-title {
  font-family: var(--serif); font-size: 15px; font-weight: 700;
  padding-bottom: 11px; margin-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.side-list { display: grid; gap: 8px; }
.side-list a {
  display: block; font-size: 13px; color: var(--text-2); line-height: 1.5;
  transition: color .16s var(--ease);
}
.side-list a:hover { color: var(--gold-2); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .hero { padding: 54px 0 40px; }
  .article-layout { grid-template-columns: 1fr; }
  .side { position: static; }
}

@media (max-width: 720px) {
  .wrap, .header-in { padding-left: 18px; padding-right: 18px; }
  .nav { display: none; }
  .brand-slogan { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 48px 0; }
  .cta-band { padding: 34px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-body table { display: block; overflow-x: auto; }
}
