/* =========================================================
   CSS 变量
   ========================================================= */
:root {
  --bg: #F8F7F4;
  --bg-card: #FFFFFF;
  --bg-muted: #F4F4F5;
  --bg-nav: #FFFFFF;
  --text: #18181B;
  --text-muted: #71717A;
  --text-light: #A1A1AA;
  --accent: #EA580C;
  --accent-hover: #C2410C;
  --accent-light: #FFF4ED;
  --border: #E4E4E7;
  --nav-h: 60px;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --font-ui: 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================================================
   基础重置
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; background: none; border: none; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }

/* =========================================================
   顶部导航（白色扁平）
   ========================================================= */
.nav {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: background 0.15s;
}
.nav-hamburger:hover { background: var(--bg-muted); }
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand-icon {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.nav-categories {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 6px;
}
.nav-cat-link {
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-cat-link:hover { color: var(--text); background: var(--bg-muted); }
.nav-cat-link.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

.nav-spacer { flex: 1; }

/* 搜索（内联直接输入） */
.nav-search-wrap { position: relative; flex: 1; max-width: 260px; min-width: 0; }
.nav-search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: #fff;
  border: 1.5px solid #2C1810;
  border-radius: 999px;
  padding: 7px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nav-search-inner:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224,123,57,0.12);
}
.nav-search-icon { color: var(--text-light); flex-shrink: 0; }
.nav-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  font-family: inherit;
  min-width: 0;
}
.nav-search-input::placeholder { color: var(--text-light); }
.nav-search-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 300;
  overflow: hidden;
  max-height: 380px;
  overflow-y: auto;
}
.nav-drop-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.nav-drop-item:last-child { border-bottom: none; }
.nav-drop-item:hover,
.nav-drop-item.nav-drop-active { background: var(--accent-light); }
.nav-drop-title { font-size: 0.875rem; font-weight: 600; color: var(--text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-drop-meta { font-size: 0.75rem; color: var(--text-muted); }
.nav-search-empty { padding: 16px 14px; font-size: 0.85rem; color: var(--text-muted); text-align: center; }

/* 右侧动作按钮组 */
.nav-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.nav-fav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-fav-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-fav-label { font-size: 0.82rem; }

.fav-badge {
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.nav-login-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-login-btn:hover { background: var(--accent-hover); }

/* 已登录：用户头像按钮 */
.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s;
}
.user-avatar-btn:hover { border-color: var(--accent); }
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-name-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 子页面返回链接 */
.nav-back {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  flex-shrink: 0;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.nav-back:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* =========================================================
   邮箱验证 Modal
   ========================================================= */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.auth-modal-logo {
  width: 52px;
  height: 52px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: white;
}

.auth-title { font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.auth-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; }
.auth-subtitle strong { color: var(--text); font-weight: 600; }

.auth-input {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color 0.15s;
  margin-bottom: 12px;
  text-align: left;
}
.auth-input:focus { outline: none; border-color: var(--accent); }
.auth-input::placeholder { color: var(--text-light); }

.auth-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  margin-bottom: 12px;
}
.auth-btn:hover:not(:disabled) { background: var(--accent-hover); }
.auth-btn:disabled { background: #D4D4D8; cursor: not-allowed; }

.auth-skip {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.auth-skip:hover { color: var(--text); background: var(--bg-muted); }

.auth-err {
  font-size: 0.82rem;
  color: #DC2626;
  text-align: left;
  margin: -6px 0 10px;
  display: none;
}
.auth-err.show { display: block; }

.auth-resend {
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  transition: color 0.15s;
  text-align: center;
  border: none;
  background: none;
}
.auth-resend:hover { color: var(--accent); }

/* OTP 6位输入格 */
.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.otp-cell {
  height: 50px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color 0.15s;
  width: 100%;
}
.otp-cell:focus { outline: none; border-color: var(--accent); }

.demo-hint {
  background: var(--accent-light);
  border: 1px solid #FCDEC6;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.83rem;
  color: var(--accent-hover);
  margin-bottom: 14px;
  text-align: left;
  line-height: 1.5;
}
.demo-hint strong { font-size: 1.1rem; letter-spacing: 0.15em; }

/* =========================================================
   搜索弹窗
   ========================================================= */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 300;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 70px;
}
.search-overlay.active { display: flex; }

.search-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 560px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.search-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.search-icon-svg { color: var(--text-light); flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  font-family: inherit;
}
.search-input::placeholder { color: var(--text-light); }
.search-close-btn {
  width: 26px;
  height: 26px;
  background: var(--bg-muted);
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.search-close-btn:hover { background: #DDDDE1; }

.search-results { max-height: 380px; overflow-y: auto; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.1s;
}
.search-result-item:hover { background: var(--bg-muted); }
.search-result-cover {
  width: 40px;
  height: 54px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-muted);
}
.search-result-cover img { width: 100%; height: 100%; object-fit: cover; }
.search-result-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.search-result-meta { font-size: 0.8rem; color: var(--text-muted); }
.search-empty { padding: 32px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* =========================================================
   收藏侧抽屉
   ========================================================= */
.fav-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100%;
  background: var(--bg-card);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
}
.fav-drawer.open { right: 0; }

.fav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.drawer-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}
.drawer-close-btn:hover { background: #DDDDE1; }

.fav-list { flex: 1; overflow-y: auto; }
.fav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.1s;
}
.fav-item:hover { background: var(--bg-muted); }
.fav-item-cover {
  width: 36px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-muted);
}
.fav-item-cover img { width: 100%; height: 100%; object-fit: cover; }
.fav-item-info { flex: 1; min-width: 0; }
.fav-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fav-item-author { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.fav-item-remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.fav-item-remove:hover { background: #FEE2E2; color: #DC2626; }

/* 通用半透明遮罩 */
.overlay-bd {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  z-index: 350;
  display: none;
}
.overlay-bd.active { display: block; }

/* =========================================================
   移动端侧滑菜单
   ========================================================= */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100%;
  background: var(--bg-card);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transition: left 0.25s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}
.mobile-drawer.open { left: 0; }

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.mobile-drawer-brand-icon {
  width: 26px;
  height: 26px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.mobile-nav-links { padding: 6px 0; }
.mobile-nav-link {
  display: block;
  padding: 11px 20px;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.1s;
}
.mobile-nav-link:hover { background: var(--bg-muted); color: var(--accent); }
.mobile-nav-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* =========================================================
   广告位
   ========================================================= */
.ad-bar { padding: 10px 20px; }
.ad-bar-inner { max-width: 1200px; margin: 0 auto; }
.ad-slot {
  background: var(--bg-card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.78rem;
}
.ad-leaderboard { height: 62px; }
.ad-rect { height: 52px; margin: 14px 0; }
.ad-sidebar { height: 200px; }
.ad-label { font-weight: 600; }

/* =========================================================
   主体 / 布局
   ========================================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.page-main { padding: 20px 0 48px; }

.home-layout {
  display: grid;
  grid-template-columns: 1fr 236px;
  gap: 24px;
  align-items: start;
}

/* =========================================================
   公告条（noticeBanner，显示在 nav 上方）
   ========================================================= */
.announcement-bar {
  background: #1e293b;
  color: #e2e8f0;
  padding: 7px 20px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

/* 内容/年龄提示条（ageNotice，显示在 hero banner 下方） */
.notice-bar {
  background: rgba(224,123,57,0.06);
  border-top: 1px solid rgba(224,123,57,0.18);
  border-bottom: 1px solid rgba(224,123,57,0.18);
  padding: 10px 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--accent-hover);
  line-height: 1.6;
}

/* =========================================================
   Section 标题
   ========================================================= */
.home-section { margin-bottom: 28px; }
.section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.section-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 17px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-more {
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.section-more:hover { color: var(--accent); background: var(--accent-light); }

/* =========================================================
   小说卡片
   ========================================================= */
.novels-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px 12px;
}

.novel-card {
  background: none;
  border: none;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.15s;
}
.novel-card:hover { transform: translateY(-2px); }

.novel-card-cover {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-muted);
  border-radius: var(--radius);
}
.novel-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-status-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.5;
  font-weight: 600;
  z-index: 1;
}
.card-status-badge.ongoing   { background: rgba(5,150,105,0.82);  color: #fff; }
.card-status-badge.completed { background: rgba(100,116,139,0.82); color: #fff; }

.novel-card-body { padding: 7px 2px 0; }
.novel-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  margin-bottom: 3px;
}
.novel-card-author {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.novel-card-meta {
  display: flex;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.novel-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.novel-card-stat svg { opacity: 0.6; flex-shrink: 0; }

/* =========================================================
   更多页：顶部筛选栏 + 下方内容区（上下布局）
   ========================================================= */
.more-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.filter-sidebar {
  width: 100%;
  position: static;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.more-main { width: 100%; }

.filter-section {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.filter-section:last-child { margin-bottom: 0; }
.filter-label {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 5px;
  min-width: 34px;
  letter-spacing: 0.02em;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-search-input {
  width: 100%;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 0.8rem;
  color: var(--text);
  background: var(--bg-card);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.tag-search-input:focus { border-color: var(--accent); }
.filter-chip {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: none;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* 文字卡片网格（标签页 / 搜索结果页 / 浏览页） */
.txt-card-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
.txt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.txt-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.08); border-color: var(--accent); }
/* 顶部：分类 + 状态 */
.tc-top { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; flex-wrap: wrap; }
.tc-cat {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
}
.tc-status {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.tc-status.ongoing   { background: rgba(5,150,105,0.1);  color: #059669; }
.tc-status.completed { background: rgba(100,116,139,0.1); color: #64748b; }
/* 书名 */
.tc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 标签行 */
.tc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.tc-tag {
  font-size: 0.73rem;
  font-weight: 500;
  color: #4B7BF5;
  background: rgba(75,123,245,0.08);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.tc-tag:hover { background: rgba(75,123,245,0.18); }
/* 简介 */
.tc-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
/* 底栏 */
.tc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.tc-views {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.tc-read-btn {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

/* 搜索结果页搜索框 */
.page-search-bar {
  display: flex;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.page-search-input {
  flex: 1;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}
.page-search-input:focus { border-color: var(--accent); }
.page-search-btn {
  height: 40px;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s;
}
.page-search-btn:hover { background: var(--accent-hover); }

@media (max-width: 900px) {
  .txt-card-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 768px) {
  .filter-section { flex-wrap: wrap; }
  .filter-label { min-width: auto; }
  .tc-title { font-size: 1rem; }
}
@media (max-width: 600px) {
  .filter-sidebar { padding: 10px 12px; }
  .filter-chips { gap: 6px; }
  .filter-chip { font-size: 0.78rem; padding: 5px 12px; }
  .filter-label { font-size: 0.78rem; }
  .txt-card-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 420px) {
  .txt-card-list { grid-template-columns: 1fr; gap: 10px; }
  .txt-card { padding: 14px 16px; }
  .tc-title { font-size: 0.98rem; }
  .tc-desc { -webkit-line-clamp: 2; }
}

/* =========================================================
   精选短篇卡片（无封面，色条 + 文字布局，5列网格复用 novels-grid）
   ========================================================= */
/* 精选短篇 & 最近更新：表格列表布局 */
.novel-list-table { display: flex; flex-direction: column; }

.nlr {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.nlr:last-child { border-bottom: none; }
.nlr:hover { background: var(--accent-light); }
.nlr.nlr-header {
  cursor: default;
  padding: 7px 4px;
  border-bottom: 1px solid var(--border);
  background: none !important;
}
.nlr-cat {
  flex-shrink: 0;
  width: 80px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}
.nlr-header .nlr-cat { color: var(--text-muted); font-weight: 400; }
.nlr-title {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 16px;
}
.nlr-header .nlr-title { font-weight: 400; font-size: 0.78rem; color: var(--text-muted); }
.nlr-chapter {
  flex: 0 0 170px;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}
.nlr-chapter-link {
  color: var(--accent);
  text-decoration: none;
}
.nlr-chapter-link:hover { text-decoration: underline; }
.nlr-views {
  flex-shrink: 0;
  width: 68px;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-right: 8px;
}
.nlr-rating {
  flex-shrink: 0;
  width: 48px;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-right: 8px;
}
.nlr-header .nlr-views,
.nlr-header .nlr-rating { font-size: 0.78rem; color: var(--text-muted); }
.nlr-author {
  flex-shrink: 0;
  width: 80px;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}
.nlr-time {
  flex-shrink: 0;
  width: 116px;
  font-size: 0.76rem;
  color: var(--text-light);
  white-space: nowrap;
  text-align: right;
}
.nlr-header .nlr-chapter,
.nlr-header .nlr-author,
.nlr-header .nlr-time { font-size: 0.78rem; color: var(--text-muted); }
.nlr-type {
  flex-shrink: 0;
  width: 50px;
  font-size: 0.76rem;
  color: var(--text-light);
  white-space: nowrap;
  padding-right: 30px;
}
.nlr-type-header { font-size: 0.78rem; color: var(--text-muted); }

@media (max-width: 768px) {
  .nlr-chapter { display: none; }
  .nlr-author  { display: none; }
  .nlr-type    { display: none; }
  .nlr-views   { display: none; }
  .nlr-rating  { display: none; }
  .nlr-time    { width: 80px; }
}
@media (max-width: 480px) {
  .nlr-time { display: none; }
}

/* =========================================================
   侧栏排行榜
   ========================================================= */
.home-sidebar { position: sticky; top: calc(var(--nav-h) + 14px); }

.rank-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.rank-panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}
.rank-more { font-size: 0.75rem; font-weight: 400; color: var(--text); text-decoration: none; }
.rank-more:hover { color: var(--accent); }

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.1s;
}
.rank-item:hover { background: var(--bg-muted); }
.rank-num {
  width: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  text-align: center;
  flex-shrink: 0;
}
.rank-num.top1 { color: #DC2626; }
.rank-num.top2 { color: #EA580C; }
.rank-num.top3 { color: #D97706; }
.rank-info { min-width: 0; }
.rank-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }

/* =========================================================
   更多/分类页头部
   ========================================================= */
.page-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-top: 4px;
}
.page-hd-title { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.page-hd-count { font-size: 0.875rem; color: var(--text-muted); flex: 1; }

.tag-intro {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.view-toggle { display: flex; gap: 4px; margin-left: auto; }
.view-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.view-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.view-toggle-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* 横排图文卡片（more 页卡片视图） */
.nrc-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.nrc {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.nrc:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); border-color: var(--accent); }
.nrc-cover {
  width: 88px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.nrc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.nrc-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.nrc-meta { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }
.nrc-status { font-size: 0.7rem; padding: 1px 5px; border-radius: 3px; font-weight: 500; }
.nrc-status.ongoing   { background: rgba(224,123,57,0.12); color: var(--accent); }
.nrc-status.completed { background: rgba(100,116,139,0.12); color: #64748b; }
.nrc-desc {
  font-size: 0.75rem;
  color: var(--text-light);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.5;
  margin-top: auto;
}
@media (max-width: 900px) { .nrc-list { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .nrc-cover { width: 68px; } }

.load-more-wrap { display: flex; justify-content: center; padding: 28px 0 8px; }
.btn-load-more {
  padding: 10px 32px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.btn-load-more:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================================
   Toast 通知
   ========================================================= */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--text);
  color: white;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { background: #16A34A; }
.toast-error { background: #DC2626; }
.toast-info { background: var(--accent); }

/* =========================================================
   底部 Footer
   ========================================================= */
.site-footer {
  background: #18181B;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 32px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px 20px 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
}
.footer-brand-icon {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.footer-desc { font-size: 0.82rem; line-height: 1.7; }
.footer-col-title { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.85); margin-bottom: 12px; }
.footer-links { list-style: none; font-size: 0.82rem; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* =========================================================
   通用 Empty / Loading
   ========================================================= */
.loading { padding: 48px; text-align: center; color: var(--text-light); font-size: 0.9rem; }
.empty { padding: 48px 20px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.empty a { color: var(--accent); }

/* =========================================================
   移动端底部标签栏
   ========================================================= */
.mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.67rem;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: color 0.15s;
}
.tab-item.tab-active, .tab-item:hover { color: var(--accent); }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .home-layout { grid-template-columns: 1fr 216px; gap: 20px; }
}

@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar { display: none; }
  .nav-categories { display: none; }
}

@media (max-width: 768px) {
  .nav { padding: 0 14px; gap: 6px; }
  .nav-hamburger { display: flex; }
  .nav-search-wrap { max-width: 140px; }
  .nav-fav-label { display: none; }
  .mobile-tabbar { display: flex; }
  .page-main { padding-bottom: 72px; }
  .picks-bar-inner { padding: 0 14px; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > .footer-col:first-child { grid-column: 1 / -1; }
  .auth-modal { padding: 32px 24px; }
}

@media (max-width: 768px) {
  .novels-grid { grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
}
@media (max-width: 480px) {
  .novels-grid { grid-template-columns: repeat(3, 1fr); gap: 10px 6px; }
  .nav-search-wrap { display: none; }
}

/* =========================================================
   通用按钮
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }

/* =========================================================
   徽章
   ========================================================= */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.6;
}
.badge-completed { background: #D1FAE5; color: #065F46; }
.badge-ongoing { background: var(--accent-light); color: var(--accent); }
.badge-standalone { background: #EDE9FE; color: #6D28D9; }

/* =========================================================
   小说详情页
   ========================================================= */
.novel-hero {
  display: flex;
  gap: 28px;
  padding: 28px 0 32px;
  align-items: stretch;
}
.novel-hero-cover {
  width: 200px;
  flex-shrink: 0;
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-light);
}
.novel-hero-cover img { width: 100%; height: 100%; object-fit: contain; }
.novel-hero-info { flex: 1; min-width: 0; padding-top: 4px; display: flex; flex-direction: column; }
.novel-hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 10px;
  text-align: left;
}
.novel-hero-author { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 12px; }
.novel-hero-meta { margin-bottom: 16px; }
.novel-hero-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

/* 章节目录区 */
.novel-chapters { padding-top: 4px; }
.novel-chapters .section-hd { margin-bottom: 12px; }

.chapter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px;
}
.chapter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.1s;
  min-width: 0;
}
.chapter-item:hover { background: var(--bg-muted); }
.chapter-item-current { background: var(--accent-light); }
.chapter-item-current .chapter-title-link { color: var(--accent); font-weight: 600; }
.chapter-item-current .chapter-num { color: var(--accent); }
.chapter-reading-tag {
  font-size: 0.68rem;
  color: var(--accent);
  background: rgba(224,123,57,0.15);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}
.chapter-num {
  font-size: 0.72rem;
  color: var(--text-light);
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}
.chapter-title-link {
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .novel-hero { gap: 16px; padding: 20px 0 24px; }
  .novel-hero-cover { width: 140px; }
  .novel-hero-title { font-size: 1.25rem; }
  .chapter-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .chapter-list { grid-template-columns: 1fr; }
}

/* =========================================================
   阅读页
   ========================================================= */
.read-header {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.read-header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}
.read-home-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.read-home-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.read-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  overflow: hidden;
}
.read-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  display: block;
}
.read-breadcrumb a:hover { color: var(--accent); }
.read-breadcrumb-sep { color: var(--text-light); flex-shrink: 0; }
#breadcrumbChapter {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-weight: 500;
  display: block;
  min-width: 0;
}

.read-settings {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.font-size-ctrl {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 2px;
}
.font-size-btn {
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s, color 0.1s;
}
.font-size-btn:hover { background: var(--bg-card); color: var(--text); }
#fontSizeLabel {
  min-width: 26px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.theme-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.1s;
  white-space: nowrap;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }

.read-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.chapter-heading {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 32px;
  line-height: 1.4;
  text-align: center;
}
.chapter-content {
  font-size: 17px;
  line-height: 2;
  color: var(--text);
}
.chapter-content p {
  margin-bottom: 1.2em;
  text-indent: 2em;
}
.read-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 0 24px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.read-nav-center { text-align: center; }
.read-nav-progress { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.read-nav-toc { font-size: 0.82rem; color: var(--text-muted); text-decoration: none; }
.read-nav-toc:hover { color: var(--accent); }
.read-nav-btns { display: flex; gap: 12px; width: 100%; max-width: 360px; }
.read-nav-btns .btn { flex: 1; justify-content: center; }
.read-btn-disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* 夜间模式 */
[data-theme="dark"] {
  --bg: #1C1C1E;
  --bg-card: #2C2C2E;
  --bg-muted: #3A3A3C;
  --bg-nav: #1C1C1E;
  --text: #F2F2F7;
  --text-muted: #AEAEB2;
  --text-light: #636366;
  --border: #3A3A3C;
}

/* =========================================================
   小说详情页增强
   ========================================================= */
.novel-hero-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.novel-meta-tag {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}
.novel-meta-cat {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}
.novel-hero-stats {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 14px 0 18px;
  padding: 12px 0;
}
.novel-stat {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--border);
}
.novel-stat:last-child { border-right: none; }
.novel-stat-val { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.novel-stat-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }
.novel-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.novel-detail-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  margin-bottom: 4px;
}
.nds-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nds-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.nds-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.novel-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
}
@media (max-width: 600px) {
  .novel-hero-actions .btn { flex: 1; justify-content: center; }
}

/* =========================================================
   收藏本站按钮
   ========================================================= */
.nav-bookmark-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-bookmark-btn:hover { border-color: #D97706; color: #D97706; background: #FFFBEB; }

/* =========================================================
   Page Banner (二级页面顶部 banner，由 common.js 控制显隐)
   ========================================================= */
.page-banner {
  display: none;
  background: #1A1612;
  height: 320px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.page-banner-inner { display: none; }
@media (max-width: 768px) {
  .page-banner { height: 200px; }
}

/* =========================================================
   Hero Banner
   ========================================================= */
.hero-banner {
  background: #1A1612;
  overflow: hidden;
  height: 320px;
}
.hero-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px;
  display: flex;
  align-items: center;
  gap: 48px;
}
.hero-text { flex: 1; min-width: 0; }
.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.hero-subtitle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  margin-bottom: 28px;
  max-width: 380px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  letter-spacing: 0.02em;
}
.hero-cta:hover { background: var(--accent-hover); }
.hero-covers {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-shrink: 0;
}
.hero-cover-item {
  width: 84px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
  border: 2px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.hero-cover-item:hover { transform: translateY(-6px) !important; }
.hero-cover-item:nth-child(1) { transform: translateY(0); }
.hero-cover-item:nth-child(2) { transform: translateY(-10px); }
.hero-cover-item:nth-child(3) { transform: translateY(-4px); }
.hero-cover-item:nth-child(4) { transform: translateY(-14px); }
.hero-cover-item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }

@media (max-width: 900px) {
  .hero-covers { gap: 10px; }
  .hero-cover-item { width: 68px; }
}
@media (max-width: 768px) {
  .hero-banner-inner { padding: 36px 16px; gap: 28px; }
  .hero-title { font-size: 1.7rem; }
  .hero-covers { gap: 8px; }
  .hero-cover-item { width: 60px; }
  .hero-cover-item:nth-child(2) { transform: translateY(-6px); }
  .hero-cover-item:nth-child(4) { transform: translateY(-8px); }
}
@media (max-width: 540px) {
  .hero-banner-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-title { font-size: 1.5rem; }
  .hero-subtitle { max-width: 100%; }
  .hero-covers { align-self: center; }
  .hero-cover-item { width: 56px; }
  .hero-cover-item:nth-child(2) { transform: translateY(-8px); }
  .hero-cover-item:nth-child(4) { transform: translateY(-4px); }
}

/* =========================================================
   Hero Carousel
   ========================================================= */
.hero-carousel-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.hero-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  height: 100%;
}
.hero-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: #1A1612;
  background-repeat: no-repeat;
}
.hero-slide-overlay { display: none; }
.hero-carousel-btn  { display: none; }
.hero-carousel-dots { display: none; }
@media (max-width: 768px) {
  .hero-banner { height: 240px; }
  .page-banner { height: 200px; }
}
@media (max-width: 480px) {
  .hero-banner { height: 190px; }
  .page-banner { height: 160px; }
}

/* =========================================================
   阅读页 3-按钮翻页
   ========================================================= */
.btn-toc {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-toc:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* =========================================================
   移动端小说详情页
   ========================================================= */
@media (max-width: 520px) {
  .novel-hero {
    flex-direction: column;
    gap: 20px;
    padding: 20px 0 24px;
  }
  .novel-hero-cover { width: 160px; }
  .novel-hero-stats { gap: 0; }
  .novel-stat-val { font-size: 1rem; }
}

/* =========================================================
   移动端阅读页 header
   ========================================================= */
@media (max-width: 520px) {
  .read-header-inner { gap: 6px; padding: 0 12px; }
  .read-home-btn span { display: none; }
  .read-home-btn { padding: 6px 8px; }
  #fontSizeLabel { display: none; }
  .font-size-btn { padding: 3px 6px; font-size: 0.72rem; }
  .theme-btn span { display: none; }
  .theme-btn { padding: 5px 8px; }
  #breadcrumbChapter { max-width: 80px; }
  .read-body { padding: 24px 16px 80px; }
  .chapter-heading { font-size: 1.2rem; margin-bottom: 20px; }
  .read-nav-btns { gap: 8px; }
  .read-nav-btns .btn { font-size: 0.82rem; padding: 8px 6px; }
}

/* =========================================================
   小说详情页 — 热门推荐
   ========================================================= */
.novel-recommend {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.recommend-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 14px;
}

.recommend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.recommend-item:hover .recommend-cover { border-color: var(--accent); }
.recommend-item:hover .recommend-title { color: var(--accent); }

.recommend-cover {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.recommend-cover img { width: 100%; height: 100%; object-fit: cover; }

.recommend-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
  transition: color 0.15s;
}

@media (max-width: 768px) {
  .recommend-list { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 520px) {
  .recommend-list { grid-template-columns: repeat(3, 1fr); }
}
