:root {
  --bg: #07070c;
  --bg-subtle: #101018;
  --bg-card: #14141c;
  --bg-card-hover: #1c1c28;
  --bg-input: #0c0c14;
  --ink: #f4f4f5;
  --ink-secondary: #d4d4d8;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.075);
  --line-light: rgba(255, 255, 255, 0.14);
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --primary-glow: rgba(129, 140, 248, 0.4);
  --primary-light: rgba(129, 140, 248, 0.16);
  --accent: #f472b6;
  --accent-glow: rgba(244, 114, 182, 0.34);
  --comic-color: #38bdf8;
  --comic-glow: rgba(56, 189, 248, 0.38);
  --novel-color: #c084fc;
  --novel-glow: rgba(192, 132, 252, 0.38);
  --score-gold: #fbbf24;
  --status-ongoing: #38bdf8;
  --status-finished: #34d399;
  --status-offline: #71717a;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-hover: 0 28px 56px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(129, 140, 248, 0.28), 0 0 48px rgba(129, 140, 248, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html[lang="zh-Hant"] {
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

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

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 8% -8%, rgba(129, 140, 248, 0.16), transparent 55%),
    radial-gradient(900px 480px at 96% -4%, rgba(244, 114, 182, 0.12), transparent 50%),
    radial-gradient(700px 400px at 70% 40%, rgba(56, 189, 248, 0.05), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: 72px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.22;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

/* ================== 顶部导航栏 ================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  background: rgba(7, 7, 12, 0.62);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.topbar-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, #fff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 900;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 10px var(--primary-glow);
  -webkit-text-fill-color: #fff;
}

.nav {
  display: flex;
  gap: 8px;
  flex: 1;
}

.nav a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
}

.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-weight: 600;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search {
  display: flex;
  align-items: center;
  position: relative;
}

.search input {
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.7);
  border-radius: var(--radius-full);
  padding: 9px 40px 9px 18px;
  font-size: 0.88rem;
  min-width: 200px;
  color: #fff;
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.search input::placeholder {
  color: #64748b;
}

.search input:focus {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 20px var(--primary-glow);
  min-width: 240px;
}

.search button {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.search button:hover {
  color: #fff;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.lang-switcher a {
  color: #94a3b8;
  text-decoration: none;
  padding: 2px 4px;
  transition: color 0.15s ease;
}

.lang-switcher a:hover {
  color: #fff;
}

.lang-switcher a.active {
  color: #fff;
}

.lang-sep {
  color: #475569;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-topbar-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 500;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.btn-topbar-login:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-topbar-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border: 1px solid transparent;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}

.btn-topbar-register:hover {
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.45);
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.topbar-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  font-size: 0.86rem;
  font-weight: 500;
  max-width: 160px;
  transition: all 0.2s ease;
}

.topbar-user-btn:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

.user-avatar-tiny {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: #fff;
}

.user-avatar-tiny img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-logout-btn {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.topbar-logout-btn:hover {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.1);
}

/* ================== 广告位1：轮播图广告区域 ================== */
.ad-carousel-section {
  padding: 24px 0 16px;
}

.ad-carousel-container {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  background: #0f172a;
}

.ad-carousel-track {
  width: 100%;
  height: 100%;
  position: relative;
}

.ad-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.ad-carousel-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.ad-carousel-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.ad-carousel-img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.ad-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 32px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.85) 60%, rgba(15, 23, 42, 0.98) 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ad-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(236, 72, 153, 0.2);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ad-caption-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.ad-caption-desc {
  font-size: 0.92rem;
  color: #cbd5e1;
  max-width: 700px;
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.ad-carousel-text-wrap {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #311042 100%);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
}

.ad-caption-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.ad-carousel-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #1e293b 100%);
  display: flex;
  align-items: center;
  padding: 40px 48px;
  position: relative;
  overflow: hidden;
}

.placeholder-glow {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.placeholder-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.placeholder-badge {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #818cf8;
}

.placeholder-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.placeholder-desc {
  font-size: 0.96rem;
  color: #94a3b8;
  max-width: 600px;
  line-height: 1.6;
}

.ad-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ad-carousel-btn:hover {
  background: rgba(99, 102, 241, 0.8);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.08);
}

.ad-carousel-btn.prev-btn {
  left: 20px;
}

.ad-carousel-btn.next-btn {
  right: 20px;
}

.ad-carousel-dots {
  position: absolute;
  bottom: 16px;
  right: 28px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.ad-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.25s ease;
}

.ad-dot.active {
  width: 24px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* ================== 频道分类筛选条 ================== */
.channel-cat-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.cat-bar-title {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.cat-bar-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.cat-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cat-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* ================== 栏目与模块 Rail ================== */
.rail {
  margin: 36px 0;
}

.rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.rail-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

.comic-dot {
  background: var(--comic-color);
  box-shadow: 0 0 12px var(--comic-glow);
}

.novel-dot {
  background: var(--novel-color);
  box-shadow: 0 0 12px var(--novel-glow);
}

.rail-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.rail-count {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: normal;
  margin-left: 6px;
}

.rail-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 0.9rem;
}

.more-link {
  color: var(--muted);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.more-link:hover {
  color: var(--comic-color);
  transform: translateX(3px);
}

/* ================== 双列精美排行榜 Two-Col Rails ================== */
.two-col-rails {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

.compact-rank-list {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.compact-rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.compact-rank-item:last-child {
  border-bottom: none;
}

.compact-rank-item:hover {
  background: var(--bg-card-hover);
  padding-left: 22px;
}

.rank-num {
  font-weight: 900;
  font-size: 1rem;
  color: #64748b;
  width: 22px;
  text-align: center;
}

.rank-num.rank-top {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.15rem;
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-info h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.rank-stat {
  font-size: 0.82rem;
  color: #38bdf8;
  font-weight: 600;
  white-space: nowrap;
}

.rank-time {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.rank-score-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--score-gold);
  white-space: nowrap;
}

/* ================== 作品卡片网格 Card Grid ================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: var(--shadow-hover);
  border-color: rgba(129, 140, 248, 0.42);
}

.cover {
  aspect-ratio: 3/4;
  background: #1a1a24 center/cover no-repeat;
  position: relative;
  overflow: hidden;
  transition: transform 0.55s var(--ease), filter 0.55s var(--ease);
}

.card:hover .cover {
  transform: scale(1.07);
  filter: brightness(1.08) saturate(1.08);
}

.card-status {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.card-score {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.76rem;
  background: rgba(15, 23, 42, 0.88);
  color: var(--score-gold);
  padding: 3px 7px;
  border-radius: 6px;
  font-weight: 800;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-ongoing {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
}

.status-finished {
  background: linear-gradient(135deg, #059669, #10b981);
}

.status-offline {
  background: #475569;
}

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.4;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-cat {
  color: #a855f7;
  font-weight: 600;
}

.card-extra {
  margin-top: auto;
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
}

/* ================== 筛选面板 Filter Panel ================== */
.filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  margin: 24px 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-group {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.filter-label {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  width: 76px;
}

.filter-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-item {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.filter-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.filter-item.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px var(--primary-glow);
}

/* ================== 分页器 Pagination ================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 48px 0 24px;
}

.page-btn {
  padding: 9px 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.page-btn:hover:not(.disabled) {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.page-btn.disabled {
  color: #475569;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
  cursor: not-allowed;
}

.page-current {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

/* ================== 面包屑导航 Breadcrumb ================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 24px 0 20px;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .current {
  color: #fff;
  font-weight: 600;
}

/* ================== 作品详情卡片 Detail Card ================== */
.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.detail-card::before {
  content: "";
  position: absolute;
  top: -50px;
  left: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.detail-cover-wrap {
  display: flex;
  flex-direction: column;
}

.detail-cover {
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  background: #1e293b center/cover no-repeat;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-light);
}

.detail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.detail-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
}

.detail-score-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
}

.score-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
}

.score-label {
  font-size: 0.72rem;
  color: #d97706;
  margin-top: 3px;
  font-weight: 600;
}

.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-bottom: 22px;
}

.meta-item .label {
  color: var(--muted);
}

.meta-item a {
  color: var(--comic-color);
  font-weight: 600;
}

.status-tag {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #fff;
  font-weight: 700;
}

.detail-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 22px;
  text-align: center;
}

.stat-box {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.stat-box:last-child {
  border-right: none;
}

.stat-box .num {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.stat-box .sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 3px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
}

.tags-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.tag-pill {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--muted);
}

.tag-pill:hover {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary-light);
}

.detail-blurb {
  background: rgba(15, 23, 42, 0.4);
  border-left: 3px solid var(--primary);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-blurb p {
  line-height: 1.8;
  color: #cbd5e1;
  font-size: 0.94rem;
  white-space: pre-wrap;
}

.detail-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px var(--primary-glow);
  transition: all 0.25s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:disabled {
  background: #334155;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: transparent;
  border: 1px solid var(--line-light);
  color: var(--ink-secondary);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-outline:hover,
.btn-outline.active {
  border-color: var(--accent);
  color: #fff;
  background: rgba(236, 72, 153, 0.15);
  box-shadow: 0 0 15px var(--accent-glow);
}

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* ================== 章节目录 Grid ================== */
.chapter-section {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.chapter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter-item:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.chapter-seq {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  font-weight: 500;
}

.chapter-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  color: var(--ink-secondary);
}

.chapter-item:hover .chapter-name {
  color: #fff;
  font-weight: 600;
}

/* ================== 排行榜页面 Rank ================== */
.rank-channel-tabs {
  display: flex;
  gap: 14px;
  margin: 24px 0 18px;
}

.channel-tab {
  padding: 12px 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1rem;
  color: var(--muted);
}

.channel-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 18px var(--primary-glow);
}

.rank-sub-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.sub-tab {
  padding: 7px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.sub-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sub-tab.active {
  background: #fff;
  border-color: #fff;
  color: #0f172a;
  font-weight: 700;
}

.rank-cards-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rank-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: var(--shadow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.rank-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.4);
  background: var(--bg-card-hover);
}

.rank-badge {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 900;
  font-size: 1.15rem;
  color: #64748b;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--line);
}

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.45);
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #94a3b8, #475569);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(71, 85, 105, 0.45);
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #f97316, #c2410c);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.45);
}

.rank-cover {
  width: 60px;
  height: 80px;
  border-radius: 8px;
  background: #1e293b center/cover no-repeat;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.rank-details {
  flex: 1;
  min-width: 0;
}

.rank-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
}

.rank-meta {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.rank-meta .cat-text {
  color: var(--comic-color);
  font-weight: 600;
}

.rank-blurb {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-stat-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 110px;
}

.stat-main {
  font-size: 1.15rem;
  font-weight: 900;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 3px;
}

.score-color {
  color: var(--score-gold);
}

.hits-color {
  color: var(--comic-color);
}

.fav-color {
  color: var(--accent);
}

.time-color {
  color: #34d399;
}

/* ================== 搜索页 Search ================== */
.search-hero {
  padding: 40px 0 20px;
  text-align: center;
}

.search-box-wrap {
  max-width: 650px;
  margin: 0 auto;
}

.big-search-form {
  display: flex;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--radius-full);
  padding: 5px;
  box-shadow: 0 10px 30px var(--primary-glow);
}

.big-search-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 24px;
  font-size: 1.05rem;
  color: #fff;
  outline: none;
}

.big-search-form button {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.big-search-form button:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.search-stats {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.search-stats strong {
  color: #fff;
}

/* ================== 阅读器通用样式 Reader ================== */
.reader {
  margin: 0;
  padding: 0;
}

.reader-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.reader-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #cbd5e1;
}

.reader-back-btn:hover {
  color: var(--comic-color);
}

.reader-bar-title {
  font-weight: 700;
  font-size: 1rem;
  color: #f8fafc;
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.reader-actions button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  color: #e2e8f0;
  font-weight: 600;
  transition: all 0.2s;
}

.reader-actions button:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

.reader-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.nav-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.nav-btn.toc-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid var(--line);
  box-shadow: none;
}

.nav-btn.toc-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.nav-btn.disabled {
  background: rgba(255, 255, 255, 0.04);
  color: #475569;
  border: 1px solid transparent;
  cursor: not-allowed;
  box-shadow: none;
}

/* ================== 小说阅读器 Novel Reader ================== */
.novel-reader {
  background: #fbf0d9;
  color: #2b2b2b;
}

.novel-reader .reader-bar,
.novel-reader .reader-nav {
  background: rgba(251, 240, 217, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  color: #2b2b2b;
}

.novel-reader .reader-back-btn,
.novel-reader .reader-bar-title {
  color: #2b2b2b;
}

.novel-reader .reader-actions button,
.novel-reader .nav-btn.toc-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: #2b2b2b;
}

.novel-reader.sepia {
  background: #e8dcc4;
  color: #23201d;
}

.novel-reader.sepia .reader-bar,
.novel-reader.sepia .reader-nav {
  background: rgba(232, 220, 196, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  color: #23201d;
}

.novel-reader.dark {
  background: #131722;
  color: #d1d5db;
}

.novel-reader.dark .reader-bar,
.novel-reader.dark .reader-nav {
  background: rgba(19, 23, 34, 0.95);
  border-color: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
}

.novel-reader.dark .reader-back-btn,
.novel-reader.dark .reader-bar-title {
  color: #f3f4f6;
}

.novel-reader.dark .reader-actions button,
.novel-reader.dark .nav-btn.toc-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}

.novel-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 120px;
}

.novel-header-info {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 24px;
  margin-bottom: 36px;
}

.novel-reader.dark .novel-header-info {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.novel-header-info h1 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
}

.novel-sub-info {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.6);
  flex-wrap: wrap;
}

.novel-reader.dark .novel-sub-info {
  color: #9ca3af;
}

.novel-content {
  line-height: 2.2;
  font-size: 20px;
  letter-spacing: 0.03em;
}

.novel-content p {
  margin: 0 0 1.6em;
  text-indent: 2em;
}

/* ================== 漫画阅读器 Comic Reader ================== */
.comic-reader {
  background: #09090b;
  color: #fafafa;
}

.comic-reader .reader-bar,
.comic-reader .reader-nav {
  background: rgba(9, 9, 11, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fafafa;
}

.comic-reader .reader-back-btn {
  color: #a1a1aa;
}

.comic-reader .reader-actions button,
.comic-reader .nav-btn.toc-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fafafa;
}

.comic-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 0 90px;
}

.comic-pages {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comic-page-item {
  position: relative;
  width: 100%;
}

.comic-page-item img {
  width: 100%;
  display: block;
  min-height: 300px;
  background: #18181b;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.comic-page-num {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================== 目录抽屉 Toc Drawer ================== */
.toc-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  display: none;
}

.toc-drawer.open {
  display: block;
}

.toc-drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.toc-drawer-content {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(380px, 85vw);
  background: var(--bg-card);
  color: #fff;
  box-shadow: var(--shadow-hover);
  display: flex;
  flex-direction: column;
  z-index: 10;
  border-right: 1px solid var(--line);
}

.toc-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.toc-drawer-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--muted);
}

.close-btn:hover {
  color: #fff;
}

.toc-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.toc-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.toc-drawer-item:hover,
.toc-drawer-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--comic-color);
  font-weight: 700;
}

.toc-seq {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ================== 空状态 Empty Box ================== */
.empty-box {
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
  grid-column: 1 / -1;
}

.empty {
  color: var(--muted);
  font-size: 0.95rem;
}

.btn-sm {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
}

/* ================== 页脚 Footer ================== */
.footer {
  color: var(--muted);
  padding: 48px 0 96px;
  font-size: 0.9rem;
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 60px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: #fff;
}

.copyright {
  margin: 0;
  color: #64748b;
  font-size: 0.85rem;
}

/* ================== 移动端 Tabbar ================== */
.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 100;
  display: none;
  background: rgba(12, 12, 18, 0.78);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 8px 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  padding: 8px 0 6px;
  font-weight: 500;
  border-radius: 14px;
}

.tabbar a:hover {
  color: #fff;
}

.tabbar a.active {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.28), rgba(244, 114, 182, 0.16));
}

/* ================== 响应式 Breakpoints ================== */
@media (max-width: 900px) {
  .nav {
    display: none;
  }
  .tabbar {
    display: flex;
  }
  body {
    padding-bottom: 96px;
  }
  .detail-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
  .detail-cover {
    max-width: 220px;
    margin: 0 auto;
  }
  .two-col-rails {
    grid-template-columns: 1fr;
  }
  .search input {
    min-width: 140px;
  }
  .search input:focus {
    min-width: 180px;
  }
  .ad-carousel-container {
    height: 240px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 12px;
  }
  .topbar-inner {
    gap: 10px;
    min-height: 60px;
  }
  .lang-switcher {
    padding: 4px 8px;
  }
}

/* ================== 广告推广样式 ================== */
.site-ads {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.top-banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.ad-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}
.ad-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 16px var(--primary-glow);
}
.ad-item img {
  width: 100%;
  max-height: 100px;
  object-fit: cover;
  display: block;
}
.ad-text-box {
  padding: 14px 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ad-text-box strong {
  font-size: 0.95rem;
  color: var(--ink);
}
.ad-text-box span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ================== 用户认证页面 (登录/注册) ================== */
.auth-page {
  min-height: calc(100vh - 240px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4), 0 0 50px rgba(99, 102, 241, 0.08);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #ec4899, #06b6d4);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #cbd5e1;
}

.form-required {
  color: #f43f5e;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: normal;
}

.form-subtip {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 3px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-input:focus {
  background: rgba(15, 23, 42, 0.9);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.auth-input.disabled {
  background: rgba(15, 23, 42, 0.3);
  color: #64748b;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
}

.auth-alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.86rem;
  line-height: 1.4;
}

.auth-alert.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fca5a5;
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.auth-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-submit-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(236, 72, 153, 0.5);
}

.auth-submit-btn.compact {
  width: auto;
  min-width: 160px;
  align-self: flex-start;
}

.auth-submit-btn:disabled,
.auth-submit-btn.loading {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
}

.auth-link {
  color: #818cf8;
  font-weight: 600;
  margin-left: 6px;
}

.auth-link:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

/* ================== 用户个人中心 (User Profile) ================== */
.user-page-wrap {
  padding: 32px 0 48px;
}

.user-profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: flex-start;
}

.user-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.user-avatar-large {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  margin-bottom: 16px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.user-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-display-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.user-badge-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.user-detail-pills {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.meta-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius);
  font-size: 0.82rem;
}

.pill-label {
  color: var(--muted);
}

.pill-val {
  color: #e2e8f0;
  font-weight: 500;
}

.user-card-actions {
  width: 100%;
}

.btn-user-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
  background: rgba(244, 63, 94, 0.08);
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-user-logout:hover {
  background: rgba(244, 63, 94, 0.18);
  color: #fff;
  border-color: rgba(244, 63, 94, 0.5);
}

.user-settings-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.settings-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 24px;
}

.settings-tabs .tab-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-tabs .tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.settings-tabs .tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(236, 72, 153, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.user-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
}

.user-form .auth-input {
  padding-left: 14px;
}

@media (max-width: 768px) {
  .user-profile-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ================== 个人中心: 书架与评论列表 ================== */
.fav-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.fav-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fav-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.fav-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.fav-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.fav-card {
  display: flex;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 10px;
  gap: 12px;
  transition: transform 0.2s, border-color 0.2s;
}

.fav-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
}

.fav-cover {
  width: 70px;
  height: 94px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}

.type-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  color: #fff;
}

.type-badge.comic {
  background: #f43f5e;
}

.type-badge.novel {
  background: #6366f1;
}

.fav-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.fav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-title:hover {
  color: var(--primary);
}

.fav-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.fav-score {
  color: #fbbf24;
  font-weight: 600;
}

.fav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.btn-fav-read {
  padding: 4px 12px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-fav-read:hover {
  background: var(--primary);
  color: #fff;
}

.btn-fav-del {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border-radius: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-fav-del:hover {
  background: rgba(244, 63, 94, 0.15);
  color: #fff;
}

.my-comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.my-comment-item {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.my-cmt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.my-cmt-target a {
  color: #a5b4fc;
  font-weight: 600;
  text-decoration: none;
}

.my-cmt-time {
  color: var(--muted);
}

.my-cmt-content {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.5;
  margin-bottom: 10px;
}

.my-cmt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.my-cmt-likes {
  color: var(--muted);
}

.btn-cmt-del {
  background: none;
  border: none;
  color: #fda4af;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-cmt-del:hover {
  text-decoration: underline;
}

.empty-state {
  text-align: center;
  padding: 40px 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.btn-primary-sm {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

/* ================== 详情页 5 大互动功能组件 ================== */
.detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  color: var(--ink-secondary);
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.tool-btn.active {
  background: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.4);
  color: #f472b6;
}

.tool-btn svg {
  flex-shrink: 0;
}

/* 评分打分条 */
.rating-bar-box {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.rating-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rating-score-huge {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
}

.rating-meta-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rating-meta-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #f8fafc;
}

.rating-meta-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.rating-stars-interactive {
  display: flex;
  align-items: center;
  gap: 10px;
}

.star-group {
  display: inline-flex;
  gap: 4px;
}

.star-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: #475569;
  transition: color 0.15s, transform 0.15s;
}

.star-btn:hover {
  transform: scale(1.2);
}

.star-btn.filled {
  color: #fbbf24;
}

.rating-user-tip {
  font-size: 0.85rem;
  color: #94a3b8;
  min-width: 80px;
}

/* 评论互动区 */
.comments-section {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 36px;
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.comments-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-input-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.comment-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #f8fafc;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.comment-input-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-tips {
  font-size: 0.82rem;
  color: var(--muted);
}

.comment-tips a {
  color: var(--primary);
  text-decoration: underline;
}

.btn-comment-submit {
  padding: 8px 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-comment-submit:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-comment-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 评论列表项 */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.comment-item {
  display: flex;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cmt-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #334155;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  overflow: hidden;
}

.cmt-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cmt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cmt-user {
  font-weight: 600;
  font-size: 0.92rem;
  color: #f1f5f9;
}

.cmt-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.cmt-text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #cbd5e1;
  word-break: break-word;
}

.cmt-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.btn-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.btn-like:hover, .btn-like.liked {
  color: #f43f5e;
}

/* 弹窗通用 Modal (投诉 & 分享) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-dialog {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.btn-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 24px;
}

/* 分享弹窗样式 */
.share-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  text-align: center;
}

.share-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #cbd5e1;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-item-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  transform: translateY(-2px);
}

.share-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

.share-icon-wrap.wechat { background: #07c160; }
.share-icon-wrap.qq { background: #12b7f5; }
.share-icon-wrap.weibo { background: #eb182c; }
.share-icon-wrap.copy { background: #6366f1; }

.share-copy-bar {
  display: flex;
  gap: 8px;
}

.share-copy-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #cbd5e1;
  outline: none;
}

.btn-copy-link {
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-copy-link:hover {
  background: #4f46e5;
}

/* 投诉表单 */
.report-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.report-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-form .form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
}

.report-form .form-select,
.report-form .form-input,
.report-form .form-textarea {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #f8fafc;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.report-form .form-select:focus,
.report-form .form-input:focus,
.report-form .form-textarea:focus {
  border-color: var(--primary);
}

.btn-report-submit {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s;
}

.btn-report-submit:hover {
  opacity: 0.9;
}

/* ================== 全局消息提示 Toast ================== */
.site-toast-container {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.site-toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  background: rgba(15, 23, 42, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.25);
  opacity: 0;
  transform: translateY(-16px) scale(0.95);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.site-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.site-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.site-toast-icon svg {
  width: 13px;
  height: 13px;
}

/* ================== Visual refresh: atmosphere, glass, motion ================== */
::selection {
  background: rgba(129, 140, 248, 0.42);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(129, 140, 248, 0.55);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.wrap {
  width: min(1220px, calc(100% - 36px));
}

.nav a {
  transition: color 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
}
.nav a.active {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.32), rgba(244, 114, 182, 0.18));
  border: 1px solid rgba(129, 140, 248, 0.38);
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.18);
}

.search input {
  background: rgba(20, 20, 28, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
}
.search input:focus {
  background: rgba(20, 20, 28, 0.95);
  min-width: 260px;
}

.lang-switcher {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.1);
}
.lang-switcher a.active {
  color: #fff;
  text-shadow: 0 0 16px rgba(129, 140, 248, 0.7);
}

.ad-carousel-container {
  height: 360px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.ad-carousel-btn {
  background: rgba(7, 7, 12, 0.45);
  backdrop-filter: blur(12px);
}
.ad-dot.active {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 14px var(--primary-glow);
}

.channel-cat-bar,
.filter-panel,
.compact-rank-list,
.detail-card,
.chapter-section,
.comments-section,
.rating-bar-box,
.auth-card,
.user-summary-card,
.user-settings-card,
.rank-card {
  background: linear-gradient(180deg, rgba(28, 28, 38, 0.92) 0%, rgba(16, 16, 24, 0.92) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.rail-head h2 {
  background: linear-gradient(180deg, #fff 20%, #c4c4ce 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rail-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.28;
  filter: blur(6px);
}

.card {
  background: linear-gradient(180deg, rgba(32, 32, 42, 0.9), rgba(14, 14, 20, 0.95));
  border-color: rgba(255, 255, 255, 0.07);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.card-status {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.card-score {
  background: rgba(7, 7, 12, 0.72);
  backdrop-filter: blur(10px);
}

.compact-rank-item:hover {
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.1), transparent);
  padding-left: 22px;
}

.page-btn,
.filter-item,
.cat-pill,
.sub-tab,
.channel-tab {
  transition: all 0.22s var(--ease);
}

.btn-primary,
.auth-submit-btn,
.btn-comment-submit,
.nav-btn {
  background: linear-gradient(135deg, #7c89f8 0%, #6366f1 42%, #e879f9 100%);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.32);
}

.detail-cover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.detail-title {
  background: linear-gradient(180deg, #fff, #d4d4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.detail-stats-bar {
  background: rgba(7, 7, 12, 0.45);
  border-radius: 14px;
}

.modal-dialog {
  background: linear-gradient(180deg, #1c1c28, #12121a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
}
.modal-overlay {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.toc-drawer-content {
  background: rgba(16, 16, 24, 0.96);
  backdrop-filter: blur(18px);
}

.auth-card {
  backdrop-filter: blur(20px);
}
.auth-card::before {
  background: linear-gradient(90deg, #818cf8, #f472b6, #38bdf8);
  height: 2px;
}

.footer {
  border-top-color: rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.25));
}

body.novel-reader,
body.comic-reader {
  background-image: none;
  isolation: auto;
}
body.novel-reader::before,
body.comic-reader::before {
  display: none;
}

.novel-reader {
  background:
    radial-gradient(800px 280px at 50% -10%, rgba(251, 191, 36, 0.12), transparent 50%),
    #f7ead0;
}
.novel-content {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif SC", serif;
  font-size: 21px;
  line-height: 2.05;
}

.loading-state {
  text-align: center;
  color: var(--muted);
  padding: 28px 0;
}

.chapter-item {
  background: rgba(7, 7, 12, 0.42);
}
.chapter-item:hover {
  background: rgba(129, 140, 248, 0.14);
}

.star-btn.filled {
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.55));
}

.site-toast {
  background: rgba(16, 16, 24, 0.92);
  border-color: rgba(255, 255, 255, 0.16);
}

@media (max-width: 600px) {
  .wrap {
    width: min(100% - 20px, 1220px);
  }
  .ad-carousel-container {
    height: 200px;
    border-radius: 18px;
  }
  .placeholder-title,
  .ad-caption-title {
    font-size: 1.2rem;
  }
  .placeholder-content,
  .ad-carousel-text-wrap,
  .ad-carousel-caption {
    padding: 20px;
  }
  .ad-carousel-btn {
    width: 34px;
    height: 34px;
  }
  .ad-carousel-btn.prev-btn { left: 10px; }
  .ad-carousel-btn.next-btn { right: 10px; }
  .share-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-box {
    border-right: none;
  }
  .rank-card {
    padding: 12px 14px;
    gap: 12px;
  }
  .rank-blurb {
    display: none;
  }
}

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

/* Light-theme adapter: site.css hardcodes many dark-on-white values.
   html.theme-light is set by t_novel_* / t_comic_* packs with Light=true. */
html.theme-light {
  color-scheme: light;
}
html.theme-light body {
  background-attachment: scroll;
}
html.theme-light .topbar {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}
html.theme-light .brand {
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: var(--ink);
}
html.theme-light .nav a:hover,
html.theme-light .nav a.active {
  color: var(--ink);
  background: var(--primary-light);
  border-color: var(--line);
  box-shadow: none;
}
html.theme-light .search input {
  background: var(--bg-card);
  color: var(--ink);
}
html.theme-light .search input:focus {
  background: var(--bg-card);
}
html.theme-light .search button:hover,
html.theme-light .lang-switcher a:hover,
html.theme-light .lang-switcher a.active,
html.theme-light .btn-topbar-login:hover,
html.theme-light .topbar-user-btn,
html.theme-light .footer-links a:hover,
html.theme-light .tabbar a:hover,
html.theme-light .tabbar a.active {
  color: var(--ink);
}
html.theme-light .lang-switcher,
html.theme-light .btn-topbar-login,
html.theme-light .topbar-user-btn {
  background: var(--bg-card);
  border-color: var(--line);
  color: var(--ink-secondary);
}
html.theme-light .lang-switcher a {
  color: var(--muted);
}
html.theme-light .tabbar {
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--line);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}
html.theme-light .tabbar a.active {
  background: var(--primary-light);
}
html.theme-light .ad-carousel-container {
  background: var(--bg-subtle);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
}
html.theme-light .detail-title {
  background: none;
  -webkit-text-fill-color: var(--ink);
  color: var(--ink);
}
html.theme-light .detail-stats-bar,
html.theme-light .modal-dialog,
html.theme-light .toc-drawer-content {
  background: var(--bg-card);
  color: var(--ink);
}
html.theme-light .footer {
  background: transparent;
}

/* Layout-pack skeleton: extra blocks stay off until a theme.css layout table turns them on. */
.layout-block,
.layout-sidebar,
.nav-extra {
  display: none;
}
.card-blurb {
  display: none;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  overflow: hidden;
}
.page-shell {
  display: block;
}
.page-main {
  min-width: 0;
}
.home-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--ink-secondary);
  font-size: 0.86rem;
}
.feature-spot {
  gap: 24px;
  align-items: stretch;
}
.feature-cover {
  display: block;
  min-height: 220px;
  background: var(--bg-subtle) center/cover no-repeat;
  border-radius: var(--radius);
}
.feature-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.feature-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}
.feature-title {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.25;
}
.feature-cta {
  display: inline-flex;
  align-self: flex-start;
  padding: 8px 16px;
  border-radius: var(--radius-sm, 8px);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.top10-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.top10-item a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top10-cover {
  width: 40px;
  height: 54px;
  border-radius: 4px;
  background: var(--bg-subtle) center/cover no-repeat;
  flex-shrink: 0;
}
.card-eps {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
}
.channel-cat-bar {
  margin-top: 14px;
  margin-bottom: 24px;
}
.side-title {
  margin: 16px 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.side-nav,
.side-tree {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-nav a,
.side-tree a {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--ink-secondary);
}
.side-nav a.active,
.side-tree a:hover,
.side-nav a:hover {
  background: var(--bg-subtle);
  color: var(--ink);
}



