/* ============================================================
   虫族之渣虫觉醒笔记 · 展示站样式
   主题：深空星海 × 虫翼虹彩（紫罗兰 / 鎏金 / 青色）
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  --bg-0: #07050f;
  --bg-1: #0e0a1e;
  --bg-2: #161029;
  --ink: #ece8f8;
  --ink-dim: #a79ec4;
  --ink-faint: #6f6690;
  --violet: #8b5cf6;
  --fuchsia: #d946ef;
  --gold: #f2c879;
  --cyan: #67e8f9;
  --grad-main: linear-gradient(120deg, #a78bfa 0%, #e879f9 46%, #f2c879 100%);
  --grad-soft: linear-gradient(120deg, rgba(167, 139, 250, .22), rgba(242, 200, 121, .16));
  --glass: rgba(255, 255, 255, .045);
  --glass-strong: rgba(255, 255, 255, .08);
  --line: rgba(167, 139, 250, .18);
  --line-soft: rgba(255, 255, 255, .08);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .75);
  --shadow-glow: 0 0 60px -12px rgba(139, 92, 246, .55);
  --radius: 20px;
  --nav-h: 72px;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-0);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(139, 92, 246, .16), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, rgba(103, 232, 249, .08), transparent 60%),
    radial-gradient(1000px 800px at 50% 115%, rgba(217, 70, 239, .10), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 45%, var(--bg-0));
  z-index: -3;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

.container { width: min(1180px, 92vw); margin-inline: auto; }

::selection { background: rgba(167, 139, 250, .4); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4c3a8f, #2b2150);
  border-radius: 8px;
  border: 2px solid var(--bg-0);
}

/* ---------- 阅读进度条 ---------- */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--grad-main);
  box-shadow: 0 0 12px rgba(217, 70, 239, .8);
  z-index: 1200;
  transition: width .1s linear;
}

/* ---------- 星海画布与极光 ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  animation: drift 22s ease-in-out infinite alternate;
}
.orb-1 { width: 460px; height: 460px; top: -140px; right: -80px; background: radial-gradient(circle, rgba(139, 92, 246, .5), transparent 70%); }
.orb-2 { width: 380px; height: 380px; bottom: 8%; left: -120px; background: radial-gradient(circle, rgba(103, 232, 249, .28), transparent 70%); animation-delay: -7s; }
.orb-3 { width: 420px; height: 420px; top: 42%; right: 12%; background: radial-gradient(circle, rgba(242, 200, 121, .22), transparent 70%); animation-delay: -13s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-40px, 46px, 0) scale(1.12); }
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(10, 7, 20, .72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line-soft);
}

.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: #1a1030;
  background: var(--grad-main);
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  box-shadow: 0 6px 24px -6px rgba(217, 70, 239, .7);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--font-serif); font-size: 17px; letter-spacing: 1px; }
.brand-text small { font-size: 11px; color: var(--ink-faint); letter-spacing: 4px; }

.nav-links { display: flex; gap: 6px; margin-left: auto; }

.nav-links a {
  position: relative;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--ink-dim);
  transition: color .25s, background .25s;
}
.nav-links a:hover { color: var(--ink); background: var(--glass); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 18px; height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--grad-main);
}

.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-links + .nav-actions { margin-left: 0; }

.btn-ghost {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-dim);
  border: 1px solid var(--line-soft);
  background: var(--glass);
  transition: all .25s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--line); background: var(--glass-strong); }

.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.menu-toggle span { width: 22px; height: 2px; background: var(--ink-dim); border-radius: 2px; transition: .3s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .5px;
  transition: transform .28s, box-shadow .28s, background .28s, border-color .28s, color .28s;
}

.btn-icon { font-size: 13px; }

.btn-primary {
  background: var(--grad-main);
  color: #170d2e;
  font-weight: 700;
  box-shadow: 0 14px 40px -12px rgba(217, 70, 239, .65);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 52px -14px rgba(217, 70, 239, .8); }

.btn-outline {
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink);
}
.btn-outline:hover { transform: translateY(-3px); border-color: rgba(167, 139, 250, .5); background: var(--glass-strong); }

.btn-soft {
  background: var(--grad-soft);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-soft:hover { transform: translateY(-2px); border-color: rgba(242, 200, 121, .45); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 96px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

/* 封面 */
.hero-cover { position: relative; perspective: 1100px; }

.cover-glow {
  position: absolute;
  inset: 6% 2%;
  background: conic-gradient(from 200deg, rgba(139, 92, 246, .55), rgba(103, 232, 249, .3), rgba(242, 200, 121, .45), rgba(217, 70, 239, .5), rgba(139, 92, 246, .55));
  filter: blur(46px);
  border-radius: 32px;
  z-index: 0;
  animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: .55; transform: scale(.97); }
  50% { opacity: .85; transform: scale(1.03); }
}

.cover-frame {
  position: relative;
  z-index: 1;
  border-radius: 22px;
  padding: 9px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .04) 38%, rgba(242, 200, 121, .3));
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform-style: preserve-3d;
  transition: transform .18s ease-out;
  overflow: hidden;
}

.cover-frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 15px;
}

.cover-shine {
  position: absolute;
  top: -60%; left: -70%;
  width: 60%; height: 220%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: rotate(18deg);
  animation: shine 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shine {
  0%, 62% { left: -70%; }
  100% { left: 150%; }
}

.cover-caption {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 3px;
  color: var(--ink);
  background: rgba(10, 7, 20, .55);
  border: 1px solid rgba(242, 200, 121, .35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

/* 信息区 */
.hero-info { display: flex; flex-direction: column; gap: 22px; }

.badges { display: flex; gap: 10px; flex-wrap: wrap; }

.badge {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 2px;
  border: 1px solid var(--line-soft);
  background: var(--glass);
  color: var(--ink-dim);
}
.badge-done {
  color: var(--gold);
  border-color: rgba(242, 200, 121, .4);
  background: rgba(242, 200, 121, .08);
}
.badge-soft { color: #e879f9; border-color: rgba(232, 121, 249, .35); background: rgba(232, 121, 249, .08); }

.book-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4.6vw, 3.9rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 2px;
}

.grad-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(217, 70, 239, .35));
}

.book-author { color: var(--ink-dim); font-size: 15px; }
.book-author b { color: var(--ink); font-weight: 600; }
.book-author a { color: var(--cyan); border-bottom: 1px dashed rgba(103, 232, 249, .4); transition: .25s; }
.book-author a:hover { color: #a5f3fc; }
.book-author .dot { margin: 0 8px; color: var(--ink-faint); }

.book-tagline {
  color: var(--ink-dim);
  font-size: 16.5px;
  line-height: 2;
  border-left: 3px solid;
  border-image: var(--grad-main) 1;
  padding-left: 18px;
}

.book-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.book-tags li {
  padding: 5px 15px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-dim);
  background: var(--glass);
  border: 1px solid var(--line-soft);
  transition: .25s;
}
.book-tags li:hover { color: var(--ink); border-color: var(--line); transform: translateY(-2px); }

.hero-stats {
  display: flex;
  gap: clamp(20px, 4vw, 46px);
  padding: 20px 0;
  border-block: 1px solid var(--line-soft);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-size: 12.5px; color: var(--ink-faint); letter-spacing: 2px; }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-hint {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 4px;
  animation: floaty 2.6s ease-in-out infinite;
}
.scroll-hint i {
  width: 1px; height: 34px;
  background: linear-gradient(180deg, var(--violet), transparent);
}

@keyframes floaty {
  0%, 100% { transform: translate(-50%, 0); opacity: .75; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* ---------- 章节区块通用 ---------- */
.section { padding: 108px 0; position: relative; }

.section-head { text-align: center; margin-bottom: 56px; }

.section-kicker {
  font-size: 12px;
  letter-spacing: 7px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .85;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 4px;
  margin: 14px 0 10px;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 64px; height: 2px;
  margin: 18px auto 0;
  background: var(--grad-main);
  border-radius: 2px;
}

.section-sub { color: var(--ink-faint); font-size: 14.5px; letter-spacing: 1px; }
.section-sub b { color: var(--gold); }

/* ---------- 简介卡片 ---------- */
.synopsis-card {
  position: relative;
  max-width: 880px;
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px);
  border-radius: 26px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02) 60%);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.synopsis-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-main);
  opacity: .8;
}

.quote-mark {
  position: absolute;
  top: 6px; left: 26px;
  font-family: var(--font-serif);
  font-size: 130px;
  line-height: 1;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .22;
  pointer-events: none;
}

.synopsis-card > p {
  position: relative;
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 2.15;
  text-indent: 2em;
  margin-bottom: 18px;
}

.synopsis-card .synopsis-end { color: var(--ink); font-weight: 500; margin-bottom: 26px; }

.synopsis-tags { display: flex; flex-wrap: wrap; gap: 12px; }
.synopsis-tags li {
  font-size: 13px;
  color: var(--gold);
  padding: 4px 14px;
  border-radius: 8px;
  background: rgba(242, 200, 121, .07);
  border: 1px solid rgba(242, 200, 121, .22);
}

/* ---------- 单元卡片 ---------- */
.arc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: stretch;
}

.arc-card {
  position: relative;
  border-radius: var(--radius);
  padding: 34px 30px 30px;
  background: linear-gradient(170deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  transition: transform .35s, border-color .35s, box-shadow .35s;
}

.arc-card:hover { transform: translateY(-6px); border-color: var(--line); box-shadow: var(--shadow-glow); }

.arc-card.featured {
  border-color: rgba(167, 139, 250, .4);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(139, 92, 246, .18), transparent 55%),
    radial-gradient(120% 90% at 0% 100%, rgba(242, 200, 121, .12), transparent 55%),
    linear-gradient(170deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
}

.arc-ribbon {
  position: absolute;
  top: 16px; right: -34px;
  transform: rotate(38deg);
  width: 148px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 5px 0;
  color: #1a1030;
  background: var(--grad-main);
  font-weight: 700;
}
.arc-card.locked .arc-ribbon {
  background: rgba(167, 139, 250, .25);
  color: var(--ink-dim);
  font-weight: 500;
}

.arc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.arc-head h3 { font-family: var(--font-serif); font-size: 19px; letter-spacing: 1px; }

.arc-status {
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.arc-status.open { color: #6ee7b7; border: 1px solid rgba(110, 231, 183, .35); background: rgba(110, 231, 183, .08); }
.arc-status.soon { color: var(--ink-faint); border: 1px solid var(--line-soft); background: var(--glass); }

.arc-pairing {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .22);
  border: 1px solid var(--line-soft);
}

.arc-pairing .who { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.arc-pairing .who b { font-family: var(--font-serif); font-size: 16px; color: var(--ink); letter-spacing: 1px; }
.arc-pairing .who span { font-size: 11.5px; color: var(--ink-faint); letter-spacing: 1px; }
.arc-pairing .cross {
  font-family: var(--font-serif);
  font-size: 20px;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.arc-desc { color: var(--ink-dim); font-size: 14px; line-height: 2; flex: 1; }

.arc-btn { align-self: flex-start; padding: 10px 24px; font-size: 14px; }

.lock-visual {
  display: grid;
  place-items: center;
  padding: 20px 0 6px;
  color: rgba(167, 139, 250, .45);
  transition: color .35s;
}
.arc-card.locked:hover .lock-visual { color: rgba(167, 139, 250, .8); }
.arc-card.locked { opacity: .9; }
.arc-card.locked:hover { opacity: 1; }

/* ---------- 目录 ---------- */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: min(420px, 100%);
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--glass);
  transition: border-color .3s, box-shadow .3s;
}
.search-box:focus-within { border-color: rgba(167, 139, 250, .55); box-shadow: 0 0 0 4px rgba(139, 92, 246, .12); }

.search-icon { padding: 0 4px 0 20px; color: var(--ink-faint); font-size: 17px; }

.search-box input {
  flex: 1;
  padding: 13px 12px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 14.5px;
}
.search-box input::placeholder { color: var(--ink-faint); }

.search-clear {
  padding: 0 18px;
  color: var(--ink-faint);
  font-size: 13px;
  display: none;
  transition: color .25s;
}
.search-clear:hover { color: var(--ink); }
.search-box.has-text .search-clear { display: block; }

.filter-chips { display: flex; gap: 10px; }

.chip {
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-dim);
  border: 1px solid var(--line-soft);
  background: var(--glass);
  transition: .28s;
}
.chip:hover { color: var(--ink); border-color: var(--line); }
.chip.active {
  color: #1a1030;
  font-weight: 700;
  background: var(--grad-main);
  border-color: transparent;
  box-shadow: 0 10px 26px -10px rgba(217, 70, 239, .6);
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.chapter-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--ink-dim);
  background: var(--glass);
  border: 1px solid var(--line-soft);
  text-align: left;
  overflow: hidden;
  transition: transform .25s, border-color .25s, color .25s, background .25s;
}

.chapter-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad-main);
  opacity: 0;
  transition: opacity .25s;
}

.chapter-item:hover {
  transform: translateY(-3px);
  color: var(--ink);
  border-color: rgba(167, 139, 250, .45);
  background: var(--glass-strong);
}
.chapter-item:hover::before { opacity: 1; }

.chapter-item .num {
  font-family: var(--font-serif);
  font-size: 12.5px;
  color: var(--ink-faint);
  min-width: 44px;
}

.chapter-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chapter-item .flag { font-size: 11px; color: var(--cyan); opacity: .9; }
.chapter-item .read-flag { font-size: 11px; color: #6ee7b7; }

.chapter-item.is-extra { border-color: rgba(242, 200, 121, .22); }
.chapter-item.is-extra .num { color: rgba(242, 200, 121, .75); }

.chapter-item.read { color: var(--ink-faint); }
.chapter-item.read .name { text-decoration: line-through; text-decoration-color: rgba(110, 231, 183, .5); }

.chapter-item.active {
  background: linear-gradient(120deg, rgba(139, 92, 246, .3), rgba(242, 200, 121, .16));
  border-color: rgba(167, 139, 250, .6);
  color: var(--ink);
}
.chapter-item.active::before { opacity: 1; }

.empty-tip {
  text-align: center;
  color: var(--ink-faint);
  padding: 40px 0 0;
  font-size: 14.5px;
  letter-spacing: 1px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 42px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--ink-dim);
  border: 1px solid var(--line-soft);
  background: var(--glass);
  transition: .25s;
}
.page-btn:hover:not(:disabled):not(.active) { color: var(--ink); border-color: var(--line); transform: translateY(-2px); }
.page-btn.active {
  color: #1a1030;
  font-weight: 700;
  background: var(--grad-main);
  border-color: transparent;
  box-shadow: 0 10px 26px -12px rgba(217, 70, 239, .7);
}
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-ellipsis { color: var(--ink-faint); padding: 0 4px; }

/* ---------- 阅读器 ---------- */
.reader-shell {
  --reader-fs: 18px;
  max-width: 880px;
  margin-inline: auto;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  transition: background .4s, color .4s, border-color .4s;
}

/* 星夜纸（默认） */
.reader-shell[data-theme="night"] {
  background: linear-gradient(170deg, rgba(22, 16, 41, .92), rgba(12, 9, 24, .96));
  color: #d9d3ec;
}
/* 羊皮纸 */
.reader-shell[data-theme="sepia"] {
  background: linear-gradient(170deg, #f6efdd, #ece0c6);
  color: #4a3a26;
  border-color: #e2d3b4;
}
/* 晨光纸 */
.reader-shell[data-theme="day"] {
  background: linear-gradient(170deg, #ffffff, #f4f4fa);
  color: #2c2a3a;
  border-color: #e6e6f0;
}

.reader-toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 28px;
  border-bottom: 1px solid;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.reader-shell[data-theme="night"] .reader-toolbar { background: rgba(14, 10, 28, .8); border-color: var(--line-soft); }
.reader-shell[data-theme="sepia"] .reader-toolbar { background: rgba(246, 239, 221, .82); border-color: rgba(74, 58, 38, .14); }
.reader-shell[data-theme="day"] .reader-toolbar { background: rgba(255, 255, 255, .84); border-color: rgba(44, 42, 58, .1); }

.reader-title { display: flex; flex-direction: column; gap: 2px; }
.reader-title b { font-family: var(--font-serif); font-size: 17px; letter-spacing: 1px; }
.reader-title span { font-size: 12px; opacity: .6; letter-spacing: 1px; }

.reader-tools { display: flex; align-items: center; gap: 14px; }

.tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid;
}
.reader-shell[data-theme="night"] .tool-group { border-color: var(--line-soft); background: rgba(0, 0, 0, .25); }
.reader-shell[data-theme="sepia"] .tool-group { border-color: rgba(74, 58, 38, .18); background: rgba(255, 255, 255, .5); }
.reader-shell[data-theme="day"] .tool-group { border-color: rgba(44, 42, 58, .12); background: rgba(0, 0, 0, .03); }

.tool-btn {
  min-width: 36px;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 13.5px;
  opacity: .75;
  transition: .25s;
}
.tool-btn:hover { opacity: 1; background: rgba(139, 92, 246, .18); }

.theme-dot { position: relative; width: 34px; min-width: 34px; padding: 0; }
.theme-dot::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, .5);
}
.theme-dot[data-theme-set="night"]::after { background: #201a3a; }
.theme-dot[data-theme-set="sepia"]::after { background: #e9dcbe; }
.theme-dot[data-theme-set="day"]::after { background: #ffffff; }

.reader-shell .theme-dot.is-active::after { box-shadow: 0 0 0 2px #a78bfa; }

.reader-body {
  padding: clamp(30px, 5vw, 64px) clamp(24px, 6vw, 72px);
  font-family: var(--font-serif);
  font-size: var(--reader-fs);
  line-height: 2.2;
  min-height: 380px;
  transition: font-size .25s;
  outline: none;
}

.reader-body p { text-indent: 2em; margin-bottom: 1.1em; }
.reader-body p:last-child { margin-bottom: 0; }

.reader-body .chapter-heading {
  text-indent: 0;
  font-size: 1.5em;
  font-weight: 700;
  text-align: center;
  letter-spacing: 4px;
  margin: 6px 0 34px;
}

.reader-body .chapter-heading::after {
  content: "";
  display: block;
  width: 54px; height: 2px;
  margin: 20px auto 0;
  background: linear-gradient(120deg, #a78bfa, #f2c879);
  border-radius: 2px;
}

.reader-body .dialogue { text-indent: 2em; }

/* 章末提示 */
.reader-end {
  text-indent: 0 !important;
  text-align: center;
  margin-top: 42px !important;
  font-size: .82em;
  letter-spacing: 3px;
  opacity: .5;
}

/* 版权提示块 */
.reader-notice {
  text-indent: 0;
  margin: 34px 0 0;
  padding: 22px 26px;
  border-radius: 14px;
  border: 1px dashed;
  font-size: .85em;
  line-height: 2;
  text-align: center;
  opacity: .92;
}
.reader-shell[data-theme="night"] .reader-notice { border-color: rgba(167, 139, 250, .4); background: rgba(139, 92, 246, .07); }
.reader-shell[data-theme="sepia"] .reader-notice { border-color: rgba(74, 58, 38, .3); background: rgba(74, 58, 38, .05); }
.reader-shell[data-theme="day"] .reader-notice { border-color: rgba(44, 42, 58, .22); background: rgba(44, 42, 58, .03); }

.reader-notice a { color: #a78bfa; border-bottom: 1px dashed currentColor; }

.reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 28px 28px;
  border-top: 1px solid;
}
.reader-shell[data-theme="night"] .reader-nav { border-color: var(--line-soft); }
.reader-shell[data-theme="sepia"] .reader-nav { border-color: rgba(74, 58, 38, .14); }
.reader-shell[data-theme="day"] .reader-nav { border-color: rgba(44, 42, 58, .1); }

.reader-nav .btn { padding: 10px 22px; font-size: 14px; }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 40px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent, rgba(139, 92, 246, .06));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.6fr;
  gap: 40px;
  padding: 64px 0 48px;
}

.footer-brand p { color: var(--ink-faint); font-size: 13.5px; margin-top: 16px; line-height: 2; }

.footer-links { display: flex; flex-direction: column; gap: 11px; }
.footer-links h4, .footer-note h4 {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}
.footer-links a { color: var(--ink-dim); font-size: 14px; transition: .25s; width: fit-content; }
.footer-links a:hover { color: var(--ink); transform: translateX(4px); }

.footer-note p { color: var(--ink-faint); font-size: 13px; line-height: 2; margin-bottom: 8px; }
.footer-note b { color: var(--ink-dim); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 22px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-faint);
  font-size: 12.5px;
  letter-spacing: 1px;
}

/* ---------- 返回顶部 / Toast ---------- */
.to-top {
  position: fixed;
  right: 26px; bottom: 30px;
  width: 46px; height: 46px;
  border-radius: 14px;
  font-size: 17px;
  color: #1a1030;
  background: var(--grad-main);
  box-shadow: 0 16px 34px -12px rgba(217, 70, 239, .7);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: .35s;
  z-index: 900;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { transform: translateY(-4px); }

.toast {
  position: fixed;
  left: 50%; bottom: 40px;
  transform: translate(-50%, 24px);
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink);
  background: rgba(20, 14, 40, .88);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: .4s;
  z-index: 1100;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 滚动显现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s cubic-bezier(.22, 1, .36, 1), transform .9s cubic-bezier(.22, 1, .36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 340px 1fr; gap: 44px; }
  .arc-grid { grid-template-columns: 1fr; max-width: 620px; margin-inline: auto; }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 18px 6vw 26px;
    background: rgba(10, 7, 20, .96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line-soft);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: .35s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 18px; border-radius: 12px; }
  .nav-links a.active::after { left: 18px; transform: none; bottom: 8px; }

  .menu-toggle { display: flex; }
  .nav-actions { margin-left: auto; }

  .hero { padding-top: calc(var(--nav-h) + 30px); min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; text-align: center; }
  .hero-info { align-items: center; }
  .book-tagline { border-left: none; border-top: 2px solid rgba(167, 139, 250, .35); padding: 16px 0 0; }
  .hero-stats { justify-content: center; flex-wrap: wrap; row-gap: 16px; }
  .hero-cta { justify-content: center; }
  .cover-caption { bottom: 18px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-note { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .section { padding: 76px 0; }
  .chapter-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .reader-toolbar { padding: 14px 18px; }
  .reader-nav { padding: 18px; flex-wrap: wrap; }
  .reader-nav .btn { flex: 1; min-width: 110px; }
  .to-top { right: 16px; bottom: 20px; }
  .brand-text b { font-size: 15px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ---------- 延伸阅读卡片（首页） ---------- */
.more-card {
  position: relative;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02) 60%);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform .35s, border-color .35s, box-shadow .35s;
}

.more-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-main);
  opacity: .8;
}

.more-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: var(--shadow-glow); }

.more-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
}

.more-info { display: flex; flex-direction: column; gap: 14px; }

.more-info h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: 2px;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.more-author { color: var(--ink-dim); font-size: 14px; }
.more-author b { color: var(--ink); font-weight: 600; }
.more-desc { color: var(--ink-dim); font-size: 14.5px; line-height: 2; }
.more-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.more-actions .btn { padding: 11px 24px; font-size: 14px; }
.more-card + .more-card { margin-top: 26px; }

@media (max-width: 720px) {
  .more-card { grid-template-columns: 1fr; }
  .more-cover { max-width: 210px; margin-inline: auto; }
  .more-info { align-items: center; text-align: center; }
  .more-actions { justify-content: center; }
}
