/* ============================================================
   91SM v11 · CYBER · DESIRE (single theme, locked)
   Density-first: 5-col grid, tight gaps, info-dense
   ============================================================ */

/* ---------- Reset & root tokens ---------- */

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

/* 全局兜底：HTML5 hidden 属性必须隐藏元素，防止被各组件的 display:flex/grid 压过
   （历史 bug：作者页 404 视图、小说详情展开按钮、阅读器工具栏等被 display 压住一直显示）。
   元素无 hidden 时不受影响，display 照常生效，零副作用。 */

[hidden] { display: none !important; }

*::-moz-selection { background: var(--accent); color: var(--bg); }

*::selection { background: var(--accent); color: var(--bg); }

html { scroll-behavior: smooth; overflow-x: hidden; }

:root {
  /* ---- CYBER · DESIRE palette ---- */
  --bg: #07050d;
  --bg-2: #0f0a1c;
  --bg-3: #181029;
  --bg-4: #1f1838;
  --bg-card: #100924;

  --accent: #ff2e7e;          /* hot magenta */
  --accent-soft: #ff5c9a;     /* softer magenta for hero */
  --accent-2: #9d4edd;         /* electric purple */
  --accent-3: #00d4ff;          /* cyan flicker (NEW) */
  --accent-subtle: rgba(255, 46, 126, 0.4);
  --accent-bg: rgba(255, 46, 126, 0.08);
  --accent-bg-2: rgba(157, 78, 221, 0.1);

  --text: #ece7f5;
  --text-2: #a097c0;
  --text-3: #6a6386;
  --text-4: #463e60;
  --border: #1e163a;
  --border-2: #2e2454;

  --nav-bg: rgba(7, 5, 13, 0.82);
  --menu-bg: rgba(15, 10, 28, 0.97);
  --menu-hover: rgba(255, 46, 126, 0.08);
  --menu-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 46, 126, 0.18);
  --input-bg: #0f0a1c;
  --input-bg-focus: #181029;
  --focus-glow: 0 0 0 1px rgba(255, 46, 126, 0.5), 0 0 20px rgba(255, 46, 126, 0.25);

  --display: 'Space Grotesk', 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;

  --card-glow: 0 6px 24px rgba(255, 46, 126, 0.22), 0 0 0 1px rgba(255, 46, 126, 0.3) inset;

  /* ---- 全局卡片宽高比（单一真相源，全站统一）---- */
  --ratio-video: 16 / 9;    /* 视频类缩略图 */
  --ratio-novel: 2 / 3;     /* 小说类封面 */

  /* ---- 间距 token（t-shirt 命名）— 全站布局 spacing 唯一来源 ----
     使用场景：padding / margin / gap / 定位 offset
     不适用：font-size / border-width / border-radius / icon 尺寸 */
  --space-xs:  4px;
  --space-s:   8px;
  --space-m:  16px;
  --space-l:  24px;
  --space-xl: 40px;
  --space-xxl: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  letter-spacing: 0.01em;
  background-image:
    linear-gradient(rgba(157, 78, 221, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 78, 221, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
}

/* Atmospheric backdrop */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(255, 46, 126, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 100%, rgba(157, 78, 221, 0.08) 0%, transparent 50%);
}

/* Film grain */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.3 0 0 0 0 0.6 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
}

body > * { position: relative; z-index: 2; }

/* ============================================================
   FOOTER 显示规则（全局）
   内容不足一屏时，main 撑满视窗 → footer 自然落在视窗外
   内容超过一屏时，main 按内容长度 → footer 在末尾，滚到底才出现
   ============================================================ */

main { min-height: 100vh; }

/* ============================================================
   TOP NAV — kept dense
   ============================================================ */

.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav-row-1 {
  display: flex;
  align-items: center;
  padding: 12px clamp(var(--space-m), 4vw, var(--space-xxl));
  gap: 22px;
  max-width: 1760px;
  margin: 0 auto;
}

.brand {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  text-shadow: 0 0 24px rgba(255, 46, 126, 0.35);
}

.brand .brand-mark { color: var(--accent); }

.search-box { position: relative; flex: 0 0 360px; margin-left: auto; }

.search-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 9px 14px 9px 38px;
  font-size: 12.5px;
  font-family: var(--sans);
  outline: none;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}

.search-input::-moz-placeholder { color: var(--text-3); }

.search-input::placeholder { color: var(--text-3); }

.search-input:focus { border-color: var(--accent); background: var(--input-bg-focus); box-shadow: var(--focus-glow); }

.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: url('/static/web/images/home/nav/search.png') center / contain no-repeat;
  color: transparent;
  pointer-events: none;
  font-size: 0;
}

.nav-links-flat { display: flex; align-items: center; gap: 0; flex-wrap: nowrap; }

.nav-cat-item { position: relative; }

.nav-cat-trigger {
  background: transparent;
  border: none;
  color: var(--text-2);
  text-decoration: none;
  font-size: 12.5px;
  font-family: var(--sans);
  cursor: default;
  padding: var(--space-s) 11px;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  white-space: nowrap;
  letter-spacing: 0.06em;
  font-weight: 500;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.nav-cat-trigger::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 1.5px;
  background: var(--accent);
  transition: transform 0.25s ease;
  box-shadow: 0 0 8px var(--accent);
}

.nav-cat-item:hover .nav-cat-trigger,
.nav-cat-item.is-active .nav-cat-trigger { color: var(--accent); }

.nav-cat-item:hover .nav-cat-trigger::after,
.nav-cat-item.is-active .nav-cat-trigger::after { transform: translateX(-50%) scaleX(1); }

.nav-menu-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  -o-object-fit: contain;
     object-fit: contain;
  display: inline-block;
}

.cat-dropdown-icon { opacity: 0.5; transition: transform 0.2s, opacity 0.2s; }

.nav-cat-item:hover .cat-dropdown-icon,
.nav-cat-item.is-open .cat-dropdown-icon { transform: rotate(180deg); opacity: 1; }

.nav-cat-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: calc(-1 * var(--space-s));
  right: calc(-1 * var(--space-s));
  height: 14px;
  display: none;
}

.nav-cat-item:hover::after,
.nav-cat-item.is-open::after { display: block; }

.cat-submenu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 170px;
  background: var(--menu-bg);
  backdrop-filter: blur(28px);
  border: 1px solid var(--border-2);
  box-shadow: var(--menu-shadow);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, visibility 0s linear 0.2s;
  z-index: 200;
}

.nav-cat-item:hover .cat-submenu,
.nav-cat-item.is-open .cat-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.2s, transform 0.2s, visibility 0s;
}

.cat-submenu::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.cat-sub-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px var(--space-m);
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: all 0.15s ease;
  letter-spacing: 0.04em;
}

.cat-sub-link::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 60%;
  background: var(--accent);
  transition: transform 0.15s ease;
}

.cat-sub-link:hover {
  color: var(--text);
  background: var(--menu-hover);
  padding-left: 22px;
}

.cat-sub-link:hover::before { transform: translateY(-50%) scaleY(1); }

.cat-sub-link .sub-arrow {
  opacity: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  transition: opacity 0.15s, transform 0.15s;
  transform: translateX(-4px);
}

.cat-sub-link:hover .sub-arrow { opacity: 1; transform: translateX(0); }

.nav-link-soon {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 12.5px;
  font-family: var(--sans);
  cursor: pointer;
  padding: var(--space-s) 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.nav-link-soon:hover { color: var(--text-2); }

.soon-badge {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-3);
  border: 1px solid var(--border-2);
  padding: 1px 5px;
  letter-spacing: 0.12em;
}

.mobile-menu-btn, .mobile-search-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
}

.mobile-menu-btn { flex-direction: column; justify-content: space-around; width: 22px; height: 18px; padding: 0; }

.mobile-menu-btn span { display: block; height: 2px; width: 100%; background: var(--text); transition: 0.3s; }

.mobile-menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }

.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }

.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-search-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent url('/static/web/images/home/nav/mobile-search.png') center / 24px 24px no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.login-btn {
  background: transparent;
  border: 1px solid var(--accent-subtle);
  color: var(--accent);
  padding: var(--space-s) 18px;
  font-size: 12px;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.14em;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  z-index: 0;
  text-transform: uppercase;
}

.login-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.login-btn:hover { color: var(--bg); border-color: var(--accent); box-shadow: 0 0 20px rgba(255, 46, 126, 0.4); }

.login-btn:hover::before { transform: translateY(0); }

/* ============================================================
   SIDEBAR
   ============================================================ */

/* ============================================================
   MOBILE DRAWER — 紧凑 · 统一 · 有质感
   ============================================================ */

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sidebar-overlay.active { opacity: 1; pointer-events: auto; }

.categories-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 82vw;
  max-width: 340px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  border-right: 1px solid var(--border);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.categories-sidebar.active { transform: translateX(0); }

/* ---- 顶部 logo + 关闭 ---- */

.sidebar-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-brand { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.03em; }

.sidebar-brand span { color: var(--accent); }

.sidebar-close {
  background: transparent; border: none; color: var(--text-3); cursor: pointer;
  padding: 6px; border-radius: 6px; transition: color 0.15s, background 0.15s;
}

.sidebar-close:hover { color: var(--accent); background: rgba(255, 46, 126, 0.08); }

/* ---- 分类标签 ---- */

.mobile-section-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-3);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 10px 0 6px;
}

/* ---- Accordion 一级分类 ---- */

.mobile-cat-group { }

.mobile-cat-group + .mobile-cat-group { border-top: 1px solid rgba(30, 22, 58, 0.5); }

.mobile-cat-header {
  display: flex; align-items: center;
  padding: 10px 0;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  border-radius: 6px;
  transition: background 0.15s;
}

.mobile-cat-header:active { background: rgba(255, 46, 126, 0.06); }

.mobile-cat-header .cat-name {
  flex: 1; font-size: 13.5px; font-weight: 600; color: var(--text);
  transition: color 0.15s;
}

.mobile-cat-header .cat-count {
  font-family: var(--mono); font-size: 10px; color: var(--text-3);
  margin-right: 6px; letter-spacing: 0.02em;
}

.mobile-cat-header .cat-chevron {
  display: flex; color: var(--text-3);
  transition: transform 0.22s ease, color 0.15s;
}

.mobile-cat-header:hover .cat-name,
.mobile-cat-header:hover .cat-chevron { color: var(--accent); }

.mobile-cat-group.is-closed .cat-chevron { transform: rotate(-90deg); }

/* ---- 子分类 ---- */

.mobile-cat-subs {
  overflow: hidden;
  max-height: 240px;
  transition: max-height 0.25s ease;
  padding-left: 14px;
}

.mobile-cat-group.is-closed .mobile-cat-subs { max-height: 0; }

.mobile-sub-item {
  display: block;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}

.mobile-sub-item:hover,
.mobile-sub-item:active {
  color: var(--accent);
  background: rgba(255, 46, 126, 0.06);
}

/* ---- 旧版简单列表项（兼容） ---- */

.mobile-cat-item {
  display: flex; align-items: center;
  width: 100%;
  padding: 10px 0;
  background: transparent; border: none;
  text-align: left; text-decoration: none;
  cursor: pointer;
}

.mobile-cat-item .cat-name { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--text); }

.mobile-cat-item .cat-count { font-family: var(--mono); font-size: 10px; color: var(--text-3); margin-right: 8px; }

.mobile-cat-item .cat-arrow { font-family: var(--mono); font-size: 12px; color: var(--text-3); }

.mobile-cat-item:hover .cat-name, .mobile-cat-item:hover .cat-arrow { color: var(--accent); }

/* ---- 分隔线（分类区 vs 入口区） ---- */

.mobile-divider { height: 1px; background: var(--border); margin: 10px 0; }

/* ---- 底部入口区（标签/小说/回家方法/更多好站） ---- */

.mobile-nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 9px 8px;
  background: transparent; border: none;
  color: var(--text-2); font-size: 13px;
  cursor: pointer; text-align: left; text-decoration: none;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
  color: var(--text);
  background: rgba(255, 46, 126, 0.06);
}

.nav-icon { display: flex; align-items: center; width: 20px; color: var(--text-3); flex-shrink: 0; }

.mobile-nav-item:hover .nav-icon { color: var(--accent); }

.nav-text { flex: 1; font-weight: 500; }

.nav-arrow { color: var(--text-3); }

.nav-badge {
  font-family: var(--mono); font-size: 9px;
  color: var(--accent); border: 1px solid rgba(255, 46, 126, 0.25);
  padding: 1px 5px; letter-spacing: 0.08em; border-radius: 3px;
}

/* ---- 底部用户区 ---- */

.mobile-sidebar-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.mobile-login-btn {
  width: 100%; padding: 10px;
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-size: 11px;
  cursor: pointer;
  letter-spacing: 0.15em;
  font-weight: 500;
  text-transform: uppercase;
  border-radius: 6px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.mobile-login-btn:hover { border-color: var(--accent); color: var(--accent); }

.mobile-login-btn:active { background: rgba(255, 46, 126, 0.08); }

/* ============================================================
   MAIN — density-first
   ============================================================ */

.main {
  max-width: 1760px;
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 48px) 36px;
}

/* ---------- FLOOR ---------- */

.floor {
  margin-bottom: 44px;
  position: relative;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.floor.in-view { opacity: 1; transform: translateY(0); }

/* ============================================================
   BREADCRUMB — shared by list / video-detail / search pages
   ============================================================ */

.breadcrumb {
  max-width: 1760px;
  margin: 0 auto;
  padding: var(--space-m) clamp(var(--space-m), 4vw, var(--space-xxl)) 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.breadcrumb:empty { display: none; }

.breadcrumb a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.18s;
  padding: 2px 0;
}

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

.breadcrumb .crumb-sep {
  color: var(--text-3);
  opacity: 0.5;
  margin: 0 2px;
  font-size: 11px;
}

/* 中间不可点段（"主题"虚拟段、被锁的一级分类等）—— 比链接更弱，无 hover，不加粗 */

.breadcrumb .crumb-label {
  color: var(--text-3);
  cursor: default;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.breadcrumb .crumb-current {
  color: var(--text);
  font-weight: 600;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .breadcrumb { padding-top: 12px; font-size: 12px; }
  .breadcrumb .crumb-current { max-width: 200px; }
}

.floor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-2);
  position: relative;
}

.floor-head::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.floor-head-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.floor-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  text-shadow: 0 0 14px rgba(255, 46, 126, 0.15);
}

.floor-en {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 500;
}

.floor-more {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.18em;
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s, letter-spacing 0.3s;
  padding: var(--space-xs) 0;
}

.floor-more:hover { color: var(--accent); letter-spacing: 0.22em; }

/* ---------- VIDEO GRID ----------
   断点策略：
   ≥1920px → 7列  |  1440–1919px → 6列（base）  |  1024–1439px → 5列
   768–1023px → 4列  |  <768px → 2列
   列宽用 1fr（随容器自适应），卡片内部 max-width: 360px 限制超宽屏
   ------------------------------------------------------------------ */

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* ---------- VIDEO CARD ---------- */

.video-card {
  background: transparent;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.in-view .video-card { opacity: 1; transform: translateY(0); transition-delay: calc(var(--i, 0) * 25ms); }

.in-view .video-card:hover { transform: scale(1.03); }

.video-card:hover .thumb {
  box-shadow: 0 8px 28px rgba(255, 46, 126, 0.2), 0 2px 8px rgba(0, 0, 0, 0.4);
  filter: brightness(1.12);
}

.video-card:hover .thumb-overlay { opacity: 1; }

.video-card:hover .thumb-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.video-card:hover .card-title { color: var(--accent); }

.thumb {
  position: relative;
  aspect-ratio: var(--ratio-video);  /* 默认视频比例 16:9，可由 .thumb--novel 等修饰类覆盖 */
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a0e2e 0%, #08051a 60%, #06030f 100%);
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s, box-shadow 0.25s;
  isolation: isolate;
}

/* 全局比例工具类（视频/小说），全站缩略图统一在此控制 */

.thumb--video { aspect-ratio: var(--ratio-video); }

.thumb--novel { aspect-ratio: var(--ratio-novel); }

.video-card:nth-child(2n) .thumb { background: linear-gradient(135deg, #2a0a26 0%, #0a081a 70%); }

.video-card:nth-child(3n) .thumb { background: linear-gradient(135deg, #1c0a30 0%, #06030d 100%); }

.video-card:nth-child(5n) .thumb { background: linear-gradient(135deg, #240a1f 0%, #0a0518 100%); }

.video-card:hover .thumb { border-color: var(--accent); box-shadow: var(--card-glow); }

.thumb-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0px, transparent 3px, rgba(255, 46, 126, 0.04) 3px, rgba(255, 46, 126, 0.04) 4px),
    linear-gradient(135deg, rgba(255, 46, 126, 0.1) 0%, transparent 50%, rgba(157, 78, 221, 0.16) 100%);
  opacity: 1;
  transition: opacity 0.3s, transform 0.5s ease;
}

.video-card:hover .thumb-pattern { transform: scale(1.05); opacity: 1.2; }

.thumb-pattern::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(0, 0, 0, 0.18) 2px, rgba(0, 0, 0, 0.18) 3px);
  pointer-events: none;
}

.thumb-theme {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(236, 231, 245, 0.32);
  text-align: center;
  text-shadow: 0 0 14px rgba(255, 46, 126, 0.35), 0 0 28px rgba(157, 78, 221, 0.25);
  z-index: 2;
  padding: 0 14px;
  line-height: 1.2;
}

.thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 46, 126, 0.18) 0%, transparent 40%, rgba(157, 78, 221, 0.22) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 4;
  box-shadow: 0 0 24px var(--accent), 0 0 60px rgba(255, 46, 126, 0.4);
}

.thumb-play svg { width: 16px; height: 16px; fill: currentColor; margin-left: 3px; }

.duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  z-index: 5;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.views-chip {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  z-index: 5;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.views-chip svg { color: var(--text-2); }

/* Card body */

.card-body {
  padding: 9px 2px 2px;
}

.card-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
  letter-spacing: 0.02em;
}

/* ============================================================
   FOOTER (91女同-style navigation directory)
   ============================================================ */

.site-footer {
  margin-top: var(--space-l);
  background: linear-gradient(180deg, transparent 0%, rgba(15, 10, 28, 0.85) 30%, rgba(15, 10, 28, 0.95) 100%);
  border-top: 1px solid var(--border-2);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.footer-inner {
  max-width: 1760px;
  margin: 0 auto;
  padding: 32px clamp(var(--space-m), 4vw, var(--space-xxl)) var(--space-l);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-col { display: flex; flex-direction: column; }

.footer-brand .footer-logo {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  text-shadow: 0 0 20px rgba(255, 46, 126, 0.35);
}

.footer-brand .footer-logo span { color: var(--accent); }

.footer-tagline {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: var(--space-s);
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.footer-addr-block {
  margin-top: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 320px;
}

.addr-row {
  display: flex;
  align-items: stretch;
  height: 28px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  transition: border-color 0.2s;
}

.addr-row:hover { border-color: var(--accent-subtle); }

.addr-tag {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-s);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--text-3);
  background: var(--bg-2);
  border-right: 1px solid var(--border-2);
  text-transform: uppercase;
  flex-shrink: 0;
}

.addr-row[data-kind="primary"] .addr-tag {
  color: var(--accent);
  background: var(--accent-bg);
}

.addr-code {
  flex: 1;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: transparent;
  -webkit-user-select: all;
     -moz-user-select: all;
          user-select: all;
}

.addr-copy {
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-2);
  color: var(--text-3);
  padding: 0 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  flex-shrink: 0;
}

.addr-copy:hover { color: var(--accent); background: var(--accent-bg); }

.addr-copy.copied { color: var(--accent-3); }

.addr-copy.copied::after {
  content: '已复制';
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  margin-left: 6px;
}

.addr-copy.copied svg { display: none; }

.footer-h {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--space-m);
  position: relative;
  padding-bottom: var(--space-s);
}

.footer-h::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.footer-link {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  text-decoration: none;
  padding: var(--space-xs) 0;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: color 0.18s, padding-left 0.18s;
}

.footer-link:hover { color: var(--accent); padding-left: 6px; }

.footer-link-tg { color: var(--accent); }

.footer-link-tg .tg-arrow { font-family: var(--mono); font-size: 11px; opacity: 0.7; }

/* 手风琴箭头：PC 隐藏，仅 H5 折叠态显示 */

.footer-h .acc-arrow { display: none; }

.footer-bar {
  border-top: 1px solid var(--border);
  padding: 14px clamp(var(--space-m), 4vw, var(--space-xxl));
  max-width: 1760px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.15em;
}

.footer-copy { text-transform: uppercase; }

.footer-marks { display: flex; align-items: center; gap: 10px; }

.mark {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  padding: 3px var(--space-s);
  letter-spacing: 0.1em;
  border: 1px solid var(--text-3);
  color: var(--text-2);
}

.mark-18 { background: var(--accent); border-color: var(--accent); color: #fff; }

.mark-rta { color: var(--accent-3); border-color: var(--accent-3); }

.mark-text {
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: none;
  margin-left: 6px;
}

/* ============================================================
   NAV FLAT LINK (回家方法 etc.)
   ============================================================ */

.nav-flat-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.nav-flat-link:hover { color: var(--accent); background: var(--accent-bg); }

/* 选中态：accent 色 + 底部 glow 指示线 */

.nav-flat-link.is-active { color: var(--accent); }

.nav-flat-link.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1.5px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  border-radius: 1px;
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(7,5,13,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.search-overlay.is-open { display: flex; opacity: 1; pointer-events: auto; }

.search-overlay__panel {
  width: 620px;
  max-width: 94vw;
  max-height: 72vh;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,46,126,0.12);
  display: flex;
  flex-direction: column;
}

.search-overlay__input-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--space-m) 20px;
  border-bottom: 1px solid var(--border);
}

.search-overlay__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-family: var(--sans);
}

.search-overlay__input::-moz-placeholder { color: var(--text-3); }

.search-overlay__input::placeholder { color: var(--text-3); }

.search-overlay__esc {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  border: 1px solid var(--border-2);
  padding: 2px var(--space-s);
  border-radius: 4px;
  letter-spacing: 0.06em;
}

.search-overlay__close {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: var(--space-xs);
  display: flex;
  align-items: center;
}

.search-overlay__close:hover { color: var(--accent); }

.search-overlay__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-m) 20px;
}

.search-block { margin-bottom: 20px; }

.search-block__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.search-block__title { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0.04em; }

.search-block__action { background: none; border: none; font-size: 12px; color: var(--text-3); cursor: pointer; }

.search-block__action:hover { color: var(--accent); }

.recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-s) 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  height: 38px;
}

.recent-row:hover, .recent-row.is-hovered { background: rgba(255,46,126,0.06); }

.recent-row__left { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; }

.hot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); }

.hot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
  font-size: 13px;
  color: var(--text-2);
}

.hot-row:hover { background: rgba(255,46,126,0.06); }

.hot-row__rank { font-family: var(--mono); font-size: 12px; color: var(--text-3); min-width: 20px; text-align: center; }

.hot-row__rank--top { font-size: 14px; }

.hot-row__word { flex: 1; }

.hot-row__hot { font-family: var(--mono); font-size: 9px; color: var(--accent); border: 1px solid var(--accent); padding: 1px 5px; border-radius: 3px; letter-spacing: 0.08em; }

.search-tag-group { margin-bottom: 12px; }

.search-tag-group__title { font-size: 12px; color: var(--text-3); margin-bottom: var(--space-s); }

.search-tag-group__chips { display: flex; flex-wrap: wrap; gap: var(--space-s); }

.search-chip {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.search-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* 1440px 以下 → footer 调整（video-grid 保持 4 列） */

@media (max-width: 1439px) {
  .footer-inner { grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* 1280px 以下 → 3 列（与合集页对齐） */

@media (max-width: 1280px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 980px 以下 → nav 折叠等 UI 调整 */

@media (max-width: 980px) {
  .nav-links-flat, .search-box, .nav-flat-link { display: none; }
  .mobile-menu-btn { display: flex; }
  .mobile-search-btn { display: block; }
  /* ---- H5 搜索 overlay ---- */
  .search-overlay { padding-top: 0; align-items: stretch; justify-content: stretch; }
  .search-overlay__panel {
    max-width: 100%;
    width: 100%;
    /* 100dvh：虚拟键盘弹起时自动收缩到剩余可见区域 */
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }
  /* 防止 iOS 在 font-size < 16px 时自动缩放页面 */
  .search-overlay__input { font-size: 16px; }
  /* 隐藏 PC 专属 ESC 提示 */
  .search-overlay__esc { display: none; }
  /* 结果区填满剩余高度，键盘弹起后保持可滚动 */
  .search-overlay__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .nav-row-1 { justify-content: space-between; }
  .brand { font-size: 20px; flex: 1; text-align: center; }
  .nav-actions { display: none; }
  .main { padding-top: var(--space-m); padding-bottom: 30px; }
  .floor { margin-bottom: 36px; }
  .floor-title { font-size: 18px; }
  .floor-en { display: none; }
  .thumb-theme { font-size: 14px; }
  .video-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  /* Footer H5: 91女同紧凑格式 — 3列横排 + 品牌下移居中 */
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0 8px;
    padding-top: 24px;
    padding-bottom: 16px;
  }
  .footer-col { grid-row: 1; }
  .footer-brand {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
  }
  .footer-brand .footer-logo { font-size: 18px; }
  .footer-tagline { font-size: 11px; margin: 6px auto 0; max-width: 280px; }
  .footer-addr-block { display: none; }
  .footer-h { font-size: 11px; margin-bottom: 8px; padding-bottom: 6px; }
  .footer-h::after { width: 14px; }
  .footer-link { font-size: 11px; padding: 2px 0; }
  .footer-link:hover { padding-left: 0; }
  .footer-bar { flex-direction: column; gap: 8px; text-align: center; padding: 12px 16px; }
  .footer-bar .footer-marks { justify-content: center; }
  .mark-text { display: none; }
}

@media (max-width: 640px) {
  .main { padding-top: 14px; padding-bottom: 28px; }
  .thumb-theme { font-size: 13px; }
  .card-title { font-size: 12px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* ===== Footer 手风琴（覆盖上方 980px 的 3 列网格） ===== */
  .footer-inner { display: block; padding-top: 20px; padding-bottom: 8px; }
  .footer-brand {
    grid-column: auto; grid-row: auto;
    text-align: center; padding: 0 0 18px; margin: 0 0 4px;
    border-top: none; border-bottom: 1px solid var(--border);
  }
  .footer-brand .footer-logo { font-size: 18px; }
  .footer-tagline { font-size: 11px; margin: 6px auto 0; max-width: 280px; }
  .footer-addr-block { display: none; }
  .footer-acc .footer-h {
    cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0; padding: 14px 2px; border-bottom: 1px solid var(--border);
    font-size: 12px;
  }
  .footer-acc .footer-h::after { display: none; }
  .footer-acc .footer-h .acc-arrow {
    display: inline-block; font-size: 13px; color: var(--text-3); transition: transform .22s;
  }
  .footer-acc.open .footer-h .acc-arrow { transform: rotate(180deg); }
  .footer-acc .footer-col-links { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  .footer-acc.open .footer-col-links { max-height: 280px; }
  .footer-acc .footer-link { padding: 9px 2px; font-size: 12.5px; }
}

/* Screen-reader only */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Scrollbar */

::-webkit-scrollbar { width: 10px; height: 10px; }

::-webkit-scrollbar-track { background: var(--bg); }

::-webkit-scrollbar-thumb { background: var(--border-2); border: 2px solid var(--bg); }

::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   NOVEL CARD + COVER 全局组件
   - 封面 2:3（用 --ratio-novel 变量）
   - 36 套程序生成（6 渐变 × 6 纹理），紫色基底
   - hover / CTA / 焦点 用 91SM 粉色（accent）
   ============================================================ */

/* ---------- 卡片外壳 ---------- */

/* ============================================================
   .book-card — 列表卡（PC: 标题在封面内, hover 显示简介 / H5: 卡下方独立标题）
   - PC (>=768px): 默认显示底部蒙层 + 标题；hover 加深蒙层 + 显示简介
   - H5 (<768px): 封面纯净（无叠加），标题在卡下方独立一行
   - 不显示：作者 / 字数 / 章数 / tag / 评分 / 状态角标
   ============================================================ */

.book-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: transform 0.25s;
}

.book-card:hover { transform: translateY(-8px) scale(1.04); }

.book-card:hover .book-cover {
  border-color: var(--accent);
  box-shadow: 0 18px 38px -18px rgba(255, 46, 126, 0.4), 0 0 0 1px rgba(255, 46, 126, 0.3);
}

/* ---------- 封面：2:3 抽象生成（容器层） ---------- */

.book-cover {
  position: relative;
  aspect-ratio: var(--ratio-novel);
  border-radius: 8px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: block;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.book-cover::before,
.book-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 6 套渐变背景：91SM 赛博暗夜色系（与 .s-thumb 视频卡同源）
   特点：暗到近黑、紫色饱和度低、偏暗紫/暗红紫 */

.bc-g1::before { background: linear-gradient(135deg, #1a0e2e 0%, #08051a 60%, #06030f 100%); }

.bc-g2::before { background: linear-gradient(135deg, #2a0a26 0%, #0a081a 70%); }

.bc-g3::before { background: linear-gradient(150deg, #1c0a30 0%, #06030d 100%); }

.bc-g4::before { background: linear-gradient(115deg, #240a1f 0%, #0a0518 100%); }

.bc-g5::before { background: linear-gradient(160deg, #1f0a2e 0%, #1a0830 50%, #06030f 100%); }

.bc-g6::before { background: linear-gradient(135deg, #2e0a1f 0%, #1a0828 60%, #06030f 100%); }

/* 6 套几何叠加纹理：粉色 leak 为主、紫色辅助、91SM 标志性水平扫描线 */

.bc-p1::after {
  background:
    radial-gradient(60% 90% at 30% 20%, rgba(255, 46, 126, 0.20), transparent 65%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 46, 126, 0.05) 3px 4px);
}

.bc-p2::after {
  background:
    repeating-radial-gradient(circle at 70% 90%, rgba(255, 46, 126, 0.16) 0 1px, transparent 1px 14px),
    radial-gradient(45% 60% at 70% 30%, rgba(255, 46, 126, 0.14), transparent 70%);
}

.bc-p3::after {
  background: conic-gradient(from 200deg at 50% 50%, rgba(157, 78, 221, 0.20), rgba(255, 46, 126, 0.12) 30%, transparent 65%);
  -webkit-mask: radial-gradient(circle at 50% 50%, black 0%, black 70%, transparent 100%);
          mask: radial-gradient(circle at 50% 50%, black 0%, black 70%, transparent 100%);
}

.bc-p4::after {
  background:
    radial-gradient(40% 55% at 50% 100%, rgba(255, 46, 126, 0.24), transparent 65%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 46, 126, 0.04) 3px 4px);
}

.bc-p5::after {
  background:
    radial-gradient(35% 45% at 25% 30%, rgba(255, 46, 126, 0.20), transparent 70%),
    radial-gradient(25% 35% at 75% 70%, rgba(157, 78, 221, 0.22), transparent 70%);
}

.bc-p6::after {
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 46, 126, 0) 0deg 14deg, rgba(255, 46, 126, 0.12) 14deg 15deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, black 30%, transparent 85%);
          mask: radial-gradient(circle at 50% 50%, black 30%, transparent 85%);
}

/* 封面右下题材标签 */

.bc-genre {
  position: relative;
  z-index: 2;
  align-self: flex-end;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  border: 1px solid rgba(192, 132, 252, 0.45);
  padding: 3px var(--space-s);
  border-radius: 999px;
  background: rgba(15, 8, 32, 0.4);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

/* 封面右上状态徽章 */

.bc-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 3px var(--space-s);
  border-radius: 4px;
  background: rgba(15, 8, 32, 0.78);
  backdrop-filter: blur(6px);
  white-space: nowrap;
  text-transform: uppercase;
}

.bc-status.is-done {
  color: var(--accent);
  border: 1px solid rgba(255, 46, 126, 0.5);
}

.bc-status.is-ongoing {
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

/* 封面角标全局取消：完结 / 连载中 / 短篇 一律不显示
   HTML 仍输出（保留语义 + 详情页标题旁的 chip 仍可见，因为不在 .book-cover 内） */

.book-cover .bc-status { display: none; }

/* ============================================================
   .book-cover 内部：蒙层 + 标题 overlay + hover 简介 overlay
   ============================================================ */

/* 底部渐变蒙层（默认态从 40% 处开始渐变） */

.bc-fade {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg,
    transparent 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.55) 75%,
    rgba(0, 0, 0, 0.85) 100%);
  transition: background 0.25s ease;
  /* 移出时延迟 0.3s（CSS-only 移出延迟，避免快速划过的抖动）*/
  transition-delay: 0.3s;
}

.book-card:hover .bc-fade {
  background: linear-gradient(180deg,
    transparent 0%,
    transparent 28%,
    rgba(0, 0, 0, 0.55) 48%,
    rgba(0, 0, 0, 0.90) 62%,
    rgba(0, 0, 0, 0.96) 100%);
  transition-delay: 0s;
}

/* 封面内标题 overlay（默认常驻底部；hover 时上移给简介让位，与首屏大卡片行为一致）*/

.bc-title-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: var(--space-m);
  z-index: 4;
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: bottom 0.28s ease;
  transition-delay: 0.3s;
}

/* hover：标题上移，为底部简介留出足够空间
   计算：简介 3 行 × 12px × 1.65 ≈ 60px + padding-top 12px + 底边距 16px = 87px
   再加 14px gap → 标题 bottom = 101px，取整 100px */

.book-card:hover .bc-title-overlay {
  bottom: 100px;
  transition-delay: 0s;
}

/* 封面内简介 overlay（底部锚定，hover 淡入；标题在其上方）
   与首屏大卡片相同的信息层次：上方标题 → 下方简介 */

.bc-synopsis-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: var(--space-m);   /* 锚定在底部，与标题默认位置相同 */
  z-index: 4;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
  opacity: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
  transition-delay: 0.3s;
  padding-top: 12px;        /* 与标题之间的呼吸空间 */
}

.book-card:hover .bc-synopsis-overlay {
  opacity: 1;
  transition-delay: 0s;
}

/* ---------- 卡片下方信息块（H5 用：标题独立一行；PC 默认 display:none） ---------- */

.book-info {
  display: none;            /* PC 端隐藏，由封面内 overlay 显示标题 */
  padding: 2px 2px 0;
  flex-direction: column;
  gap: var(--space-xs);
}

.book-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.18s;
}

.book-card:hover .book-title { color: var(--accent); }

/* ---------- 768px 及以下：H5 布局 ---------- */

@media (max-width: 768px) {
  /* 封面内一切叠加全部隐藏（纯净封面） */
  .bc-fade,
  .bc-title-overlay,
  .bc-synopsis-overlay { display: none; }
  /* 卡下方独立标题行显示 */
  .book-info { display: flex; }
}

/* ---------- 以下保留旧的 .book-views 类 ---------- */

.book-views {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.02em;
  margin: 0;
}

.book-views svg { color: var(--text-3); }

/* ============================================================
   F1 · HERO 大卡（左信息 + 右图 + 底部 rail 小卡条）
   ============================================================ */

.hero-block { margin-top: 18px; }

.hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #140a1e;
  display: flex;
}

/* 左侧信息板块 */

.hero-left {
  width: 40%; flex-shrink: 0;
  padding: 48px 2% 0 4%;
  position: relative; z-index: 2;
}

.hero-title {
  font-size: 76px; font-weight: 800; letter-spacing: 8px; line-height: 1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6); margin-bottom: 20px;
}

.hero-cats {
  font-size: 15px; color: var(--accent-soft); margin-bottom: 16px; letter-spacing: 1px;
}

.hero-desc {
  font-size: 14px; line-height: 1.8; color: var(--text-2); margin-bottom: 18px; max-width: 92%;
}

.hero-tags { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; justify-content: flex-start; }

.hero-tags .tag {
  margin: 0; /* 覆盖全局 .main { margin: 0 auto } 防止 chip 撑开 flex 空间 */
  font-size: 12px; padding: 4px 12px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.07); color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-tags .tag.main {
  background: rgba(255, 46, 126, 0.16); color: var(--accent-soft);
  border-color: rgba(255, 46, 126, 0.3);
}

.hero-views { font-size: 13px; color: var(--text-3); }

/* 右侧图片板块 */

.hero-right { flex: 1; position: relative; aspect-ratio: 16/9; }

.hero-right img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -o-object-fit: cover;
     object-fit: cover; display: block;
}

/* 右图左缘横向过渡渐变 */

.hero-right::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, #140a1e 0%, rgba(20, 10, 30, 0.55) 16%, transparent 42%);
}

/* 底部渐变 */

.hero-bottom-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 44%; z-index: 3;
  background: linear-gradient(0deg, #0c0612 0%, rgba(12, 6, 18, 0.94) 34%, rgba(12, 6, 18, 0.5) 70%, transparent 100%);
  pointer-events: none;
}

/* ── 轮播小卡条：嵌入大卡底部 ── */

.rail-base {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 0 18px 16px;
}

.rail {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px;
  align-items: start;
}

.scard { cursor: pointer; min-width: 0; align-self: start; }

.scard .thumb {
  aspect-ratio: 16/9; border-radius: 8px;
  background: linear-gradient(150deg, #2a1430, #140a1e);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.scard .thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover;
}

.scard .thumb .label {
  position: relative; z-index: 1;
  font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.92);
  letter-spacing: 1px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.scard .thumb .dur {
  position: absolute; right: 6px; bottom: 6px;
  font-size: 11px; color: #fff;
  background: rgba(0, 0, 0, 0.65); padding: 2px 6px; border-radius: 4px;
}

.scard .cap {
  margin-top: 7px; font-size: 12px; color: rgba(255, 255, 255, 0.82);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.scard:hover .thumb {
  transform: scale(1.05);
  box-shadow: 0 0 0 1px rgba(255, 46, 126, 0.4), 0 8px 26px rgba(255, 46, 126, 0.3);
  border-color: rgba(255, 46, 126, 0.5);
}

.scard.active .thumb {
  box-shadow: 0 0 0 2px rgba(255, 46, 126, 0.8), 0 0 24px rgba(255, 46, 126, 0.5);
  border-color: var(--accent);
}

.scard.active .cap { color: var(--accent-soft); font-weight: 500; }

/* ---- Hero 响应式 ---- */

@media (max-width: 1280px) {
  .rail { grid-template-columns: repeat(4, 1fr); }
  .hero-title { font-size: 52px; }
  .hero-left { width: 46%; }
}

/* 桌面端隐藏 H5 轮播 */

.m-hero-carousel { display: none; }

@media (max-width: 760px) {
  /* H5: hero 改为横屏轮播卡片条 */
  .hero { display: none; }

  .m-hero-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 8px 16px 4px;
    scrollbar-width: none;
  }
  .m-hero-carousel::-webkit-scrollbar { display: none; }

  .m-hero-card {
    flex: 0 0 78vw;
    scroll-snap-align: start;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: var(--bg-2);
    text-decoration: none;
    color: inherit;
  }
  .m-hero-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    -o-object-fit: cover;
       object-fit: cover;
    display: block;
  }
  .m-hero-card .m-hero-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 28px 12px 10px;
    background: linear-gradient(0deg, rgba(7,5,13,0.92) 0%, rgba(7,5,13,0.5) 60%, transparent 100%);
  }
  .m-hero-card .m-hero-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .m-hero-card .m-hero-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-3);
    font-family: var(--mono);
  }
  .m-hero-card .m-hero-dur {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 10px;
    font-family: var(--mono);
    padding: 2px 6px;
    border-radius: 4px;
  }
  .m-hero-card.is-active {
    box-shadow: 0 0 0 2px var(--accent), 0 4px 16px rgba(255,46,126,0.3);
  }
}

/* ============================================================
   法务 / 帮助页（legal-wrap）— CYBER · DESIRE
   ============================================================ */

.legal-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px clamp(var(--space-m), 4vw, var(--space-xl)) 80px;
}

.legal-title {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 6px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  text-shadow: 0 0 24px rgba(255, 46, 126, 0.25);
}

.legal-title small {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.legal-sec { margin-bottom: 26px; }

.legal-sec h2 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-sec h2 small {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.05em;
}

.legal-sec p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-2);
  margin: 0 0 8px;
}

.legal-sec p.en {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-3);
}

.legal-sec ul { margin: 4px 0 0; padding-left: 20px; }

.legal-sec li { font-size: 13px; line-height: 1.9; color: var(--text-2); }

.legal-sec strong { color: var(--accent); font-weight: 600; }

.legal-link { color: var(--accent); text-decoration: none; }

.legal-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .legal-wrap { padding: 36px 16px 56px; }
  .legal-title { font-size: 23px; }
}
