/*
 * forum-theme.css —— biquge.forum「都市爽文分站」内页专属主题（都市夜色）
 * 全部规则 scoped 在 html.theme-forum 之下：未激活时完全惰性，绝不影响其余 13 个域。
 * 仅覆盖内页（分类/榜单/详情/阅读器/会员/历史/登录）；首页由 frontend/forum/index.html 自包含处理。
 * 设计语言与首页一致：night 底 + lamp 金强调 + city 蓝次强调 + paper 暖米标题 + 宋体 display。
 * 无外链资源；动画仅 transform/opacity。
 */

html.theme-forum {
  --night: #0a0e14;
  --night-2: #0d131c;
  --panel: #171f2b;
  --panel-2: #1d2735;
  --line: rgba(201, 163, 106, 0.28);
  --line-cool: rgba(92, 140, 176, 0.28);
  --ink: #e7edf6;
  --muted: #8d99ab;
  --lamp: #d4ae72;
  --lamp-deep: #b8893f;
  --city: #6ea3c4;
  --vip: #d45d5d;
  --paper: #f3ead7;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --display: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 基底 ---------- */
html.theme-forum,
html.theme-forum body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
}
html.theme-forum body {
  background:
    radial-gradient(1200px 520px at 80% -10%, rgba(212, 174, 114, 0.10), transparent 60%),
    radial-gradient(900px 480px at -10% 10%, rgba(110, 163, 196, 0.08), transparent 55%),
    linear-gradient(180deg, var(--night-2) 0%, var(--night) 28%, #080b10 100%);
  background-attachment: fixed;
}
html.theme-forum a { color: inherit; }
html.theme-forum ::selection { background: rgba(212, 174, 114, 0.28); }

/* ---------- 顶部导航 ---------- */
html.theme-forum .nav {
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.92), rgba(10, 14, 20, 0.55));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
}
html.theme-forum .nav a,
html.theme-forum .nav .logo,
html.theme-forum .nav-link {
  color: var(--ink);
  transition: color 0.22s var(--ease);
}
html.theme-forum .nav .logo {
  font-family: var(--display);
  color: var(--paper);
  letter-spacing: 0.04em;
}
html.theme-forum .nav a:hover,
html.theme-forum .nav-link:hover { color: var(--lamp); }
html.theme-forum .nav-link.active,
html.theme-forum .nav a.active {
  color: var(--lamp);
  border-bottom: 2px solid var(--lamp);
}

/* ---------- 通用按钮 / 表单 ---------- */
html.theme-forum .btn,
html.theme-forum button.btn {
  background: rgba(212, 174, 114, 0.10);
  color: var(--lamp);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: transform 0.18s var(--ease), background 0.22s var(--ease), color 0.22s var(--ease);
}
html.theme-forum .btn:hover { background: rgba(212, 174, 114, 0.18); transform: translateY(-1px); }
html.theme-forum .btn:active { transform: translateY(0); }
html.theme-forum .btn-primary {
  background: var(--lamp);
  color: #1a140c;
  border: 1px solid var(--lamp-deep);
  font-weight: 600;
}
html.theme-forum .btn-primary:hover { background: #e2c38a; }
html.theme-forum .btn-link { color: var(--city); }
html.theme-forum .btn-link:hover { color: var(--lamp); }

html.theme-forum input,
html.theme-forum select,
html.theme-forum textarea,
html.theme-forum .search-container input,
html.theme-forum .search-container select {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line-cool);
  border-radius: 10px;
}
html.theme-forum input::placeholder,
html.theme-forum textarea::placeholder { color: #6f7b8d; }
html.theme-forum input:focus,
html.theme-forum select:focus,
html.theme-forum textarea:focus {
  outline: none;
  border-color: var(--lamp);
  box-shadow: 0 0 0 3px rgba(212, 174, 114, 0.14);
}
html.theme-forum .search-container button {
  background: var(--lamp);
  color: #1a140c;
  border: 1px solid var(--lamp-deep);
}
html.theme-forum .search-container button:hover { background: #e2c38a; }

/* ---------- 书卡（分类/搜索/列表通用） ---------- */
html.theme-forum .novel-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}
html.theme-forum .novel-card:hover {
  transform: translateY(-4px);
  border-color: var(--lamp);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}
html.theme-forum .novel-cover-fallback {
  background: linear-gradient(135deg, var(--lamp-deep), #3a2c17);
  color: var(--paper);
  font-family: var(--display);
}
html.theme-forum .novel-card-info h3,
html.theme-forum .novel-card-info h2 {
  color: var(--paper);
  font-family: var(--display);
}
html.theme-forum .author { color: var(--muted); }
html.theme-forum .novel-category {
  color: var(--city);
  background: rgba(110, 163, 196, 0.10);
  border: 1px solid var(--line-cool);
  border-radius: 999px;
}
html.theme-forum .novel-desc,
html.theme-forum .novel-description { color: var(--muted); }
html.theme-forum .chapter-count { color: var(--muted); }
html.theme-forum .premium-badge {
  background: rgba(212, 93, 93, 0.16);
  color: var(--vip);
  border: 1px solid rgba(212, 93, 93, 0.4);
}

/* ---------- 分类页 ---------- */
html.theme-forum .category-intro-kicker { color: var(--lamp); letter-spacing: 0.18em; }
html.theme-forum .category-intro-title { color: var(--paper); font-family: var(--display); }
html.theme-forum .category-intro-copy,
html.theme-forum .category-intro-meta { color: var(--muted); }
html.theme-forum .category-sidebar-inner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
html.theme-forum .category-link {
  color: var(--ink);
  border-radius: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
html.theme-forum .category-link:hover { background: rgba(212, 174, 114, 0.10); color: var(--lamp); }
html.theme-forum .category-link.active { background: var(--lamp); color: #1a140c; }
html.theme-forum .category-count { color: var(--muted); }
html.theme-forum .category-current-label { color: var(--paper); font-family: var(--display); }

/* ---------- 分页 ---------- */
html.theme-forum .pagination button,
html.theme-forum .pagination a {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line-cool);
  border-radius: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
html.theme-forum .pagination button:hover,
html.theme-forum .pagination a:hover { background: rgba(212, 174, 114, 0.12); color: var(--lamp); }
html.theme-forum .pagination .active,
html.theme-forum .pagination button.active {
  background: var(--lamp);
  color: #1a140c;
  border-color: var(--lamp-deep);
}

/* ---------- 详情页 ---------- */
html.theme-forum .novel-detail-cover-wrap,
html.theme-forum .novel-detail-cover {
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
html.theme-forum .novel-detail-cover-fallback {
  background: linear-gradient(135deg, var(--lamp-deep), #3a2c17);
  color: var(--paper);
  font-family: var(--display);
}
html.theme-forum .novel-meta { color: var(--muted); }
html.theme-forum .novel-meta strong { color: var(--ink); }

/* ---------- 章节列表 ---------- */
html.theme-forum .chapter-list-container,
html.theme-forum .chapter-list-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
html.theme-forum .chapter-list-header,
html.theme-forum .chapter-list-copy { color: var(--paper); font-family: var(--display); }
html.theme-forum .chapter-item {
  color: var(--ink);
  border-bottom: 1px solid rgba(141, 153, 171, 0.12);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
html.theme-forum .chapter-item:hover { background: rgba(212, 174, 114, 0.08); color: var(--lamp); }
html.theme-forum .chapter-item.premium { color: var(--vip); }
html.theme-forum .chapter-list-progress { color: var(--city); }
html.theme-forum .chapter-list-load-more {
  background: rgba(212, 174, 114, 0.10);
  color: var(--lamp);
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* ---------- 阅读器（暗底护眼，宋体正文，舒适行高） ---------- */
html.theme-forum .reader-container { background: transparent; }
html.theme-forum .chapter-content {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--ink);
}
html.theme-forum .chapter-content h2 {
  color: var(--paper);
  font-family: var(--display);
  letter-spacing: 0.02em;
}
html.theme-forum .chapter-text {
  font-family: var(--display);
  font-size: clamp(1.06rem, 1rem + 0.35vw, 1.28rem);
  line-height: 2.05;
  color: #dfe6f1;
  letter-spacing: 0.01em;
}
html.theme-forum .chapter-meta,
html.theme-forum .chapter-skip-notice { color: var(--muted); }
html.theme-forum .reader-nav,
html.theme-forum .reader-secondary-nav {
  background: rgba(10, 14, 20, 0.88);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
html.theme-forum .reader-secondary-action,
html.theme-forum .reader-action-btn {
  background: rgba(212, 174, 114, 0.10);
  color: var(--lamp);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: transform 0.18s var(--ease), background 0.22s var(--ease);
}
html.theme-forum .reader-secondary-action:hover,
html.theme-forum .reader-action-btn:hover { background: rgba(212, 174, 114, 0.18); transform: translateY(-1px); }
html.theme-forum .reader-action-bar {
  background: rgba(10, 14, 20, 0.9);
  border-top: 1px solid var(--line);
}
html.theme-forum .reader-modal-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  box-shadow: var(--shadow);
}
html.theme-forum .reader-modal-header { color: var(--paper); font-family: var(--display); border-bottom: 1px solid var(--line); }
html.theme-forum .reader-modal-close { color: var(--muted); }
html.theme-forum .reader-modal-close:hover { color: var(--lamp); }
html.theme-forum .catalog-chapters { border-color: var(--line); }
html.theme-forum .catalog-chapter-item {
  color: var(--ink);
  border-bottom: 1px solid rgba(141, 153, 171, 0.12);
}
html.theme-forum .catalog-chapter-item:hover { background: rgba(212, 174, 114, 0.08); color: var(--lamp); }
html.theme-forum .catalog-chapter-item.active { color: var(--lamp); background: rgba(212, 174, 114, 0.12); }
html.theme-forum .reader-membership-prompt {
  background: rgba(212, 93, 93, 0.10);
  border: 1px solid rgba(212, 93, 93, 0.4);
  border-radius: 12px;
  color: var(--ink);
}

/* ---------- 榜单页 ---------- */
html.theme-forum .ranking-controls,
html.theme-forum .ranking-tabs { border-bottom: 1px solid var(--line); }
html.theme-forum .ranking-tab {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
html.theme-forum .ranking-tab:hover { color: var(--ink); }
html.theme-forum .ranking-tab.active { color: var(--lamp); border-bottom: 2px solid var(--lamp); }
html.theme-forum .ranking-filter select { background: var(--panel); color: var(--ink); border: 1px solid var(--line-cool); }
html.theme-forum .ranking-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
html.theme-forum .ranking-item {
  border-bottom: 1px solid rgba(141, 153, 171, 0.12);
  transition: background 0.18s var(--ease);
}
html.theme-forum .ranking-item:hover { background: rgba(212, 174, 114, 0.06); }
html.theme-forum .ranking-rank { color: var(--muted); font-family: var(--display); }
html.theme-forum .ranking-rank.rank-1 { color: var(--lamp); }
html.theme-forum .ranking-rank.rank-2 { color: var(--city); }
html.theme-forum .ranking-rank.rank-3 { color: var(--lamp-deep); }
html.theme-forum .ranking-cover { border-radius: 8px; box-shadow: var(--shadow); }
html.theme-forum .ranking-info h3 { color: var(--paper); font-family: var(--display); }
html.theme-forum .ranking-info .author,
html.theme-forum .ranking-meta { color: var(--muted); }
html.theme-forum .ranking-category { color: var(--city); }

/* ---------- 页脚 ---------- */
html.theme-forum .site-footer {
  background: linear-gradient(180deg, transparent, rgba(10, 14, 20, 0.6));
  border-top: 1px solid var(--line);
  color: var(--muted);
}
html.theme-forum .site-footer-group h2 { color: var(--paper); font-family: var(--display); }
html.theme-forum .site-footer a { color: var(--muted); transition: color 0.2s var(--ease); }
html.theme-forum .site-footer a:hover { color: var(--lamp); }

/* ---------- 无结果/占位 ---------- */
html.theme-forum .no-results { color: var(--muted); }
