/* ========== 慧谷阅读 全站样式 ========== */
@charset "utf-8";

:root {
  --primary: #C8161D;
  --primary-dark: #8B0000;
  --primary-light: #E8453D;
  --gold: #D4A24C;
  --gold-light: #E8C887;
  --ink: #2C2C2C;
  --ink-light: #5A5A5A;
  --bg: #FAF7F2;
  --bg-card: #FFFFFF;
  --border: #E8E0D5;
  --shadow: 0 2px 12px rgba(140, 30, 30, 0.08);
  --shadow-hover: 0 6px 20px rgba(140, 30, 30, 0.15);
  --radius: 8px;
}

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

body {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.container { width: 1200px; max-width: 92%; margin: 0 auto; }

/* ===== 顶部公告条 ===== */
.top-bar {
  background: #f0ebe2;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-light);
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
}
.top-bar a { color: var(--ink-light); }
.top-bar .welcome span { color: var(--primary); margin: 0 4px; }
.top-bar .links a { margin-left: 14px; }

/* ===== 头部 ===== */
.header {
  background: #fff;
  border-bottom: 3px solid var(--primary);
}
.header .container {
  display: flex;
  align-items: center;
  height: 90px;
  gap: 30px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-mark {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: bold;
  box-shadow: 0 3px 8px rgba(200, 22, 29, 0.3);
}
.logo-text { line-height: 1.2; }
.logo-text .name { font-size: 24px; font-weight: bold; color: var(--ink); letter-spacing: 2px; }
.logo-text .slogan { font-size: 12px; color: var(--ink-light); letter-spacing: 1px; }

.search-box {
  flex: 1;
  max-width: 560px;
  display: flex;
  border: 2px solid var(--primary);
  border-radius: 4px;
  overflow: hidden;
}
.search-box input {
  flex: 1;
  border: none;
  padding: 0 16px;
  height: 40px;
  font-size: 14px;
  outline: none;
}
.search-box .hot-words { font-size: 12px; color: var(--ink-light); margin-left: 12px; align-self: center; }
.search-box .hot-words a { margin-right: 10px; }
.search-box button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 28px;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s;
}
.search-box button:hover { background: var(--primary-dark); }

.header-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  border: 1px solid transparent;
  text-align: center;
  line-height: 1.4;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: #b88a3a; color: #fff; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-block { display: block; width: 100%; }

/* ===== 主导航 ===== */
.nav {
  background: var(--primary);
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}
.nav .container {
  display: flex;
  height: 48px;
  align-items: stretch;
}
.nav a {
  color: #fff;
  padding: 0 22px;
  display: flex;
  align-items: center;
  font-size: 15px;
  position: relative;
  transition: background .2s;
}
.nav a:hover, .nav a.active {
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
}
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 13px;
  color: var(--ink-light);
}
.breadcrumb a { color: var(--ink-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: #ccc; }

/* ===== 页面标题区 ===== */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(212,162,76,0.25), transparent 70%);
  border-radius: 50%;
}
.page-banner h1 { font-size: 30px; letter-spacing: 4px; margin-bottom: 8px; }
.page-banner p { font-size: 14px; opacity: 0.85; letter-spacing: 1px; }

/* ===== 区块通用 ===== */
.section { padding: 30px 0; }
.section-gray { background: #f5f1ea; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.section-head h2 {
  font-size: 22px;
  color: var(--ink);
  position: relative;
  padding-left: 14px;
}
.section-head h2::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 22px;
  background: var(--primary);
  border-radius: 2px;
}
.section-head .more { font-size: 13px; color: var(--ink-light); }
.section-head .more:hover { color: var(--primary); }

/* ===== 首页轮播 ===== */
.hero {
  position: relative;
  height: 380px;
  background: linear-gradient(135deg, #8B0000, #C8161D);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1s;
  display: flex;
  align-items: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide .slide-bg {
  position: absolute; inset: 0;
  opacity: 0.25;
}
.hero-slide .container { position: relative; z-index: 2; color: #fff; }
.hero-slide h2 { font-size: 38px; margin-bottom: 16px; letter-spacing: 3px; }
.hero-slide p { font-size: 16px; max-width: 560px; line-height: 1.9; opacity: 0.9; }
.hero-dots {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 5;
}
.hero-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all .3s;
}
.hero-dots span.active { background: var(--gold); width: 28px; border-radius: 5px; }

/* ===== 图书卡片网格 ===== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.book-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all .3s;
  cursor: pointer;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.book-cover {
  width: 100%;
  aspect-ratio: 3/4;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.book-cover .cover-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.4;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.book-cover .cover-author {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  font-size: 11px;
  opacity: 0.85;
}
/* 封面图片样式 */
.book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  z-index: 3;
}
/* 有图片时隐藏 CSS 封面文字层（图片失败移除 has-img 后回退显示） */
.book-cover.has-img, .cover.has-img { padding: 0; }
.book-cover.has-img .cover-deco,
.book-cover.has-img .cover-title,
.book-cover.has-img .cover-author,
.cover.has-img .cover-deco,
.cover.has-img > div:not(.book-cover-img) { display: none; }
/* 详情页大封面图片 */
.book-detail .cover-wrap .cover.has-img .book-cover-img { position: static; height: 100%; }
.read-block .cover.has-img .book-cover-img { position: static; height: 100%; }

.book-cover .cover-deco {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 4px;
}
.book-info { padding: 10px 12px 14px; }
.book-info .title {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.book-info .meta {
  font-size: 12px;
  color: var(--ink-light);
  display: flex;
  justify-content: space-between;
}
.book-info .price { color: var(--primary); font-weight: bold; }

/* 图书封面配色 */
.c-red { background: linear-gradient(135deg, #C8161D, #8B0000); }
.c-blue { background: linear-gradient(135deg, #1E5A8A, #0F3460); }
.c-green { background: linear-gradient(135deg, #2E7D5B, #1B5E20); }
.c-gold { background: linear-gradient(135deg, #D4A24C, #8B6914); }
.c-purple { background: linear-gradient(135deg, #6B3A7A, #3E1F47); }
.c-teal { background: linear-gradient(135deg, #1A8A8A, #0E5252); }
.c-brown { background: linear-gradient(135deg, #6B4423, #3E2613); }
.c-slate { background: linear-gradient(135deg, #4A5568, #2D3748); }

/* ===== 大图阅读块（首页用） ===== */
.read-block {
  display: flex;
  gap: 24px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 24px;
}
.read-block .cover {
  width: 140px;
  flex-shrink: 0;
  aspect-ratio: 3/4;
  border-radius: 6px;
  overflow: hidden;
}
.read-block .detail { flex: 1; }
.read-block .detail h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--ink);
}
.read-block .detail .author { color: var(--ink-light); font-size: 13px; margin-bottom: 10px; }
.read-block .detail .desc {
  color: var(--ink-light);
  font-size: 14px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.read-block .detail .tags { margin-top: 12px; }
.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  border-radius: 12px;
  background: #f5f1ea;
  color: var(--ink-light);
  margin-right: 6px;
}
.tag.tag-hot { background: #fde8e8; color: var(--primary); }
.tag.tag-new { background: #e8f5e9; color: #2E7D5B; }

/* ===== 分类导航卡片 ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.category-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all .3s;
  cursor: pointer;
  border: 1px solid var(--border);
}
.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.category-card .icon {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.category-card .name { font-size: 15px; font-weight: 500; color: var(--ink); }
.category-card .count { font-size: 12px; color: var(--ink-light); margin-top: 4px; }

/* ===== 数据统计条 ===== */
.stats-bar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 36px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-item .num { font-size: 32px; font-weight: bold; color: var(--gold-light); }
.stat-item .label { font-size: 14px; opacity: 0.85; margin-top: 4px; }

/* ===== 页脚 ===== */
.footer {
  background: #2C2C2C;
  color: #b0b0b0;
  padding: 36px 0 0;
  margin-top: 40px;
  font-size: 13px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid #3a3a3a;
}
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #b0b0b0; }
.footer-col a:hover { color: var(--gold); }
.footer-col .contact-line { margin-bottom: 8px; line-height: 1.7; }
.footer-col .qr {
  width: 96px; height: 96px;
  background: #fff;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: 11px; text-align: center;
  margin-top: 8px;
}
.footer-bottom {
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: #888;
  line-height: 1.9;
}
.footer-bottom a { color: #888; margin: 0 6px; }
.footer-bottom a:hover { color: var(--gold); }
.gov-links { margin-top: 8px; }
.gov-links img { height: 36px; display: inline-block; margin: 0 6px; opacity: 0.7; }

/* ===== 表单通用 ===== */
.form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  max-width: 560px;
  margin: 0 auto;
}
.form-card.wide { max-width: 860px; }
.form-title {
  text-align: center;
  font-size: 22px;
  margin-bottom: 24px;
  color: var(--ink);
}
.form-title::after {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: var(--primary);
  margin: 10px auto 0;
  border-radius: 2px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.form-group label .req { color: var(--primary); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: border-color .2s;
  outline: none;
}
.form-control:focus { border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 12px; color: var(--ink-light); margin-top: 6px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.form-check input { width: 16px; height: 16px; accent-color: var(--primary); }
.captcha-box { display: flex; gap: 10px; }
.captcha-box .form-control { flex: 1; }
.captcha-img {
  width: 110px; height: 42px;
  background: linear-gradient(135deg, #f0ebe2, #e8e0d5);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: bold; letter-spacing: 4px;
  color: var(--primary-dark);
  font-style: italic;
  cursor: pointer;
  user-select: none;
}

/* ===== Tab 选项卡 ===== */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  gap: 4px;
}
.tab {
  padding: 12px 24px;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== 筛选条 ===== */
.filter-bar {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.filter-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  gap: 12px;
}
.filter-row:last-child { border-bottom: none; }
.filter-row .label {
  font-size: 13px;
  color: var(--ink-light);
  flex-shrink: 0;
  width: 70px;
}
.filter-row .options { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  padding: 4px 14px;
  font-size: 13px;
  border-radius: 14px;
  color: var(--ink-light);
  cursor: pointer;
  transition: all .2s;
}
.filter-chip:hover { color: var(--primary); }
.filter-chip.active { background: var(--primary); color: #fff; }

/* ===== 列表/表格 ===== */
.data-table {
  width: 100%;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.data-table table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: #f5f1ea;
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.data-table tr:hover td { background: #fdfbf7; }
.data-table tr:last-child td { border-bottom: none; }

/* 状态标签 */
.status {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  border-radius: 12px;
}
.status-pending { background: #fff4e0; color: #b8800f; }
.status-pass { background: #e8f5e9; color: #2E7D5B; }
.status-reject { background: #fde8e8; color: var(--primary); }
.status-review { background: #e3f2fd; color: #1565C0; }

/* ===== 充值套餐卡片 ===== */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 30px 0;
}
.plan-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  text-align: center;
  padding: 28px 20px;
  position: relative;
  transition: all .3s;
  cursor: pointer;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.plan-card.featured { border-color: var(--primary); }
.plan-card.featured::before {
  content: '推荐';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  padding: 3px 16px;
  border-radius: 12px;
}
.plan-card .plan-name { font-size: 16px; color: var(--ink-light); margin-bottom: 12px; }
.plan-card .plan-price {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary);
}
.plan-card .plan-price .unit { font-size: 14px; font-weight: normal; }
.plan-card .plan-old { font-size: 13px; color: #bbb; text-decoration: line-through; margin: 6px 0; }
.plan-card .plan-desc { font-size: 13px; color: var(--ink-light); margin: 14px 0; min-height: 40px; }
.plan-card .plan-features { text-align: left; margin-bottom: 20px; }
.plan-card .plan-features li {
  font-size: 13px; color: var(--ink-light);
  padding: 4px 0 4px 22px;
  position: relative;
}
.plan-card .plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2E7D5B;
  font-weight: bold;
}

/* 支付方式 */
.pay-methods {
  display: flex;
  gap: 16px;
  margin: 20px 0;
}
.pay-method {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all .2s;
}
.pay-method.active { border-color: var(--primary); background: #fdf7f7; }
.pay-method .pay-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.pay-method .pay-name { font-size: 14px; font-weight: 500; }
.pay-method .pay-desc { font-size: 12px; color: var(--ink-light); }
.pay-method .pay-radio {
  margin-left: auto;
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  position: relative;
}
.pay-method.active .pay-radio { border-color: var(--primary); }
.pay-method.active .pay-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--primary);
  border-radius: 50%;
}

/* ===== 图书详情页 ===== */
.book-detail {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  display: flex;
  gap: 36px;
  margin-bottom: 24px;
}
.book-detail .cover-wrap {
  width: 220px;
  flex-shrink: 0;
}
.book-detail .cover-wrap .cover {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.book-detail .cover-wrap .actions { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.book-detail .info { flex: 1; }
.book-detail .info h1 { font-size: 26px; margin-bottom: 8px; }
.book-detail .info .sub { color: var(--ink-light); font-size: 14px; margin-bottom: 16px; }
.book-detail .info .meta-list {
  background: #faf7f2;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.book-detail .info .meta-list .meta-item {
  display: flex;
  padding: 5px 0;
  font-size: 14px;
}
.book-detail .info .meta-list .meta-item .k {
  width: 80px;
  color: var(--ink-light);
  flex-shrink: 0;
}
.book-detail .info .intro { font-size: 14px; color: var(--ink); line-height: 1.9; }
.book-detail .info .intro p { margin-bottom: 10px; }

/* ===== 阅读器 ===== */
.reader {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  min-height: 600px;
}
.reader-toc {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 20px 0;
  overflow-y: auto;
}
.reader-toc h4 { padding: 0 20px 12px; font-size: 15px; border-bottom: 1px solid var(--border); }
.reader-toc .toc-item {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--ink-light);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .2s;
}
.reader-toc .toc-item:hover { background: #faf7f2; color: var(--primary); }
.reader-toc .toc-item.active { background: #fdf7f7; color: var(--primary); border-left-color: var(--primary); font-weight: 500; }
.reader-body {
  flex: 1;
  padding: 40px 50px;
}
.reader-body h2 { font-size: 22px; margin-bottom: 24px; text-align: center; }
.reader-body p {
  font-size: 16px;
  line-height: 2;
  text-indent: 2em;
  margin-bottom: 16px;
  color: #333;
}
.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 50px;
  background: #faf7f2;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.reader-toolbar .tools { display: flex; gap: 12px; align-items: center; }
.reader-toolbar .tool-btn {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-light);
}
.reader-toolbar .tool-btn:hover { color: var(--primary); border-color: var(--primary); }

/* ===== 需求/发布卡片列表 ===== */
.demand-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.demand-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  transition: all .2s;
  border-left: 4px solid var(--primary);
}
.demand-card:hover { box-shadow: var(--shadow-hover); }
.demand-card .dc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.demand-card .dc-title { font-size: 16px; font-weight: 500; color: var(--ink); }
.demand-card .dc-meta { font-size: 12px; color: var(--ink-light); margin-bottom: 10px; }
.demand-card .dc-meta span { margin-right: 14px; }
.demand-card .dc-desc { font-size: 14px; color: var(--ink-light); line-height: 1.7; }
.demand-card .dc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.demand-card .dc-user { font-size: 13px; color: var(--ink-light); }
.demand-card .dc-time { font-size: 12px; color: #aaa; }

/* ===== 联系方式页 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.contact-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}
.contact-card .icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.contact-card h3 { font-size: 17px; margin-bottom: 8px; }
.contact-card .info { font-size: 14px; color: var(--ink-light); line-height: 1.8; }
.contact-card .info strong { color: var(--primary); font-size: 18px; }
.map-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f1ea, #e8e0d5);
  color: var(--ink-light);
  position: relative;
  overflow: hidden;
}
.map-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,22,29,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,22,29,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}
.map-pin {
  position: relative;
  z-index: 2;
  text-align: center;
}
.map-pin .pin-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(200,22,29,0.4);
}
.map-pin .pin-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
}
.pagination a, .pagination span {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  color: var(--ink-light);
  padding: 0 10px;
  cursor: pointer;
  background: #fff;
}
.pagination a:hover, .pagination .active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination .disabled {
  color: #ccc;
  cursor: not-allowed;
  background: #f7f7f7;
}
.pagination .ellipsis {
  border: none;
  background: transparent;
  cursor: default;
  letter-spacing: 2px;
}

/* ===== 搜索自动补全 ===== */
.search-box { position: relative; }
.search-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 420px;
  overflow-y: auto;
  z-index: 100;
}
.suggest-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background .15s;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item.active { background: #faf2f2; }
.suggest-cover {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: #f5f1ea;
}
.suggest-info { flex: 1; min-width: 0; }
.suggest-title {
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.suggest-meta {
  font-size: 12px;
  color: var(--ink-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 提示框 ===== */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-info { background: #e3f2fd; color: #1565C0; border-left: 4px solid #1565C0; }
.alert-success { background: #e8f5e9; color: #2E7D5B; border-left: 4px solid #2E7D5B; }
.alert-warning { background: #fff4e0; color: #b8800f; border-left: 4px solid #b8800f; }

/* ===== 侧边布局 ===== */
.layout-2col {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
}
.side-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.side-card h3 { font-size: 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.side-card .rank-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.side-card .rank-item:last-child { border-bottom: none; }
.side-card .rank-num {
  width: 22px; height: 22px;
  flex-shrink: 0;
  background: #ccc;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold;
}
.side-card .rank-item:nth-child(1) .rank-num { background: var(--primary); }
.side-card .rank-item:nth-child(2) .rank-num { background: #e67e22; }
.side-card .rank-item:nth-child(3) .rank-num { background: #f39c12; }
.side-card .rank-info { flex: 1; min-width: 0; }
.side-card .rank-info .t { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-card .rank-info .s { font-size: 12px; color: var(--ink-light); }

/* ===== 搜索页 ===== */
/* 搜索页加大版搜索框 */
.search-box-lg { max-width: 720px; }
.search-box-lg input { height: 46px; font-size: 15px; }
.search-box-lg button { padding: 0 36px; font-size: 16px; }

/* 搜索标题区 */
.search-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.search-head h2 {
  font-size: 20px;
  color: var(--ink);
  font-weight: 500;
}
.search-head h2 .kw {
  color: var(--primary);
  font-weight: bold;
  margin-left: 4px;
}
.search-count {
  font-size: 13px;
  color: var(--ink-light);
}

/* 热门搜索词 */
.search-hot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.search-hot .hot-label {
  font-size: 13px;
  color: var(--ink-light);
  flex-shrink: 0;
}
.hot-kw-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hot-kw {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--ink);
  background: #f5f1ea;
  border-radius: 14px;
  transition: all .2s;
}
.hot-kw:hover {
  color: #fff;
  background: var(--primary);
}

/* 空状态 */
.search-empty {
  text-align: center;
  padding: 70px 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.search-empty .empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.search-empty .empty-tip {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}
.search-empty .empty-sub {
  font-size: 13px;
  color: var(--ink-light);
}

/* 搜索提示列表 */
.search-tip-list {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 2;
}
.search-tip-list li {
  padding-left: 14px;
  position: relative;
}
.search-tip-list li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--primary);
  font-weight: bold;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .book-grid { grid-template-columns: repeat(4, 1fr); }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .layout-2col { grid-template-columns: 1fr; }
  .demand-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header .container { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
  .search-box { order: 3; width: 100%; max-width: none; }
  .header-actions { margin-left: 0; }
  .nav .container { overflow-x: auto; }
  .nav a { padding: 0 14px; font-size: 14px; white-space: nowrap; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .plan-grid { grid-template-columns: 1fr; }
  .book-detail { flex-direction: column; padding: 20px; }
  .book-detail .cover-wrap { width: 160px; margin: 0 auto; }
  .reader { flex-direction: column; }
  .reader-toc { width: 100%; max-height: 200px; }
  .reader-body { padding: 20px; }
  .reader-toolbar { padding: 12px 20px; }
  .hero { height: 280px; }
  .hero-slide h2 { font-size: 26px; }
  .top-bar .welcome { display: none; }
}
