/* ============================================================
   站点样式 (个人学习研究用途)
   ============================================================ */

:root {
  --qd-red: #bf2c24;
  --qd-red-dark: #a32419;
  --qd-red-light: #fdf3f2;
  --qd-orange: #ff5e1a;
  --text-main: #1a1a1a;
  --text-sub: #666;
  --text-light: #999;
  --border: #e6e6e6;
  --bg-page: #f5f5f5;
  --bg-card: #fff;
  --vip-gold: #bf8f00;
  --vip-bg: #fff7e6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--qd-red); }
img { border: none; vertical-align: middle; }
ul, li { list-style: none; }
em { font-style: normal; }

.wrap { width: 1200px; margin: 0 auto; }
.clearfix::after { content: ""; display: block; clear: both; }

/* ---------------- 顶部信息栏 ---------------- */
.topbar {
  background: #f7f7f7;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-sub);
  height: 34px;
  line-height: 34px;
}
.topbar a { color: var(--text-sub); margin: 0 8px; }
.topbar a:hover { color: var(--qd-red); }
.topbar .sep { color: #ccc; }
.topbar-left { float: left; }
.topbar-right { float: right; }
.topbar-user { color: var(--qd-red); margin: 0 8px; }

/* ---------------- 头部 ---------------- */
.header {
  background: #fff;
  padding: 18px 0 14px;
}
.logo { float: left; display: block; height: 44px; line-height: 44px; margin-right: 40px; }
.logo-qd {
  font-size: 34px;
  font-weight: 700;
  color: var(--qd-red);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 2px;
}
.logo-zw {
  font-size: 20px;
  font-weight: 600;
  color: var(--qd-red);
  margin-left: 4px;
}

.search-box { float: left; width: 460px; margin-top: 2px; }
.search-form { display: flex; }
.search-form input {
  flex: 1;
  height: 36px;
  border: 2px solid var(--qd-red);
  border-right: none;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  border-radius: 3px 0 0 3px;
}
.search-btn {
  width: 88px;
  height: 36px;
  background: var(--qd-red);
  color: #fff;
  border: none;
  font-size: 15px;
  cursor: pointer;
  border-radius: 0 3px 3px 0;
  letter-spacing: 2px;
}
.search-btn:hover { background: var(--qd-red-dark); }
.hot-words { margin-top: 6px; font-size: 12px; color: var(--text-light); }
.hot-words a { color: var(--text-light); margin-right: 12px; }
.hot-words a:hover { color: var(--qd-red); }

.header-actions { float: right; height: 44px; line-height: 44px; }
.ha-item { margin-left: 22px; font-size: 15px; color: #333; }
.ha-item:hover { color: var(--qd-red); }

/* ---------------- 主导航 ---------------- */
.mainnav {
  background: var(--qd-red);
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}
.mainnav .wrap { display: flex; }
.mainnav a {
  display: block;
  height: 42px;
  line-height: 42px;
  padding: 0 30px;
  color: #fff;
  font-size: 16px;
  position: relative;
}
.mainnav a:hover { background: var(--qd-red-dark); color: #fff; }
.mainnav a.active { background: var(--qd-red-dark); font-weight: 600; }
.mainnav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--bg-page);
}

/* ---------------- 主体 ---------------- */
.main { padding: 20px 0 30px; min-height: 60vh; }

.module {
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  padding: 18px 20px 22px;
}
.module-header { margin-bottom: 16px; position: relative; }
.module-title {
  font-size: 20px;
  font-weight: 600;
  border-left: 4px solid var(--qd-red);
  padding-left: 10px;
  display: inline-block;
}
.module-sub { font-size: 12px; color: var(--text-light); margin-left: 12px; }
.module-more { position: absolute; right: 0; top: 6px; font-size: 13px; color: var(--text-sub); }
.module-more:hover { color: var(--qd-red); }

/* ---------------- 英雄区 ---------------- */
.hero { margin-bottom: 20px; }
.hero-carousel {
  float: left;
  width: 760px;
  height: 320px;
  position: relative;
  overflow: hidden;
  background: #eee;
  border: 1px solid var(--border);
}
.carousel-track { position: relative; width: 100%; height: 100%; }
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 20px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.carousel-dots {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  gap: 6px;
}
.carousel-dots .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
}
.carousel-dots .dot.active { background: #fff; }

.hero-side { float: right; width: 420px; }
.side-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  padding: 12px 16px 14px;
}
.side-block:last-child { margin-bottom: 0; }
.side-title {
  font-size: 16px;
  font-weight: 600;
  border-left: 4px solid var(--qd-red);
  padding-left: 8px;
  margin-bottom: 8px;
  position: relative;
}
.side-more { position: absolute; right: 0; font-size: 12px; font-weight: 400; color: var(--text-light); }

.rank-list li {
  display: flex;
  align-items: center;
  height: 30px;
  line-height: 30px;
  font-size: 13px;
}
.rank-no {
  width: 20px; height: 20px;
  line-height: 20px;
  text-align: center;
  background: #e0e0e0;
  color: #fff;
  font-size: 12px;
  margin-right: 10px;
  flex: none;
}
.rank-no.top1 { background: var(--qd-red); }
.rank-no.top2 { background: var(--qd-orange); }
.rank-no.top3 { background: #f0b34a; }
.rank-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rank-author { color: var(--text-light); font-size: 12px; margin-left: 8px; max-width: 110px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.notice-list li { height: 28px; line-height: 28px; font-size: 13px; color: var(--text-sub); }
.notice-list li::before { content: "· "; color: var(--qd-red); }
.notice-list a { color: var(--text-sub); }

/* ---------------- 书籍卡片 ---------------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px 16px;
}
.book-card { position: relative; }
.book-cover {
  display: block;
  position: relative;
  border: 1px solid #ececec;
  border-radius: 3px;
  overflow: hidden;
  background: #fafafa;
}
.book-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.book-cover:hover img { transform: scale(1.04); }
.book-cover.sm img { aspect-ratio: 3 / 4; }
.book-info { padding: 6px 2px 0; }
.book-name {
  display: block;
  font-size: 14px;
  color: var(--text-main);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.book-name:hover { color: var(--qd-red); }
.book-author { font-size: 12px; color: var(--text-light); }

.free-tag {
  position: absolute;
  left: 0; top: 0;
  background: linear-gradient(90deg, var(--qd-orange), #ff8a3d);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 0 0 8px 0;
}

/* 限免横排 */
.free-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.free-card { text-align: center; }
.free-card .book-name { text-align: center; }
.free-card .book-author { display: block; text-align: center; }

/* 宽卡片 (新书/完本) */
.wide-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.wide-card { display: flex; gap: 14px; }
.wide-card .book-cover { width: 132px; flex: none; }
.wide-info { flex: 1; min-width: 0; position: relative; padding-bottom: 26px; }
.wide-info .book-name { font-size: 16px; font-weight: 600; }
.book-meta { font-size: 12px; color: var(--text-light); margin: 4px 0 6px; }
.book-desc {
  font-size: 12px;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wide-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.read-btn {
  background: var(--qd-red);
  color: #fff !important;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 3px;
}
.read-btn:hover { background: var(--qd-red-dark); }

/* 分类推荐 tabs */
.cat-tabs { border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.cat-tab {
  display: inline-block;
  padding: 6px 18px;
  font-size: 15px;
  color: var(--text-sub);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cat-tab:hover { color: var(--qd-red); }
.cat-tab.active { color: var(--qd-red); border-bottom-color: var(--qd-red); font-weight: 600; }
.cat-tab-panel { display: none; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat-tab-panel.active { display: grid; }
.cat-book { display: flex; gap: 10px; }
.cat-book .book-cover { width: 78px; flex: none; }
.cat-book-info { flex: 1; min-width: 0; padding-top: 4px; }

/* ---------------- 页面标题 ---------------- */
.page-title {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.page-title h1 { font-size: 20px; font-weight: 600; }
.page-title p { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ---------------- 排行榜 ---------------- */
.rank-tabs { background: var(--bg-card); border: 1px solid var(--border); padding: 10px 20px 0; margin-bottom: 16px; }
.rank-tab {
  display: inline-block;
  padding: 6px 20px;
  font-size: 16px;
  color: var(--text-sub);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.rank-tab:hover { color: var(--qd-red); }
.rank-tab.active { color: var(--qd-red); border-bottom-color: var(--qd-red); font-weight: 600; }
.rank-filter { background: var(--bg-card); border: 1px solid var(--border); padding: 10px 20px; margin-bottom: 16px; font-size: 13px; }
.rank-filter a { display: inline-block; padding: 2px 12px; color: var(--text-sub); margin-right: 6px; border-radius: 3px; }
.rank-filter a:hover { color: var(--qd-red); }
.rank-filter a.active { background: var(--qd-red); color: #fff; }

.rank-table { background: var(--bg-card); border: 1px solid var(--border); padding: 6px 20px; }
.rank-row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.rank-row:last-child { border-bottom: none; }
.rank-cell-no {
  width: 34px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-light);
  text-align: center;
  flex: none;
}
.rank-cell-no.top { color: var(--qd-red); }
.rank-cell-cover { width: 84px; flex: none; margin: 0 14px; }
.rank-cell-cover img { width: 84px; aspect-ratio: 3/4; object-fit: cover; border: 1px solid #eee; border-radius: 3px; }
.rank-cell-main { flex: 1; min-width: 0; }
.rank-cell-name { font-size: 16px; font-weight: 600; }
.rank-cell-name:hover { color: var(--qd-red); }
.rank-cell-meta { font-size: 12px; color: var(--text-light); margin: 4px 0; }
.rank-cell-meta a { color: #888; }
.rank-cell-meta a:hover { color: var(--qd-red); }
.rank-cell-meta em { margin: 0 6px; color: #ddd; }
.rank-cnt { color: var(--qd-orange); }
.rank-cell-desc {
  font-size: 12px;
  color: var(--text-sub);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 640px;
}
.rank-cell-btn {
  flex: none;
  margin-left: 16px;
  border: 1px solid var(--qd-red);
  color: var(--qd-red);
  font-size: 13px;
  padding: 5px 16px;
  border-radius: 3px;
}
.rank-cell-btn:hover { background: var(--qd-red); color: #fff; }

/* ---------------- 分类 ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cat-card { background: var(--bg-card); border: 1px solid var(--border); padding: 16px 18px; }
.cat-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.cat-name { font-size: 18px; font-weight: 600; }
.cat-num { font-size: 12px; color: var(--text-light); }
.cat-card-subs { line-height: 2; }
.cat-card-subs a { font-size: 13px; color: var(--text-sub); margin-right: 14px; }
.cat-card-subs a:hover { color: var(--qd-red); }
.cat-card-more { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--qd-red); }

.cat-sub-filter { background: var(--bg-card); border: 1px solid var(--border); padding: 10px 20px; margin-bottom: 16px; font-size: 13px; }
.cat-sub-filter a { display: inline-block; padding: 2px 12px; color: var(--text-sub); margin-right: 6px; border-radius: 3px; }
.cat-sub-filter a:hover { color: var(--qd-red); }
.cat-sub-filter a.active { background: var(--qd-red); color: #fff; }

/* ---------------- 书籍列表 ---------------- */
.book-list { background: var(--bg-card); border: 1px solid var(--border); padding: 6px 20px; }
.book-row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.book-row:last-child { border-bottom: none; }
.book-row-cover { width: 96px; flex: none; margin-right: 16px; }
.book-row-cover img { width: 96px; aspect-ratio: 3/4; object-fit: cover; border: 1px solid #eee; border-radius: 3px; }
.book-row-main { flex: 1; min-width: 0; }
.book-row-name { font-size: 16px; font-weight: 600; }
.book-row-name:hover { color: var(--qd-red); }
.book-row-meta { font-size: 12px; color: var(--text-light); margin: 4px 0; }
.book-row-meta a { color: #888; }
.book-row-meta a:hover { color: var(--qd-red); }
.book-row-meta em { margin: 0 6px; color: #ddd; }
.book-row-desc {
  font-size: 12px;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-row-btn {
  flex: none;
  margin-left: 16px;
  border: 1px solid var(--qd-red);
  color: var(--qd-red);
  font-size: 13px;
  padding: 5px 16px;
  border-radius: 3px;
}
.book-row-btn:hover { background: var(--qd-red); color: #fff; }

/* ---------------- 分页 ---------------- */
.pager { text-align: center; margin: 18px 0; font-size: 13px; }
.pager a {
  display: inline-block;
  border: 1px solid var(--border);
  background: #fff;
  padding: 5px 14px;
  margin: 0 4px;
  color: var(--text-sub);
  border-radius: 3px;
}
.pager a:hover { border-color: var(--qd-red); color: var(--qd-red); }
.pager-cur { margin: 0 8px; color: var(--text-light); }

.empty { text-align: center; color: var(--text-light); padding: 40px 0; font-size: 14px; }
.empty a { color: var(--qd-red); }

/* ---------------- 书籍详情 ---------------- */
.book-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
}
.book-detail-cover { float: left; width: 200px; margin-right: 28px; }
.book-detail-cover img {
  width: 200px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border: 1px solid #eee;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.book-detail-info { margin-left: 228px; }
.bd-title { font-size: 26px; font-weight: 700; margin-bottom: 10px; }
.bd-author { font-size: 14px; color: var(--text-sub); margin-bottom: 8px; }
.bd-author a { color: #555; }
.bd-author a:hover { color: var(--qd-red); }
.bd-meta { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
.bd-meta em { margin: 0 8px; color: #ddd; }
.bd-stats { display: flex; gap: 36px; margin-bottom: 18px; }
.bd-stat b { display: block; font-size: 20px; color: var(--qd-red); }
.bd-stat span { font-size: 12px; color: var(--text-light); }
.bd-actions { margin-bottom: 12px; }
.btn-primary {
  display: inline-block;
  background: var(--qd-red);
  color: #fff !important;
  font-size: 15px;
  padding: 9px 34px;
  border-radius: 4px;
  margin-right: 12px;
}
.btn-primary:hover { background: var(--qd-red-dark); }
.btn-ghost {
  display: inline-block;
  border: 1px solid var(--qd-red);
  color: var(--qd-red);
  font-size: 14px;
  padding: 8px 22px;
  border-radius: 4px;
  margin-right: 12px;
  background: #fff;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--qd-red-light); }
.btn-ghost.sm { font-size: 12px; padding: 4px 12px; }
.bd-update { font-size: 12px; color: var(--text-light); }
.bd-latest { font-size: 13px; color: var(--text-sub); margin-top: 4px; }
.bd-latest a { color: #555; }
.bd-latest a:hover { color: var(--qd-red); }

.book-intro {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 18px 24px;
  margin-bottom: 16px;
  position: relative;
}
.book-intro h3 { font-size: 16px; margin-bottom: 8px; }
.intro-content {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.9;
  max-height: 100px;
  overflow: hidden;
  position: relative;
}
.intro-content.expanded { max-height: none; }
.intro-toggle {
  position: absolute;
  right: 24px;
  bottom: 14px;
  background: #fff;
  color: var(--qd-red);
  font-size: 13px;
  padding-left: 20px;
}

.book-tabs { background: var(--bg-card); border: 1px solid var(--border); border-bottom: none; padding: 0 24px; }
.bd-tab {
  display: inline-block;
  padding: 12px 26px;
  font-size: 16px;
  color: var(--text-sub);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.bd-tab:hover { color: var(--qd-red); }
.bd-tab.active { color: var(--qd-red); border-bottom-color: var(--qd-red); font-weight: 600; }

.book-panel { background: var(--bg-card); border: 1px solid var(--border); padding: 8px 24px 20px; display: none; }
.book-panel.active { display: block; }

.volume-block { margin-top: 14px; }
.volume-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: #fafafa;
  padding: 8px 12px;
  border-left: 3px solid var(--qd-red);
  font-size: 15px;
  font-weight: 600;
}
.volume-title em { font-size: 12px; color: var(--text-light); font-weight: 400; }
.chapter-list { display: grid; grid-template-columns: repeat(2, 1fr); }
.chapter-item { border-bottom: 1px dashed #f0f0f0; }
.chapter-link {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  font-size: 14px;
  color: #333;
}
.chapter-link:hover { background: #fafafa; color: var(--qd-red); }
.chapter-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chapter-meta { font-size: 12px; color: var(--text-light); margin-left: 12px; flex: none; }
.chapter-item.vip .chapter-name { color: #8a6d3a; }
.lock-icon {
  display: inline-block;
  width: 16px; height: 16px;
  line-height: 16px;
  text-align: center;
  font-size: 10px;
  background: var(--vip-gold);
  color: #fff;
  border-radius: 2px;
  margin-right: 8px;
  flex: none;
}
.vip-badge {
  display: inline-block;
  font-size: 10px;
  color: var(--vip-gold);
  border: 1px solid var(--vip-gold);
  border-radius: 2px;
  padding: 0 4px;
  margin-left: 8px;
  flex: none;
}

/* ---------------- 阅读页 ---------------- */
.reader { background: var(--bg-card); border: 1px solid var(--border); padding: 24px 40px 34px; }
.reader-topbar { font-size: 13px; color: var(--text-light); padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.reader-topbar a { color: var(--text-sub); }
.reader-topbar a:hover { color: var(--qd-red); }
.reader-topbar em { margin: 0 8px; color: #ccc; }
.reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.reader-back { font-size: 14px; color: var(--text-sub); }
.reader-back:hover { color: var(--qd-red); }
.reader-nav { display: flex; gap: 10px; }
.reader-body { padding: 20px 0 10px; }
.reader-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 10px; }
.reader-meta { text-align: center; font-size: 12px; color: var(--text-light); margin-bottom: 26px; }
.reader-meta .dot { margin: 0 8px; }
.author-say { color: var(--qd-orange); }
.reader-content { font-size: 18px; line-height: 2; color: #262626; text-align: justify; }
.reader-content p { text-indent: 2em; margin-bottom: 8px; }
.reader-footer-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}
.reader-footer-nav .btn-ghost { max-width: 45%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.reader-footer-nav .next { margin-right: 0; }
.reader-vip-tip {
  margin-top: 20px;
  background: var(--vip-bg);
  border: 1px solid #ffe7ba;
  color: #8a6d3a;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
}
.reader-vip-tip a { color: var(--qd-red); font-weight: 600; }

/* VIP 锁定 */
.reader-locked { background: var(--bg-card); border: 1px solid var(--border); padding: 60px 20px; }
.locked-box { max-width: 460px; margin: 0 auto; text-align: center; }
.locked-icon {
  width: 72px; height: 72px;
  line-height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd666, #bf8f00);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}
.locked-box h2 { font-size: 22px; margin-bottom: 12px; }
.locked-box p { font-size: 14px; color: var(--text-sub); margin-bottom: 8px; }
.locked-note { font-size: 12px !important; color: var(--text-light) !important; }
.locked-actions { margin-top: 24px; }

/* VIP 章节试读 + 付费墙 */
.vip-flag {
  color: var(--vip-gold);
  border: 1px solid var(--vip-gold);
  border-radius: 2px;
  padding: 0 6px;
  font-size: 12px;
}
.reader-content.vip-preview {
  max-height: 480px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}
.vip-paywall {
  margin-top: 24px;
  background: var(--vip-bg);
  border: 1px solid #ffe7ba;
  border-radius: 6px;
  padding: 28px 20px;
  text-align: center;
}
.paywall-icon {
  width: 56px; height: 56px;
  line-height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd666, #bf8f00);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}
.vip-paywall p { font-size: 15px; color: #8a6d3a; margin-bottom: 6px; }
.paywall-note { font-size: 12px !important; color: #b08c4a !important; }
.paywall-actions { margin-top: 18px; }

/* ---------------- 静态页 ---------------- */
.static-page { background: var(--bg-card); border: 1px solid var(--border); padding: 24px 30px; line-height: 2; color: var(--text-sub); }
.static-page h2 { color: var(--text-main); margin: 14px 0 6px; }
.static-page ul { padding-left: 20px; }
.static-page li { list-style: disc; }

/* ---------------- 404 ---------------- */
.notfound { text-align: center; padding: 100px 0; }
.notfound h1 { font-size: 72px; color: var(--qd-red); }
.notfound p { color: var(--text-sub); margin: 10px 0 26px; }

/* ---------------- 搜索热词 ---------------- */
.search-hot { background: var(--bg-card); border: 1px solid var(--border); padding: 12px 20px; margin-bottom: 16px; font-size: 13px; }
.search-hot-label { color: var(--text-light); margin-right: 10px; }
.search-hot a { display: inline-block; color: var(--text-sub); margin-right: 14px; }
.search-hot a:hover { color: var(--qd-red); }

/* ---------------- 书架 ---------------- */
.shelf-remove { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--text-light); }
.shelf-remove:hover { color: var(--qd-red); }

/* ---------------- 页脚 ---------------- */
.footer { background: #2b2f33; color: #9aa0a6; margin-top: 20px; padding: 30px 0 24px; font-size: 12px; }
.footer-links { display: flex; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid #3a3f44; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: #9aa0a6; }
.footer-col a:hover { color: #fff; }
.footer-copy { text-align: center; padding-top: 20px; line-height: 2; color: #7a8085; }

/* ---------------- 登录页 (中性风格, 不含站点标识) ---------------- */
.login-page { background: #fff; }
.login-banner {
  background: linear-gradient(135deg, #eceff1 0%, #f7f8f9 55%, #f0f2f4 100%);
  min-height: 520px;
  position: relative;
}
.login-panel {
  position: absolute;
  right: 12%;
  top: 60px;
  width: 380px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  padding: 28px 30px 24px;
}
.login-tabs { margin-bottom: 20px; }
.login-tab { font-size: 17px; font-weight: 600; color: #333; border-bottom: 2px solid #333; padding-bottom: 8px; display: inline-block; }
.login-error {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.login-field { margin-bottom: 14px; }
.login-field input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}
.login-field input:focus { border-color: #555; }
.login-submit {
  width: 100%;
  height: 42px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  letter-spacing: 4px;
  cursor: pointer;
  margin-top: 6px;
}
.login-submit:hover { background: #000; }
.login-submit:disabled { background: #999; cursor: not-allowed; }
.login-tip { margin-top: 18px; font-size: 12px; color: var(--text-light); line-height: 1.8; }
.login-footer { margin-top: 0; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1240px) {
  .wrap { width: 98%; }
  .hero-carousel { width: 62%; }
  .hero-side { width: 36%; }
}
@media (max-width: 980px) {
  .book-grid, .free-row, .cat-tab-panel { grid-template-columns: repeat(4, 1fr); }
  .wide-row { grid-template-columns: 1fr; }
  .chapter-list { grid-template-columns: 1fr; }
  .hero-carousel, .hero-side { float: none; width: 100%; }
  .hero-carousel { margin-bottom: 10px; }
  .cat-grid { grid-template-columns: 1fr; }
  .search-box { width: 300px; }
  .header-actions { display: none; }
}
