/* ============================================================
   READGRID · K12 课外阅读书单导航
   Vaporwave / 蒸汽波 · 深紫粉渐变 · 复古未来 · 网格地平线 · 发光字
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --c-primary: #e4594e;      /* 主色：珊瑚粉红 */
  --c-accent: #40d4c6;       /* 辅助色：薄荷青 */
  --c-cta: #54b2f2;          /* 强调/CTA：电子蓝 */
  --c-bg: #150f0e;           /* 页面背景：暗红棕黑 */
  --c-surface: #231a1a;      /* 卡片/表面 */
  --c-surface-2: #2c2120;    /* 次级表面（悬浮态） */
  --c-text: #f2eeee;         /* 正文文字 */
  --c-dim: #ae9a98;          /* 次要文字 */
  --c-stroke: #403130;       /* 描边 */
  --c-purple: #a86bd4;       /* 装饰紫（渐变用） */
  --c-pink: #ff7ac0;         /* 装饰粉（渐变用） */

  --font-head: 'Poppins', 'Noto Sans SC', system-ui, sans-serif;
  --font-body: 'JetBrains Mono', 'Fira Code', ui-monospace, 'SFMono-Regular', 'Courier New', monospace;

  --radius: 6px;
  --maxw: 1200px;
  --header-h: 64px;

  --glow-primary: 0 0 6px rgba(228, 89, 78, .55), 0 0 22px rgba(168, 107, 212, .5), 0 0 46px rgba(84, 178, 242, .28);
  --glow-cta: 0 0 14px rgba(84, 178, 242, .38);
  --glow-accent: 0 0 10px rgba(64, 212, 198, .5);
  --shadow-card: 0 10px 26px -14px rgba(0, 0, 0, .8);
  --shadow-hover: 0 0 0 1px rgba(168, 107, 212, .5), 0 18px 40px -18px rgba(168, 107, 212, .5), 0 22px 50px -30px rgba(228, 89, 78, .55);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--c-text);
  background-color: var(--c-bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景：暗底 + 紫粉氛围光 + 扫描线 */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(52rem 34rem at 78% -8%, rgba(168, 107, 212, .22), transparent 62%),
    radial-gradient(44rem 30rem at 8% 12%, rgba(228, 89, 78, .16), transparent 60%),
    radial-gradient(38rem 30rem at 50% 112%, rgba(84, 178, 242, .14), transparent 60%),
    var(--c-bg);
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,.07) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
  opacity: .5;
}

::selection { background: var(--c-cta); color: var(--c-bg); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-stroke); border-radius: var(--radius); border: 2px solid var(--c-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--c-primary); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; letter-spacing: .01em; }

/* ---------- 3. 通用组件 ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--c-accent);
  text-shadow: var(--glow-accent);
  margin-bottom: 10px;
}
.eyebrow::before { content: '// '; color: var(--c-primary); text-shadow: none; }

.glow-title {
  font-weight: 800;
  color: var(--c-text);
  text-shadow: 0 0 8px rgba(228, 89, 78, .5), 0 0 26px rgba(168, 107, 212, .55), 0 0 60px rgba(84, 178, 242, .4);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  letter-spacing: .06em;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-cta { background: var(--c-cta); color: var(--c-bg); border-color: rgba(84,178,242,.7); box-shadow: var(--glow-cta); }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 0 24px rgba(84, 178, 242, .65); }
.btn-ghost { background: transparent; color: var(--c-text); border-color: var(--c-stroke); }
.btn-ghost:hover { border-color: var(--c-accent); color: var(--c-accent); box-shadow: 0 0 14px rgba(64, 212, 198, .25); transform: translateY(-2px); }
.btn-primary { background: var(--c-primary); color: var(--c-bg); border-color: rgba(228,89,78,.7); box-shadow: 0 0 14px rgba(228, 89, 78, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 24px rgba(228, 89, 78, .55); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-lg { padding: 13px 24px; font-size: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: var(--radius);
  border: 1px solid var(--c-stroke);
  color: var(--c-dim);
  white-space: nowrap;
  transition: color .18s, border-color .18s, box-shadow .18s, background .18s;
}
.chip-band { color: var(--c-accent); border-color: rgba(64,212,198,.4); }
.chip-src { color: var(--c-purple); border-color: rgba(168,107,212,.45); }
.chip-src.gov { color: var(--c-primary); border-color: rgba(228,89,78,.5); }
.chip-src.famous { color: var(--c-cta); border-color: rgba(84,178,242,.5); }

/* 难度星级 */
.stars { display: inline-flex; gap: 2px; font-size: 12px; letter-spacing: 1px; }
.stars .star { color: var(--c-stroke); transition: color .2s, text-shadow .2s, transform .2s; }
.stars .star.on { color: var(--c-primary); text-shadow: 0 0 8px rgba(228, 89, 78, .8); }
.stars .star.pop { animation: starPop .35s ease; }
@keyframes starPop { 50% { transform: scale(1.6); } }

/* 区块标题 */
.sec-head { margin-bottom: 26px; }
.sec-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sec-title {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  color: var(--c-text);
  text-shadow: 0 0 6px rgba(228, 89, 78, .4), 0 0 20px rgba(168, 107, 212, .4);
  position: relative;
  padding-bottom: 12px;
}
.sec-title::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 64px; height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-purple), var(--c-cta));
  box-shadow: 0 0 12px rgba(168, 107, 212, .7);
}
.sec-desc { color: var(--c-dim); font-size: 13.5px; margin-top: 10px; max-width: 620px; }

.more-link {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--c-cta);
  text-shadow: 0 0 10px rgba(84,178,242,.4);
  border-bottom: 1px dashed rgba(84,178,242,.5);
  padding-bottom: 2px;
  transition: letter-spacing .2s, color .2s;
}
.more-link:hover { letter-spacing: .12em; color: var(--c-text); }

/* ---------- 4. 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(21, 15, 14, .92);
  border-bottom: 1px solid var(--c-stroke);
  box-shadow: 0 10px 30px -18px rgba(0,0,0,.9);
  backdrop-filter: blur(6px);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 19px;
  color: var(--c-bg);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--c-primary), var(--c-purple) 55%, var(--c-cta));
  box-shadow: 0 0 14px rgba(168, 107, 212, .55);
}
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: .04em; display: flex; flex-direction: column; line-height: 1.15; }
.brand-sub { font-family: var(--font-body); font-weight: 400; font-size: 10px; letter-spacing: .22em; color: var(--c-dim); }

.main-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-link {
  position: relative;
  font-family: var(--font-body);
  font-size: 13px; letter-spacing: .04em;
  color: var(--c-dim);
  padding: 8px 13px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: color .18s, border-color .18s, text-shadow .18s;
}
.nav-link:hover { color: var(--c-text); border-color: var(--c-stroke); }
.nav-link.active { color: var(--c-accent); border-color: rgba(64,212,198,.4); text-shadow: var(--glow-accent); background: rgba(64,212,198,.06); }
.nav-badge {
  display: inline-grid; place-items: center;
  min-width: 19px; height: 19px; padding: 0 5px;
  font-size: 11px; font-weight: 700;
  color: var(--c-bg);
  background: var(--c-primary);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(228, 89, 78, .6);
  margin-left: 2px;
  vertical-align: 1px;
}

.nav-toggle { display: none; background: none; border: 1px solid var(--c-stroke); border-radius: var(--radius); width: 40px; height: 40px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { width: 18px; height: 2px; background: var(--c-text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 620px; display: flex; align-items: center; padding: 60px 0 90px; }
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(21, 15, 14, .92) 0%, rgba(21, 15, 14, .6) 46%, transparent 72%);
}
.hero-scene { position: absolute; inset: 0; pointer-events: none; }

/* 太阳 */
.sun {
  position: absolute;
  left: 50%; bottom: 96px;
  width: min(430px, 64vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(180deg, #e4594e 0%, #ff7ac0 52%, #a86bd4 88%, #54b2f2 130%);
  box-shadow: 0 0 70px rgba(255, 122, 192, .4), 0 0 150px rgba(168, 107, 212, .35), inset 0 -40px 90px rgba(21, 15, 14, .55);
  animation: sunPulse 6s ease-in-out infinite;
}
.sun::before {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 78%, rgba(21,15,14,.85), transparent 46%),
    repeating-linear-gradient(180deg, transparent 0 22px, rgba(21,15,14,.28) 22px 27px);
}
.sun::after {
  content: '';
  position: absolute; left: -60%; right: -60%; bottom: -40%;
  height: 60%;
  background: linear-gradient(180deg, rgba(21,15,14,.25), var(--c-bg));
  filter: blur(1px);
}
@keyframes sunPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

/* 远山剪影 */
.mountains { position: absolute; left: 0; right: 0; bottom: 118px; height: 180px; opacity: .8; }
.mountains svg { width: 100%; height: 100%; display: block; }

/* 网格地平线 */
.grid-floor {
  position: absolute; left: -20%; right: -20%; bottom: 0;
  height: 190px;
  background:
    linear-gradient(90deg, rgba(84, 178, 242, .32) 0 1px, transparent 1px 56px),
    linear-gradient(180deg, rgba(84, 178, 242, .32) 0 1px, transparent 1px 56px);
  background-size: 56px 56px;
  transform: perspective(430px) rotateX(70deg);
  transform-origin: 50% 0%;
  animation: gridMove 1.1s linear infinite;
  mask-image: linear-gradient(180deg, transparent 0%, #000 38%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 38%, #000 100%);
}
@keyframes gridMove { from { background-position: 0 0, 0 0; } to { background-position: 0 0, 0 56px; } }

/* 地平线上的光带 */
.horizon-glow {
  position: absolute; left: 0; right: 0; bottom: 108px; height: 4px;
  background: linear-gradient(90deg, transparent, var(--c-accent), var(--c-primary), var(--c-accent), transparent);
  box-shadow: 0 0 24px 4px rgba(64, 212, 198, .55);
  opacity: .85;
}

.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-copy { max-width: 640px; }

.hero h1 {
  font-size: clamp(40px, 7vw, 74px);
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.06;
  margin: 6px 0 20px;
}
.hero h1 .grad {
  background: linear-gradient(92deg, var(--c-primary), var(--c-pink) 45%, var(--c-purple) 75%, var(--c-cta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--c-dim); font-size: 14.5px; max-width: 540px; margin-bottom: 28px; }
.hero-sub em { color: var(--c-accent); font-style: normal; text-shadow: var(--glow-accent); }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }

.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b {
  font-family: var(--font-head); font-weight: 700;
  font-size: 30px; line-height: 1.1;
  color: var(--c-text);
  text-shadow: 0 0 12px rgba(84, 178, 242, .7);
}
.stat b i { font-style: normal; color: var(--c-cta); font-size: 18px; }
.stat span { font-size: 11.5px; letter-spacing: .08em; color: var(--c-dim); text-transform: uppercase; }

/* 滚动标题条 */
.ticker {
  border-block: 1px solid var(--c-stroke);
  background: rgba(35, 26, 26, .75);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  padding: 10px 0;
}
.ticker-track { display: inline-flex; gap: 0; animation: tickerScroll 40s linear infinite; will-change: transform; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: 12.5px;
  color: var(--c-dim); letter-spacing: .04em;
  padding: 0 26px;
}
.ticker-item::before { content: '◆'; font-size: 9px; color: var(--c-primary); text-shadow: 0 0 8px rgba(228,89,78,.8); }
.ticker-item b { color: var(--c-accent); font-weight: 500; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 6. 区块布局 ---------- */
.section { padding: 64px 0; }
.section-tint { background: linear-gradient(180deg, transparent, rgba(168, 107, 212, .07) 30%, rgba(228, 89, 78, .05) 70%, transparent); border-block: 1px solid rgba(64, 49, 48, .5); }

/* 年级卡片 */
.grade-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.grade-card {
  position: relative;
  display: block;
  padding: 20px 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-stroke);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.grade-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--c-primary), var(--c-purple));
  box-shadow: 0 0 10px rgba(228, 89, 78, .7);
}
.grade-card:hover { transform: translateY(-5px); border-color: rgba(168, 107, 212, .6); box-shadow: var(--shadow-hover); }
.grade-icon { font-size: 26px; display: block; margin-bottom: 10px; filter: drop-shadow(0 0 8px rgba(168,107,212,.5)); }
.grade-name { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--c-text); }
.grade-sub { font-size: 11.5px; color: var(--c-dim); margin: 4px 0 10px; letter-spacing: .05em; }
.grade-count { font-size: 11px; color: var(--c-cta); text-shadow: 0 0 8px rgba(84,178,242,.5); }
.grade-arrow { position: absolute; right: 14px; top: 18px; color: var(--c-stroke); font-size: 13px; transition: color .2s, transform .2s; }
.grade-card:hover .grade-arrow { color: var(--c-cta); transform: translateX(3px); }

/* 主题云 */
.theme-cloud { display: flex; flex-wrap: wrap; gap: 12px; }
.theme-pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-size: 13px;
  color: var(--c-dim);
  padding: 11px 18px;
  border: 1px solid var(--c-stroke);
  border-radius: var(--radius);
  background: var(--c-surface);
  transition: color .18s, border-color .18s, box-shadow .18s, transform .18s, background .18s;
}
.theme-pill .n { font-size: 11px; color: var(--c-cta); }
.theme-pill:hover { color: var(--c-text); border-color: var(--c-purple); box-shadow: 0 0 16px rgba(168, 107, 212, .35); transform: translateY(-2px); }

/* ---------- 7. 书籍卡片 ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

.book-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-stroke);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.book-card:hover { transform: translateY(-5px); border-color: rgba(168, 107, 212, .65); box-shadow: var(--shadow-hover); }
.book-card.is-read { border-color: rgba(64, 212, 198, .45); }
.book-card.is-read::after {
  content: '✓ 已读';
  position: absolute; top: 0; right: 0; z-index: 3;
  font-family: var(--font-body); font-size: 10.5px; letter-spacing: .1em;
  color: var(--c-bg); background: var(--c-accent);
  padding: 4px 9px;
  border-bottom-left-radius: var(--radius);
  box-shadow: 0 0 12px rgba(64, 212, 198, .6);
}

.book-cover {
  position: relative;
  display: block;
  height: 150px;
  background: linear-gradient(135deg, var(--cv1, var(--c-primary)), var(--cv2, var(--c-purple)));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.book-cover::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(21,15,14,.08) 0 2px, transparent 2px 10px);
}
.book-cover::after {
  content: '';
  position: absolute; left: 10%; right: 10%; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-text), transparent);
  opacity: .5;
}
.book-emoji { font-size: 52px; line-height: 1; filter: drop-shadow(0 6px 14px rgba(21,15,14,.5)); transition: transform .25s; }
.book-card:hover .book-emoji { transform: scale(1.12) rotate(-4deg); }
.book-cat {
  position: absolute; top: 10px; left: 10px;
  font-size: 10.5px; letter-spacing: .08em;
  color: var(--c-bg);
  background: rgba(242, 238, 238, .9);
  padding: 3px 8px;
  border-radius: 3px;
  font-family: var(--font-body);
}

.book-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 15px 15px; flex: 1; }
.book-title { font-size: 16px; font-weight: 700; line-height: 1.35; }
.book-title a { transition: color .18s, text-shadow .18s; }
.book-title a:hover { color: var(--c-accent); text-shadow: var(--glow-accent); }
.book-author { font-size: 12.5px; color: var(--c-dim); }
.book-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.book-age { margin-left: auto; font-size: 11px; color: var(--c-dim); white-space: nowrap; }
.book-foot {
  margin-top: auto; padding-top: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-top: 1px dashed var(--c-stroke);
}
.book-tools { display: inline-flex; gap: 6px; }

.icon-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-size: 15px;
  background: transparent;
  border: 1px solid var(--c-stroke);
  border-radius: var(--radius);
  color: var(--c-dim);
  transition: color .18s, border-color .18s, box-shadow .18s, transform .18s, background .18s;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn.fav.on { color: var(--c-primary); border-color: rgba(228,89,78,.6); background: rgba(228,89,78,.08); box-shadow: 0 0 12px rgba(228,89,78,.4); animation: heartBeat .4s ease; }
.icon-btn.rd.on { color: var(--c-accent); border-color: rgba(64,212,198,.6); background: rgba(64,212,198,.08); box-shadow: 0 0 12px rgba(64,212,198,.4); }
@keyframes heartBeat { 40% { transform: scale(1.25); } 70% { transform: scale(.95); } }

/* ---------- 8. 浏览页 ---------- */
.page-head { padding: 54px 0 8px; }
.page-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }

.filter-bar {
  position: sticky; top: calc(var(--header-h) + 10px); z-index: 30;
  background: rgba(21, 15, 14, .94);
  border: 1px solid var(--c-stroke);
  border-radius: var(--radius);
  padding: 14px;
  margin: 22px 0 8px;
  box-shadow: 0 14px 30px -20px rgba(0,0,0,.9);
  backdrop-filter: blur(6px);
}
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-row + .filter-row { margin-top: 10px; }
.filter-label { font-size: 11px; letter-spacing: .14em; color: var(--c-primary); text-shadow: 0 0 8px rgba(228,89,78,.5); width: 46px; flex-shrink: 0; }

.pill {
  font-family: var(--font-body); font-size: 12.5px;
  color: var(--c-dim);
  padding: 7px 13px;
  background: transparent;
  border: 1px solid var(--c-stroke);
  border-radius: var(--radius);
  transition: color .16s, border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.pill:hover { color: var(--c-text); border-color: var(--c-purple); transform: translateY(-1px); }
.pill.active { color: var(--c-bg); background: var(--c-cta); border-color: var(--c-cta); box-shadow: var(--glow-cta); font-weight: 600; }

.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box input {
  width: 100%;
  font-family: var(--font-body); font-size: 13px;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-stroke);
  border-radius: var(--radius);
  padding: 10px 12px 10px 36px;
  transition: border-color .18s, box-shadow .18s;
}
.search-box input::placeholder { color: var(--c-dim); }
.search-box input:focus { outline: none; border-color: var(--c-cta); box-shadow: 0 0 14px rgba(84,178,242,.35); }
.search-box .s-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--c-cta); font-size: 14px; }

.sort-box { display: flex; align-items: center; gap: 8px; }
.sort-box label { font-size: 11px; letter-spacing: .1em; color: var(--c-dim); }
.sort-box select {
  font-family: var(--font-body); font-size: 12.5px;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-stroke);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.sort-box select:focus { outline: none; border-color: var(--c-accent); }

.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 14px; flex-wrap: wrap; }
.result-count { font-size: 12.5px; color: var(--c-dim); }
.result-count b { color: var(--c-cta); font-weight: 600; text-shadow: 0 0 8px rgba(84,178,242,.5); }

.empty-state {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--c-stroke);
  border-radius: var(--radius);
  color: var(--c-dim);
}
.empty-state .big { font-size: 46px; display: block; margin-bottom: 14px; filter: drop-shadow(0 0 14px rgba(168,107,212,.6)); }
.empty-state h3 { font-family: var(--font-head); font-size: 20px; color: var(--c-text); margin-bottom: 8px; }
.empty-state p { font-size: 13px; max-width: 420px; margin: 0 auto 18px; }

/* ---------- 9. 详情页 ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--c-dim); margin: 26px 0 18px; flex-wrap: wrap; }
.breadcrumb a { color: var(--c-cta); transition: color .15s, text-shadow .15s; }
.breadcrumb a:hover { color: var(--c-text); text-shadow: 0 0 8px rgba(84,178,242,.5); }
.breadcrumb .sep { color: var(--c-stroke); }

.detail-layout { display: grid; grid-template-columns: 340px 1fr; gap: 30px; align-items: start; margin-bottom: 46px; }

.cover-hero {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--c-stroke);
  overflow: hidden;
  background: linear-gradient(135deg, var(--cv1, var(--c-primary)), var(--cv2, var(--c-purple)));
  aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card), 0 0 40px -10px rgba(168, 107, 212, .6);
}
.cover-hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(21,15,14,.07) 0 3px, transparent 3px 12px); }
.cover-hero .book-emoji { font-size: 120px; filter: drop-shadow(0 16px 30px rgba(21,15,14,.55)); }
.cover-hero .cv-tag { position: absolute; top: 14px; left: 14px; font-size: 11px; letter-spacing: .12em; color: var(--c-bg); background: rgba(242,238,238,.92); padding: 5px 10px; border-radius: 3px; font-family: var(--font-body); }
.cover-hero .cv-diff { position: absolute; bottom: 14px; left: 14px; font-size: 11px; color: rgba(242,238,238,.95); text-shadow: 0 0 6px rgba(21,15,14,.9); }
.cover-hero .cv-age { position: absolute; bottom: 14px; right: 14px; font-size: 12px; color: rgba(242,238,238,.95); background: rgba(21,15,14,.45); padding: 4px 9px; border-radius: 3px; }

.detail-body { min-width: 0; }
.detail-kicker { font-size: 12px; letter-spacing: .2em; color: var(--c-accent); text-shadow: var(--glow-accent); margin-bottom: 8px; }
.detail-title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; text-shadow: 0 0 6px rgba(228,89,78,.45), 0 0 24px rgba(168,107,212,.4); margin-bottom: 4px; }
.detail-author { font-size: 15px; color: var(--c-dim); margin-bottom: 14px; }
.detail-author b { color: var(--c-text); font-weight: 500; }

.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.detail-meta .chip { font-size: 12px; padding: 6px 11px; }

.detail-stars { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 13px 15px; background: var(--c-surface); border: 1px solid var(--c-stroke); border-radius: var(--radius); }
.detail-stars .stars .star { font-size: 17px; }
.detail-stars .lbl { font-size: 12px; color: var(--c-dim); margin-left: auto; }

.detail-block { margin-bottom: 22px; }
.detail-block h3 { font-size: 13px; letter-spacing: .16em; color: var(--c-primary); text-shadow: 0 0 10px rgba(228,89,78,.5); margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.detail-block h3::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, var(--c-stroke), transparent); }
.detail-block p { color: var(--c-dim); font-size: 14px; }
.detail-block .intro { color: var(--c-text); font-size: 15px; }

.reason-box { background: linear-gradient(135deg, rgba(168,107,212,.12), rgba(228,89,78,.08)); border: 1px solid rgba(168,107,212,.35); border-radius: var(--radius); padding: 15px 17px; }
.reason-box p { color: var(--c-text); }

.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item { font-family: var(--font-body); font-size: 12px; color: var(--c-cta); border: 1px dashed rgba(84,178,242,.45); padding: 5px 11px; border-radius: var(--radius); }

/* ---------- 10. 书架页 ---------- */
.tab-bar { display: flex; gap: 8px; margin: 24px 0 4px; }
.tab-btn {
  font-family: var(--font-body); font-size: 13.5px; letter-spacing: .06em;
  color: var(--c-dim);
  padding: 11px 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-stroke);
  border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .18s, border-color .18s, box-shadow .18s, background .18s;
}
.tab-btn .n {
  font-size: 11px; color: var(--c-bg); background: var(--c-dim);
  border-radius: 10px; padding: 2px 7px; min-width: 20px; text-align: center;
  transition: background .18s;
}
.tab-btn.active { color: var(--c-bg); background: var(--c-primary); border-color: var(--c-primary); box-shadow: 0 0 16px rgba(228,89,78,.5); }
.tab-btn.active .n { background: rgba(21,15,14,.35); color: var(--c-text); }

.shelf-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 16px; flex-wrap: wrap; }
.shelf-tools .hint { font-size: 12px; color: var(--c-dim); }

/* ---------- 11. 页脚 ---------- */
.site-footer { position: relative; margin-top: 30px; border-top: 1px solid var(--c-stroke); background: linear-gradient(180deg, rgba(35,26,26,.6), rgba(21,15,14,.98)); overflow: hidden; }

/* 页脚网格地平线 */
.footer-horizon {
  position: relative; height: 120px; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(228,89,78,.25) 0 1px, transparent 1px 48px),
    linear-gradient(180deg, rgba(228,89,78,.25) 0 1px, transparent 1px 48px);
  background-size: 48px 48px;
  transform: perspective(380px) rotateX(74deg);
  transform-origin: 50% 100%;
  opacity: .5;
  mask-image: linear-gradient(180deg, transparent 30%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 30%, #000 100%);
}
.footer-horizon::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 30%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-primary), transparent);
  box-shadow: 0 0 16px 2px rgba(228, 89, 78, .5);
}

.footer-grid {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: 46px 22px 34px;
  display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 34px;
}
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.footer-brand .brand-mark { width: 34px; height: 34px; font-size: 16px; }
.footer-brand b { font-family: var(--font-head); font-size: 16px; }
.footer-note { font-size: 12.5px; color: var(--c-dim); max-width: 460px; }
.footer-grid h4 { font-family: var(--font-body); font-size: 12px; letter-spacing: .18em; color: var(--c-accent); margin-bottom: 12px; }
.footer-grid p a { color: var(--c-dim); font-size: 13px; line-height: 2.1; transition: color .15s, text-shadow .15s; }
.footer-grid p a:hover { color: var(--c-text); text-shadow: 0 0 8px rgba(64,212,198,.5); }

.footer-bar {
  position: relative;
  text-align: center;
  font-size: 11.5px; letter-spacing: .12em;
  color: var(--c-dim);
  padding: 16px 20px;
  border-top: 1px solid var(--c-stroke);
}
.footer-bar b { color: var(--c-primary); font-weight: 500; }

/* ---------- 12. 动效 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 13. 响应式 ---------- */
@media (max-width: 960px) {
  .grade-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .cover-hero { max-width: 320px; aspect-ratio: 4 / 5; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 14px; }
  .section { padding: 46px 0; }
  .hero { min-height: 560px; }

  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: calc(var(--header-h) - 4px); left: 12px; right: 12px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(21, 15, 14, .98);
    border: 1px solid var(--c-stroke); border-radius: var(--radius);
    padding: 10px;
    box-shadow: 0 24px 40px -20px rgba(0,0,0,.9);
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-link { text-align: center; }

  .grade-grid { grid-template-columns: repeat(2, 1fr); }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .book-cover { height: 120px; }
  .book-emoji { font-size: 42px; }

  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-stats { gap: 20px; }

  .filter-bar { position: static; }
}
