/* ============================================================
   LUMO 流明 — 视觉系统（v21：亮/暗双主题 + 背景纹理）
   暗色沿用原项目深色底 + 琥珀橙强调；亮色为暖纸底 + 同色系深琥珀。
   主题由 <html data-theme="light|dark"> 切换，缺省走系统偏好
   （首屏前由 index.html 内联防闪烁脚本写入，避免白屏一下）。
   ============================================================ */

:root {
  color-scheme: dark;
  /* 底色取近黑而非灰蓝：影视站的画布应该像影院暗厅，
     海报的色彩才是主角（Netflix #141414 的同款思路） */
  --bg: #0e0f13;
  --bg-elevated: #16181e;
  --bg-card: #1d2027;
  --bg-hover: #262a33;

  --text-primary: #f4f5f7;
  --text-secondary: #9aa0a8;
  --text-muted: #6a707a;

  /* 琥珀是品牌色，按主流范式的"色彩配给"原则收敛使用：
     只出现在主 CTA、当前导航、选中态和关键 hover 上，其余一律白/灰 */
  --accent: #f5a623;
  --accent-soft: rgba(245, 166, 35, 0.14);
  --accent-bright: #ffc44d;
  /* 文字态强调色：暗色下与填充同值；亮色底要加深一档保小字对比度 */
  --accent-text: #f5a623;
  --accent-border: rgba(245, 166, 35, 0.4);
  --accent-border-soft: rgba(245, 166, 35, 0.28);
  /* v37 引入 / v46 修订：压在琥珀填充上的文字色。
     两套主题的琥珀都是亮色 → 统一用深字，组件写法共用一份。 */
  --on-accent: #1a1205;

  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  /* 静止卡片无投影、只留极淡描边（层级靠底色明度差），
     hover 时才把投影还回来——这是"内容优先"的关键细节 */
  --shadow-lift: 0 12px 32px rgba(0, 0, 0, 0.55);
  --shadow-header: 0 6px 28px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.2, 0, 0.2, 1);

  --font: "PingFang SC", "Microsoft YaHei", Inter, system-ui, -apple-system, sans-serif;

  /* ---- 背景纹理（v21）----
     「流明」的意象是放映机打出的那束光：顶部中央一汪极淡的琥珀光晕，
     再叠一层全屏细颗粒模拟银幕肌理。两层都压到几乎不可察觉——
     是"质感"不是"图案"，且不增加任何网络请求（噪点是内联 data-URI）。 */
  --glow: rgba(245, 166, 35, 0.055);
  /* feTurbulence 生成的噪点经 feColorMatrix 转成纯白、alpha 乘以 0.05：
     平均透明度 ~2.5%，只在暗部上提供一点点"呼吸感" */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");

  /* ---- 派生半透明色：按主题重定义，避免组件里散落硬编码 rgba ---- */
  --bg-rgb: 14, 15, 19;            /* rgba(var(--bg-rgb), a) 得页面底色系半透明 */
  --fill-soft: rgba(255, 255, 255, 0.045);   /* 次要填充：集数格、嵌入徽章 */
  --fill-soft-2: rgba(255, 255, 255, 0.05);  /* 略亮一档：横滑箭头 */
  --fill-faint: rgba(255, 255, 255, 0.03);   /* 最淡一档：返回按钮 */
  --skel-hi: rgba(255, 255, 255, 0.06);      /* 骨架屏微光 */
  --scrollbar-thumb: rgba(255, 255, 255, 0.13);
  --scrollbar-thumb-hi: rgba(255, 255, 255, 0.24);
  /* 封面占位块渐变。v24 起整体提亮 + 加暖调对比：
     v23 的 #232833→#171a21 在暗色主题下跟卡片底色几乎同色，用户看着
     像"图挂了"而不是"没有图"。现在明显亮一档，并加琥珀色顶光。 */
  --pf-1: #2e3543; --pf-2: #1d222c;
  --pf-ink: rgba(255, 255, 255, 0.92);       /* 占位块片名颜色 */
  --q-hd-bg: rgba(74, 222, 128, 0.16); --q-hd: #4ade80;
  --q-std-bg: rgba(251, 191, 36, 0.14); --q-std: #fbbf24;
  --q-low-bg: rgba(248, 113, 113, 0.13); --q-low: #f87171;
  --q-bad-bg: rgba(248, 113, 113, 0.22); --q-bad: #fca5a5;

  /* ---- Hero Billboard：两套主题下都是暗色卡片 ----
     hero 永远压在海报图上、文字永远是白的——这是 Netflix/Prime 的
     Billboard 范式：页面跟随主题，hero 不跟随。所以遮罩、兜底底色、
     文字色都跨主题固定，只有底部"溶入页面"的那层跟随 --bg-rgb。 */
  --hero-bg: #16181e;                    /* 海报图加载失败时的兜底（实测约 1/3 图床 418） */
  --hero-veil-x: linear-gradient(95deg, rgba(20, 18, 15, 0.9) 0%, rgba(20, 18, 15, 0.58) 45%, rgba(20, 18, 15, 0.18) 100%);
}

/* ---- 亮色主题：暖纸底（影院座椅的米棕），与琥珀品牌色同色系 ----
   全部表面色都往暖白偏，不用冷灰白——冷白配琥珀会发"脏"，
   暖白配琥珀才像同一束光照下来的。 */
:root[data-theme="light"] {
  color-scheme: light;

  /* v38：亮色模式「底色回退 + 去褐调 + 导航栏/文字优化」。
   *
   * v37 的教训：把整档配色压暗加深的改法是错的 —— 用户反馈「看起来有点脏」。
   * 事后量化才找到真正的原因 —— 不是「暗」，是**饱和度**：
   *   v37 的 --text-muted #6a6355 饱和度 20%（明显发褐），
   *   页面底 #efebe2 / 卡片 #f8f5ee 各带 4~5% 暖黄调。
   *   暖褐灰 + 暖黄底混在一起 = 视觉上的「脏」，跟亮度无关。
   *
   * 所以 v38 的改法是：
   *   1. **底色整套回退到 v25 的白纸调**（饱和度 0~3%）—— 干净回来
   *   2. **小字可读性的修正保留**，但改用中性灰 #6b6b6b（饱和度 0%）
   *      → 对比度 3.72 → 5.33，既达标又不发褐
   *   3. --on-accent 机制保留（暗色/亮色共用一个组件写法是对的）
   *   4. 导航栏与文字的显示单独优化（见下方 .nav-links / 文字相关规则）
   */

  --bg: #f6f4ef;            /* 回退 v25：白纸调，饱和度 3% */
  --bg-elevated: #fffdf8;  /* 回退 v25 */
  --bg-card: #ffffff;      /* 回退 v25：纯白卡片 */
  --bg-hover: #efeadf;     /* 回退 v25 */

  --text-primary: #211e19;
  /* 次级文字：保留一点暖调（与整体纸色呼应），但压到中性附近 */
  --text-secondary: #55504a;
  /* 弱化文字：v25 的 #8b8474 只有 3.72:1（12px 小字不可读）且带 17% 褐调。
     改用中性灰 —— 饱和度 0%，对比度 5.33:1，两者兼顾。 */
  --text-muted: #6b6b6b;

  /* v46：亮色琥珀提亮成「金黄」——用户反馈 #ad6008 偏暗偏棕。
     relLum 0.173 → 0.424（亮 2.45 倍），饱和度 95% → 89%（往黄移、少一点橙）。
     关键连带：底色变亮后白字只剩 2.22:1，按钮文字必须换回深字，
     于是 --on-accent 从 #ffffff 改成 #241703 → 7.90:1（AAA）。
     文字态 --accent-text 不能跟着提亮太多：浅底小字要 ≥4.5，
     #9a5a05 在白卡 5.47 / 纸底 4.98，刚好守住 AA。
     两者分工：装饰/填充用亮黄，文字用深琥珀。 */
  --accent: #e8a01a;
  --accent-text: #9a5a05;
  --accent-soft: rgba(232, 160, 26, 0.12);
  --accent-bright: #ffb52e;
  --accent-border: rgba(232, 160, 26, 0.46);
  --accent-border-soft: rgba(232, 160, 26, 0.32);
  --on-accent: #241703;       /* 亮金黄底上配深字（v37 机制保留，方向反转） */

  --border: rgba(33, 30, 25, 0.09);
  --border-strong: rgba(33, 30, 25, 0.16);

  --shadow-lift: 0 12px 32px rgba(94, 78, 45, 0.16);
  --shadow-header: 0 6px 28px rgba(94, 78, 45, 0.12);

  --glow: rgba(232, 160, 26, 0.10);  /* v46：顶部光晕跟随新的亮金黄 */
  /* 亮色下颗粒换成黑色（平均透明度 ~2.5%），暖白纸上像再生纤维肌理 */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");

  --bg-rgb: 246, 244, 239;
  --fill-soft: rgba(33, 30, 25, 0.045);
  --fill-soft-2: rgba(33, 30, 25, 0.06);
  --fill-faint: rgba(33, 30, 25, 0.03);
  --skel-hi: rgba(33, 30, 25, 0.05);
  --scrollbar-thumb: rgba(33, 30, 25, 0.18);
  --scrollbar-thumb-hi: rgba(33, 30, 25, 0.3);
  --pf-1: #f4eddf; --pf-2: #e6dcc6;
  --pf-ink: rgba(33, 30, 25, 0.86);
  --q-hd-bg: rgba(22, 163, 74, 0.12); --q-hd: #15803d;
  --q-std-bg: rgba(217, 119, 6, 0.12); --q-std: #b45309;
  --q-low-bg: rgba(220, 38, 38, 0.1); --q-low: #b91c1c;
  --q-bad-bg: rgba(220, 38, 38, 0.16); --q-bad: #b91c1c;

  /* 亮色下 hero 遮罩略加强：白纸页面上的暗 billboard 需要压得更实，
     白字才有足够对比（暗色主题下海报本身够暗，维持原值） */
  --hero-veil-x: linear-gradient(95deg, rgba(20, 18, 15, 0.92) 0%, rgba(20, 18, 15, 0.68) 45%, rgba(20, 18, 15, 0.3) 100%);
}

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

/* html 也铺底色：移动端橡皮筋滚动时露出的 overscroll 区域才是最终底色 */
html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: var(--font);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-color: var(--bg);
  /* 两层纹理：① 顶部中央琥珀光晕（放映机光束）② 全屏细颗粒（银幕肌理）。
     均 fixed 附着——滚动时不重绘、不产生布局成本；噪点是 160px 内联
     data-URI，零网络请求。主题切换时两层随变量整体换肤。 */
  background-image:
    radial-gradient(1100px 480px at 50% -120px, var(--glow), transparent 70%),
    var(--noise);
  background-attachment: fixed, fixed;
  background-repeat: no-repeat, repeat;
  /* 主题切换时底色平滑过渡（颗粒/光晕随变量瞬时换，二者都很淡看不出跳变） */
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------- 全局细节 */

/* 细滚动条：默认的粗白条在暗色界面里非常突兀 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hi); background-clip: content-box; }

::selection { background: rgba(245, 166, 35, 0.32); color: #fff; }
/* v37：亮色主题下选中文本同样用琥珀底，但白字在浅琥珀上发虚 →
   改成深色文字，背景也压深一档。 */
:root[data-theme="light"] ::selection {
  background: rgba(232, 160, 26, 0.26);
  color: #1e1b16;
}

/* 键盘焦点环：只对键盘导航显示，鼠标点击不出现 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* 尊重系统的"减少动效"设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------- 顶部导航 */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(var(--bg-rgb), 0.55);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* v46：顶部一道「放映机灯带」——中间亮、两端隐没的琥珀渐变细线。
   2px + 半透明，不抢内容，但让导航栏从一条灰底变成有品牌记忆的界面。
   纯 CSS 伪元素，不增加 DOM，也不影响 sticky / backdrop-filter 的层叠。 */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%, var(--accent-border-soft) 18%,
    var(--accent) 50%, var(--accent-border-soft) 82%, transparent 100%);
  opacity: 0.72;
}

/* 滚动后压深：chrome 只在需要时出现，首屏让位给 hero */
.site-header.scrolled {
  background: rgba(var(--bg-rgb), 0.92);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-header);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
}

/* v38：导航区与右侧工具区（主题钮 / 搜索框）之间加一条细分隔线。
   原来 8 个导航项 + 2 个控件平铺在一行，右侧控件像是"漂"在那儿；
   一条竖线把"浏览分类"和"操作工具"分成两组，层级立刻清楚。
   竖线用 border-left 而不是额外元素，不增加 DOM。 */
.nav-links {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0; /* flex item 默认 min-width:auto，长导航名会把搜索框挤爆 */
  overflow-x: auto;
  scrollbar-width: none;
  padding-right: 18px;
  border-right: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  position: relative;
}

/* v46：字标后面一汪极淡的光晕，呼应「流明 = 放映机打出的那束光」。
   绝对定位 → 不参与 flex 布局，不会把 LUMO 字标挤歪。 */
.logo::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translateY(-50%);
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 68%);
  pointer-events: none;
}

/* LUMO 字标：末位的 O 做成投影镜头，呼应「流明 = 放映机打出的那束光」

   O 的尺寸与位置按微软雅黑 Bold 的实测字形度量推导（避免目测调参）：
     cap 高度      0.7563em
     字母 O 高度   0.7822em  （= 1.0343cap，圆形比 cap 高 3.4%）
     O 顶 / 底     基线上 0.7690em / 基线下 0.0132em（圆字母视觉过冲）
   所以：SVG 以基线对齐（字母都坐在基线上）+ 整体下移 0.0132em 复现过冲。
   cap 单位不支持的浏览器回退到 em 值。 */
.logo .wordmark {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: baseline;
  line-height: 1;
}

.logo .lens {
  width: 0.782em;
  height: 0.782em;
  width: 1.034cap;
  height: 1.034cap;
  margin-left: 0.5px;
  transform: translateY(0.28px);
  transform: translateY(0.0175cap);
  overflow: visible;
  /* v46：透镜微微发光，让字标里的「O」真的像一颗镜头 */
  filter: drop-shadow(0 0 5px var(--accent-border-soft));
  transition: filter 0.2s ease;
}

.logo:hover .lens { filter: drop-shadow(0 0 8px var(--accent)); }

/* 环宽 5/24 ≈ 外径的 20.8%，与雅黑 Bold 竖笔占 O 外径的 20.6% 等重 */
.logo .lens-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
}

.logo .lens-core {
  fill: var(--accent-bright);
}

.logo:hover .lens-core {
  fill: var(--accent);
}

/* v38：「流明」副标：11px + 500 → 12px + 600。
   11px 的中文在浅底上几乎糊成一片，这个字要能一眼认出来。 */
.logo .sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 1.5px;
  padding-left: 10px;
  border-left: 1px solid var(--border-strong);
}

.nav-links {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0; /* flex item 默认 min-width:auto，长导航名会把搜索框挤爆 */
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

/* v38：导航项字重 500 → 600。
   亮色底是浅纸色，500 的中文笔画太细，视觉上"立不住"；
   600 在暗色底上也够稳，不破坏原有观感。 */
.nav-links a {
  position: relative;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s var(--ease);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  transform: translateY(-1px);
}

/* 当前项：v46 从「纯下划线」升级为「淡琥珀胶囊 + 2.5px 底部亮条 +
   顶部小光点」。三层都是同一支品牌色，不引入第二种颜色，但辨识度更强。
   保留 2.5px / 700 字重（v38 的可读性判据不能退）。 */
.nav-links a.active {
  color: var(--accent-text);
  background: var(--accent-soft);
  font-weight: 700;
  box-shadow: inset 0 -2.5px 0 var(--accent);
  border-radius: 8px;
}

.nav-links a.active::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  pointer-events: none;
}

/* 搜索框 */
.search-box {
  position: relative;
  flex-shrink: 0;
  width: 230px;
}

.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 36px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* v46：聚焦时给一圈淡琥珀光环，比只换边框颜色更有「被点亮」的反馈 */
.search-box input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-box input::placeholder { color: var(--text-muted); }

.search-box .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

/* 清除按钮：有输入时才出现，避免常态占位 */
.search-box .clear {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--border-strong);
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.search-box .clear.show { opacity: 1; visibility: visible; }
.search-box .clear:hover { background: var(--accent); color: #14161a; }

/* ---------------------------------------------------------- 主题切换按钮 */

/* 三态循环：跟随系统 → 亮色 → 暗色。图标随状态换（显示器/太阳/月亮），
   title 常驻说明当前模式，不依赖任何浮层，移动端也只有一个圆钮的面积。 */
.theme-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s var(--ease);
}

.theme-toggle:hover {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
  transform: scale(1.08);
}

.theme-toggle svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------- 主体容器 */

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

/* ---------------------------------------------------------- Hero 轮播 */

.hero {
  position: relative;
  height: 430px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 44px;
  background: var(--hero-bg);
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: blur(14px) saturate(1.3);
  transform: scale(1.15);
  opacity: 0.62;
  transition: opacity 0.5s ease;
}

/* v39：原双层遮罩（横向压暗 + 纵向用 --bg-rgb 溶入页面）已下线。
   纵向跟 --bg-rgb 走会在亮色主题下把海报下半部洗成灰白雾（用户反馈「脏」），
   且整套遮罩已被文件末尾的「v39 三层渐变」覆盖，留着只会误导维护者。
   现定义见末尾 v39 段：横向强遮罩 + 固定暗色纵向压暗 + 顶部轻压。 */

.hero-body {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 32px;
  padding: 0 48px;
  align-items: center;
  max-width: 100%;
}

.hero-poster {
  width: 208px;
  height: 293px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow-lift);
  flex-shrink: 0;
  background: var(--bg-card);
}

.hero-meta { flex: 1; min-width: 0; }

/* 眉题：小字 + 宽字距，先把视线引到主标题上。
   亮色用 accent-bright（#e8930c）而非 accent-text——hero 永远是暗底，
   深琥珀在暗底上反而糊 */
.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent-bright);
  margin-bottom: 12px;
}

.hero-meta h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #fff; /* hero 是暗 billboard：文字跨主题恒为白 */
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 元信息行：年份 · 类型 · 地区，分隔点比竖线更轻 */
.hero-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 10px;
}

.hero-meta-row i { font-style: normal; color: rgba(255, 255, 255, 0.5); }

/* 更新状态徽章：琥珀淡底胶囊，hero 里唯一的彩色信息点 */
.hero-rem {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border-soft);
  padding: 2px 11px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero-rem[hidden] { display: none; }

/* v36：豆瓣分徽章。
   「本周推荐」是按「评分高 + 近期热门」选出来的，把评分露出来
   用户才能知道推荐理由 —— 否则横幅只是一张好看的图。
   用亮金 #ffd76a（比更新徽章的琥珀更亮更黄），两者并排时能一眼分清。 */
.hero-score {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
  color: #ffd76a;
  background: rgba(28, 20, 4, 0.78);
  border: 1px solid rgba(255, 215, 106, 0.5);
  padding: 3px 11px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.hero-score small {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 215, 106, 0.75);
}

.hero-score[hidden] { display: none; }

/* 评分与更新状态同一行：flex 容器统一控制行间距与下边距 */
.hero-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hero-badges .hero-rem,
.hero-badges .hero-score { margin-bottom: 0; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 26px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.18s var(--ease), background 0.18s ease, box-shadow 0.18s ease;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.btn-play:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.35);
}

/* 次级 CTA：玻璃拟态，与琥珀主按钮形成明确的主次层级 */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.18s ease, transform 0.18s var(--ease);
  cursor: pointer;
  font-family: var(--font);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-1px); }

.hero-dots {
  position: absolute;
  bottom: 22px;
  right: 36px;
  display: flex;
  gap: 7px;
  z-index: 1;
}

.hero-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-dots i.on { background: var(--accent); width: 20px; border-radius: 4px; }

/* ---------------------------------------------------------- 区块标题 */

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

/* v38：分区标题与小字提示。
   h2 的负字距（-0.01em）在中文下会让左右笔画挤在一起，改回 0；
   hint 是 12px 的辅助文字，提一档字重让它不至于"找不着"。 */
.section-head h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  position: relative;
  padding-left: 14px;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent);
}

.section-head .hint {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1px;
}

/* ---------------------------------------------------------- 横向滚动分区 */

.rail { margin-bottom: 44px; }

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

/* 分区标题是首页的视觉节拍：19px/700 与卡片区拉开层级，
   左侧琥珀短竖线做栏目标识（主流影视站的栏题范式） */
.rail-head h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 14px;
}

.rail-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent);
}

.rail-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 「更多」做成描边 pill：默认可点但不抢栏题的注意力，hover 才亮 */
.rail-more {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.rail-more span {
  display: inline-block;
  margin-left: 2px;
  font-size: 14px;
  transition: transform .15s ease;
}

.rail-more:hover {
  color: var(--accent-text);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.rail-more:hover span { transform: translateX(2px); }

.rail-nav { display: flex; gap: 6px; }

.rail-nav button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--fill-soft-2);
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}

.rail-nav button:hover {
  color: #14161a;
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}

.rail-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.rail-track::-webkit-scrollbar { display: none; }

.rail-track > .film-card {
  flex: 0 0 148px;
  /* 关键：flex item 默认 min-width:auto（=内容最小宽度）。中文片名没有空格可断行，
     长标题会把卡片撑到 200px 以上，连带海报按 aspect-ratio 变高，出现一排高低不齐。
     min-width:0 让 flex-basis 的 148px 真正生效，标题交给 ellipsis 截断。 */
  min-width: 0;
  scroll-snap-align: start;
}

.rail-track .film-title { font-size: 12px; min-height: 32px; }

/* ---------------------------------------------------------- 首屏骨架屏 */

.skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 18px 14px;
}

.skeleton .sk {
  border-radius: var(--radius);
  background: linear-gradient(100deg,
    var(--bg-card) 30%, var(--skel-hi) 50%, var(--bg-card) 70%);
  background-size: 220% 100%;
  animation: sk-shimmer 1.3s linear infinite;
}

.skeleton .sk-poster { aspect-ratio: 3 / 4; }
.skeleton .sk-line { height: 11px; margin-top: 8px; }
.skeleton .sk-line.short { width: 55%; }

@keyframes sk-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -20% 0; }
}

/* ---------------------------------------------------------- 二级分类筛选条 */

.sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 20px;
}

.sub-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  transition: color .15s, border-color .15s, background .15s;
}

.sub-chip:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.sub-chip i {
  font-style: normal;
  font-size: 11px;
  color: var(--text-muted);
}

.sub-chip.on {
  color: #14161a;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.sub-chip.on i { color: rgba(20, 22, 26, .6); }

/* ---------------------------------------------------------- 分类导航条 */

.cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.cat-chip {
  padding: 5px 14px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.cat-chip:hover { color: var(--text-primary); border-color: var(--border-strong); }

.cat-chip.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  /* v46：亮色 --accent 提亮后当文字色只剩约 2:1，必须走文字态变量 */
  color: var(--accent-text);
}

/* ---------------------------------------------------------- 影片网格 */

.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 18px 14px;
}

.film-card { cursor: pointer; min-width: 0; }

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  /* v58：加载态用中性浅灰（不带品牌标识），与"加载失败"彻底区分：
     · 加载中 → 浅灰渐变，表示"正在取图，稍候"
     · 加载失败/无图 → .poster-fallback 的深灰 LUMO 品牌底图，表示"这张确实没有"
     两者不能是同一张图，否则用户分不清还在加载还是彻底没了。
     浅灰固定不随主题漂移（和底图哲学一致）；真实海报加载完成后由 img 覆盖。 */
  background-color: #e6e6e6;
  background-image: linear-gradient(160deg, #ededed 0%, #dcdcdc 100%);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, border-color 0.25s ease;
}

.film-card:hover .poster-wrap {
  transform: translateY(-6px) scale(1.04);
  box-shadow: var(--shadow-lift);
  /* v37：原来写死 rgba(255,255,255,.16) —— 在亮色主题下是"白边框压白卡片"，
     等于没有边框，还显得脏。改为跟随 --border-strong。 */
  border-color: var(--border-strong);
}

/* 图片绝对定位铺满容器：不参与父容器高度计算，父高度完全由 aspect-ratio 决定，
   海报比例再杂也一律等高裁切。用 static + height:100% 在某些加载时序下会让浏览器
   拿图片自然高度反推容器，出现一排高低不齐的海报。 */
.poster-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* v58：<img> 自身垫"加载中"的浅灰（未解码的 img 会盖住父容器背景，
   所以必须垫在 img 上）。图片一到自然覆盖；加载失败由 onerror 换成
   .poster-fallback 的深灰 LUMO 底图 —— 加载中与失败两种状态一眼可分。
   img[data-pics] 只命中 posterImg() 生成的图（卡片/详情/Hero 三条路径），
   权重 (0,1,1) 高于 .detail-poster/.hero-poster 的 background 简写。 */
img[data-pics] {
  background-color: #e6e6e6;
  background-image: linear-gradient(160deg, #ededed 0%, #dcdcdc 100%);
  background-size: cover;
  background-position: center;
}

/* 封面占位底图（v52）：图床整体失效或源站没配图时，统一展示 LUMO 品牌底图。
   方案 A —— 中性深灰 #34373C + 透镜环 + 极小琥珀点 + LUMO 字标 + 胶片齿孔。
   底图是 400×600（2:3），与 .poster-wrap / .hero-poster 完全一致，cover 不裁切；
   品牌标识集中在中上部，避开卡片底部的暗渐变与内嵌片名（card-copy）。
   亮/暗主题共用同一张：它模拟的是「一张真实海报」的明度，不是页面背景色，
   因此不随主题变量漂移。底图自带齿孔，v24 起用伪元素画的齿孔带一并下线，
   否则两层齿孔叠在一起会显脏。 */
.poster-fallback {
  position: relative;
  display: block;
  background-color: #34373C;
  background-image: url("../brand/lumo-placeholder-a.v1.svg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  overflow: hidden;
}

/* 卡片已有 card-copy 片名、详情页有 h1、Hero 有巨号片名：
   v24 的「片名前两字 + 类型小字」是重复信息，压在品牌底图上只会打架。
   DOM 结构保留（posterErr 与 posterFallbackHTML 共用它，历史 E2E 也据此取节点），
   这里只做视觉隐藏。 */
.poster-fallback > .pf-glyph,
.poster-fallback > .pf-type { display: none; }

/* 卡片场景：原 img 是绝对定位铺满的，占位块同样铺满 poster-wrap */
.poster-wrap .poster-fallback {
  position: absolute;
  inset: 0;
}

/* 详情 / hero 场景：posterErr 复制了原 class（detail-poster / hero-poster），
   尺寸由那些规则提供。
   ⚠ .detail-poster 在后面用 background 简写写了 --bg-card，简写会把
   background-image 一并重置成 none；它与 .poster-fallback 同为单类权重、
   位置又靠后，详情页会退化成一张纯色卡片（浏览器实测 dark #1d2027 /
   light #fff）。这里用双类选择器把底图重新声明一遍压住它。 */
.detail-poster.poster-fallback,
.hero-poster.poster-fallback {
  border-radius: var(--radius);
  background-color: #34373C;
  background-image: url("../brand/lumo-placeholder-a.v1.svg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

/* 更新状态徽章：左下角琥珀胶囊（"更新至第 N 集"），
   hover 时让位给操作条，避免两个浮层打架 */
.badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-bright);
  transition: opacity 0.2s ease;
}

.film-card:hover .badge { opacity: 0; }

/* hover 操作条：海报底部滑出的播放/详情双按钮。
   从下方滑入比直接淡入更有"展开"的仪式感（Netflix 的招牌微交互）。
   触屏设备没有 hover 态，直接隐藏，整卡点击进详情的路径不受影响。 */
.card-hover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.film-card:hover .card-hover { opacity: 1; transform: none; }

@media (hover: none) { .card-hover { display: none; } }

.ch-play, .ch-info {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.ch-play { background: rgba(245, 166, 35, 0.94); color: #1a1205; }
.ch-info { background: rgba(14, 15, 19, 0.85); color: #fff; }

.ch-play:hover { background: var(--accent-bright); }
.ch-info:hover { background: rgba(40, 44, 54, 0.92); }

/* 片名两行截断 + 固定两行高度：信息给足的同时，
   保证 grid 里同行卡片的标题区严格对齐（单行 ellipsis 会浪费一半标题空间） */
/* v38：片名与副信息。
   13px 的中文在浅纸底上用 500 字重偏细 —— 中文笔画密度远高于拉丁字母，
   同样的字号下 500 看起来比英文轻一号。把片名提到 600、副信息提一档字号，
   「片名 → 元信息」的层级靠字重和字号拉开，而不是靠颜色深浅（颜色一深就发闷）。 */
.film-title {
  margin-top: 9px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.38;
  min-height: 37px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* 中文小字在浅底上笔画会"糊"，加一点点字距让字与字分开 */
  letter-spacing: 0.1px;
}

.film-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.1px;
}

/* ---------------------------------------------------------- 分页 */

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.pager button {
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font);
}

.pager button:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* 当前页高亮（v22）：accent 实底 + 700 字重 + 放大 + 光环，
   34px 的小方块在 12+ 个页码里一眼可辨；「第 X / Y 页」文字兜底。 */
.pager button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  transform: scale(1.12);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* v46：亮色 accent 已提亮成金黄，两套主题都是「亮底 + 深字」，
   --on-accent 在亮色下也回到深色；组件写法仍统一，无需分支 */
.pager button.on:hover:not(:disabled) {
  color: var(--on-accent);
  border-color: var(--accent);
}

/* 「第 X / Y 页」文字标识：flex-wrap 下移动端自动换行到下一排 */
.pager-info {
  margin-left: 10px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pager button:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------------------------------------------------------- 详情页 */

.detail {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
}

.detail-poster {
  width: 240px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  background: var(--bg-card);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 6px;
}

.detail-info .alias {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px 18px;
  margin-bottom: 20px;
}

.meta-list div {
  font-size: 13px;
  color: var(--text-secondary);
}

.meta-list b {
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 8px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blurb {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 24px;
}

/* 播放源切换 */
/* 播放源切换：做成显眼的实心胶囊，与下面的选集格子拉开层级 */
.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.source-tab {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font);
}

.source-tab::before {
  content: '▶';
  font-size: 9px;
  margin-right: 6px;
  color: var(--text-muted);
  vertical-align: 1px;
}

.source-tab:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

/* 选中源：琥珀实心 + 深色文字，与未选形成强烈对比 */
.source-tab.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #14161a;
}

.source-tab.on::before { color: #14161a; }

/* 画质徽标：采集端实测码率（quality.json），标在线路按钮内。
   源站目录名虚标严重（"2000k_1080" 实测 640x360@112kbps），
   把真实码率亮出来，用户选线路时不再盲猜。 */
.q-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  vertical-align: 1px;
  background: var(--fill-soft);
  color: var(--text-secondary);
}
.q-badge.hd { background: var(--q-hd-bg); color: var(--q-hd); }
.q-badge.std { background: var(--q-std-bg); color: var(--q-std); }
.q-badge.low { background: var(--q-low-bg); color: var(--q-low); }
.q-badge.bad { background: var(--q-bad-bg); color: var(--q-bad); }
.source-tab.on .q-badge {
  background: rgba(20, 22, 26, 0.18);
  color: #14161a;
}
.source-tab.on .q-badge.hd { color: #166534; }
.source-tab.on .q-badge.std { color: #92400e; }
.source-tab.on .q-badge.low,
.source-tab.on .q-badge.bad { color: #7f1d1d; }

/* 集数列表：无边框浅底格子，弱化成"次要选择" */
.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 9px;
}

.ep-btn {
  padding: 9px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--fill-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  font-family: var(--font);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-btn:hover {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------------------------------------------------------- 播放页 */

.player-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 22px;
}

.player-box {
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.player-box video { width: 100%; height: 100%; }

/* 嵌入式线路（iframe 聚合站播放器）：铺满播放盒 */
.player-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

/* 嵌入播放时常驻退出按钮：z-index 高于 iframe，嵌入页内部"网页全屏"
   铺满播放框后依然可见可点，一键返回详情（2026-10-20） */
.embed-exit {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(10, 11, 14, 0.72);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.embed-exit:hover {
  background: rgba(10, 11, 14, 0.92);
  transform: translateX(-2px);
}

/* v44：按用户决定保留 video 原生控件右下角的全屏按钮，
   右上角自定义 .player-fs 已移除（DOM / CSS / JS 一并下线）。
   下面 :fullscreen 规则留给嵌入页或浏览器把播放盒整体全屏的情况。 */

/* 容器全屏态：铺满视口、去圆角边框，video/iframe 已 inset 0 自动跟随；
   按钮保持悬浮（z-index 在 video/iframe 之上） */
.player-box:fullscreen {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: 0;
}
.player-box:fullscreen video,
.player-box:fullscreen iframe {
  height: 100%;
}

/* 连接中 / 失败浮层：盖在播放器上，避免黑框无言 */
.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(10, 11, 14, 0.92);
  text-align: center;
  padding: 24px;
}

.player-overlay .big {
  font-size: 40px;
  font-weight: 300;
  opacity: 0.35;
  color: var(--accent-bright);
}

.player-overlay-text { font-size: 14px; color: var(--text-primary); font-weight: 600; }

.player-overlay-sub {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.7;
}

.player-retry {
  margin-top: 4px;
  padding: 8px 22px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #14161a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: filter 0.18s ease;
}

.player-retry:hover { filter: brightness(1.1); }

/* 播放页：返回链接 / 线路切换 / 标题 / 状态行 */
.play-back { margin-bottom: 14px; }

/* v46：返回按钮重做——从「灰字细边 pill」升级为「圆形箭头徽章 + 卡片按钮」。
   三层信息：徽章（动作）、文字（去向）、卡片底（可点区域）。
   hover 时徽章填成品牌金黄，箭头再往左探一点，把「回去」的方向感做实。
   纯 CSS，svg 自带 padding 变成徽章，不增加 DOM。 */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.18s, border-color 0.18s, background 0.18s,
    transform 0.18s var(--ease), box-shadow 0.18s;
}

.back-btn svg {
  width: 14px;
  height: 14px;
  padding: 5px;
  box-sizing: content-box;   /* 全局是 border-box，这里要内容盒才有 26px 徽章 */
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--accent-border-soft);
  background: var(--accent-soft);
  color: var(--accent-text);
  transition: background 0.18s, color 0.18s, border-color 0.18s,
    transform 0.18s var(--ease);
}

.back-btn:hover {
  color: var(--accent-text);
  border-color: var(--accent-border);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--border-strong);
}

.back-btn:hover svg {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  transform: translateX(-2px);
}

.back-btn:active { transform: translateY(0); }
.detail-back { margin-bottom: 18px; }

/* 选集排序切换（详情页/播放页共用）：分段控件，选中态用品牌色 */
.ep-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.side-head h3 { margin-bottom: 0; }
.ep-order {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
  flex: none;
}
.ep-order-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.ep-order-btn + .ep-order-btn { border-left: 1px solid var(--border-strong); }
.ep-order-btn:hover { color: var(--text-primary); }
.ep-order-btn.on { background: var(--accent); color: #14161a; font-weight: 600; }

/* v46：播放页返回链接由 .back-btn 统一接管，不再单独把文字压成灰色 */
.play-back a:hover { color: var(--accent-text); }

.play-sources {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.play-sources-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  flex: none;
}

.play-sources .source-tabs { margin-bottom: 0; }

.play-title { font-size: 17px; margin-top: 14px; }

.play-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 8px;
  min-height: 22px;
}

.kind-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  flex: none;
}

.kind-badge.direct {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.kind-badge.embed {
  color: var(--text-secondary);
  background: var(--fill-soft);
}

.side-list {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 14px;
  max-height: 520px;
  overflow-y: auto;
}

.side-list h3 {
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}

.side-list h3 span { font-size: 11px; color: var(--text-muted); font-weight: 400; }

.side-item {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.16s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.side-item.on { background: var(--accent-soft); color: var(--accent-text); }

/* ---------------------------------------------------------- 状态提示 */

.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty .big {
  font-size: 44px;
  margin-bottom: 16px;
  opacity: 0.3;
  font-weight: 300;
}

.loading {
  display: flex;
  justify-content: center;
  padding: 70px;
  color: var(--text-muted);
  font-size: 14px;
  gap: 10px;
  align-items: center;
}

/* 加载动画 = 镜头呼吸：琥珀外环 + 亮芯，随节律缩放，替代通用转圈 */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--accent);
  border-radius: 50%;
  position: relative;
  animation: lens-pulse 0.9s ease-in-out infinite;
}

.spinner::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--accent-bright);
}

@keyframes lens-pulse {
  0%, 100% { transform: scale(0.82); opacity: 0.55; }
  50%      { transform: scale(1);    opacity: 1; }
}

/* 「减少动效」下也要看得见在加载：上面那条全局规则把所有 animation
   压到 0.01ms，spinner 会变成一个静止的圆点（看着就像只播了一遍）。
   加载指示器属于必要状态反馈，豁免成只变透明度、不变形的低频呼吸。 */
/* v46：亮色 accent 提亮后，浅纸底上的页面加载 spinner（约 2:1）会发飘，
   这里只把「页面级 .loading」换成深琥珀文字态；播放框内的 spinner
   压在深色底上，继续用亮黄，不能一起改。 */
:root[data-theme="light"] .loading .spinner { border-color: var(--accent-text); }
:root[data-theme="light"] .loading .spinner::after { background: var(--accent-text); }

@keyframes lens-soft {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: lens-soft 1.8s ease-in-out infinite !important; }
}

/* 骨架屏 */
.skel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 18px 14px;
}

.skel-card .skel-img {
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--bg-card) 30%, var(--bg-hover) 50%, var(--bg-card) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite;
}

.skel-card .skel-bar {
  height: 11px;
  margin-top: 9px;
  border-radius: 4px;
  background: var(--bg-card);
}

@keyframes shimmer {
  0%   { background-position: 180% 0; }
  100% { background-position: -40% 0; }
}

/* ---------------------------------------------------------- 页脚 */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.footer-brand {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.footer-note { margin-top: 5px; }

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

@media (max-width: 900px) {
  .detail { grid-template-columns: 150px 1fr; gap: 18px; }
  .detail-poster { width: 150px; }
  .player-layout { grid-template-columns: 1fr; }
  .side-list { max-height: 260px; }
  .hero { height: 340px; }
  .hero-body { padding: 0 28px; gap: 22px; }
  .hero-poster { width: 150px; height: 211px; }
  .hero-meta h1 { font-size: 26px; }
}

@media (max-width: 640px) {
  .header-inner { padding: 0 14px; gap: 14px; }
  .logo .sub { display: none; }
  .search-box { width: 135px; }
  .hero { height: 300px; margin-bottom: 28px; }
  .hero-body { padding: 0 20px; gap: 16px; }
  .hero-poster { width: 128px; height: 181px; }
  .hero-eyebrow { margin-bottom: 8px; letter-spacing: 0.16em; }
  .hero-meta h1 { font-size: 22px; margin-bottom: 8px; }
  .hero-meta-row { font-size: 12px; margin-bottom: 8px; }
  .hero-rem { margin-bottom: 14px; }
  .btn-play, .btn-ghost { padding: 9px 16px; font-size: 13px; }
  .container { padding: 18px 14px 48px; }
  .film-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 9px; }
  .rail { margin-bottom: 28px; }
  .rail-head { margin-bottom: 10px; }
  .rail-head h3 { font-size: 16px; }
  /* 触屏上手势横滑是本能，方向键按钮反而占地方 */
  .rail-nav { display: none; }
  .rail-track > .film-card { flex-basis: 116px; }
}

/* ==========================================================================
   v39 · 首页视觉重构（Impeccable）
   --------------------------------------------------------------------------
   设计意图：把首页从「海报网格 + 小横幅」变成「影院银幕 + 电影节海报墙」。
   关键决策：**配色令牌一个不动**（亮色刚在 v38 定稿，再改配色必然翻车），
   全部力道放在空间节奏、信息层级与动效上。

   与 Impeccable 准则的对应：
   · 4pt 间距体系，用 gap 而非 margin 控制同级间距
   · 层级靠「尺寸 + 字重 + 空间」三维度同时拉开，不只靠字号
   · 只动画 transform / opacity，避免布局重排
   · 指数缓动 ease-out-quart，不用 bounce / elastic
   · 尊重 prefers-reduced-motion
   · 海报信息内嵌而非「万物皆卡片」，减少一层无意义的容器
   ========================================================================== */

:root {
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  /* v40：用户反馈 Hero 太大，整体压低约 15%（900px 高视口 594 → 504px）。
     min-height 必须同步下调，否则 clamp 下限会被旧的 500px 顶住、等于没改。 */
  --v39-h: clamp(420px, 56vh, 620px);
}

/* ---------------------------------------------------------- Hero：影院银幕 */

.hero {
  height: var(--v39-h);
  min-height: 420px;
  border-radius: 22px;
  align-items: stretch;
  /* 暗色底：无论亮/暗主题，billboard 都保持暗场（海报是唯一光源） */
  background: #101015;
  isolation: isolate;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

/* 氛围底：海报放大 + 轻微模糊 + 降饱和，像放映机溢出的光。
   不能全清晰——竖版海报被裁成横幅会变形，模糊是刻意的质感选择。 */
.hero-bg {
  background-position: center 28%;
  filter: blur(22px) saturate(1.15);
  transform: scale(1.28);
  opacity: 0.85;
}

/* 三层渐变：
   ① 横向强遮罩 —— 左侧压到近黑，保证 76px 巨号片名与简介的任何底色都可读
   ② 底部纵向压暗 —— 给 CTA 与轮播条一个稳的落脚处
   ③ 顶部轻压 —— 导航栏悬浮其上时不出现亮边
   ⚠ 纵向层必须用**固定暗色**，不能跟 --bg-rgb：v38 的亮色底是暖白，
   跟着变量走会在亮色主题下把海报下半部洗成一片灰白雾（用户反馈「脏」）。
   亮色下 billboard 就该是一块完整的暗场圆角横幅，靠圆角+阴影与白纸分隔。 */
/* v39 三层渐变 —— 承接原 .hero::after 的定位（基础声明已并入此处，
   文件里只保留这一份遮罩定义，避免两套规则互相覆盖）。 */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(12, 12, 16, 0.97) 0%,
      rgba(12, 12, 16, 0.88) 26%,
      rgba(12, 12, 16, 0.52) 54%,
      rgba(12, 12, 16, 0.12) 100%),
    linear-gradient(to top,
      rgba(12, 12, 16, 0.62) 0%,
      rgba(12, 12, 16, 0.18) 12%,
      rgba(12, 12, 16, 0) 34%),
    linear-gradient(to bottom, rgba(12, 12, 16, 0.32) 0%, transparent 22%);
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: 0 clamp(28px, 4.5vw, 68px);
  width: 100%;
}

.hero-meta {
  max-width: 660px;
  padding-top: 12px;
}

/* 眉题：品牌色短横线 + 期号，把「本周推荐」做成编辑式栏目标签，
   而不是又一行居中的小字。编号是影视站少见的细节，也是记忆点。 */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--accent-bright);
  margin-bottom: clamp(14px, 2vh, 22px);
}

.hero-eyebrow-rule {
  width: 26px;
  height: 2px;
  flex: none;
  background: var(--accent-bright);
  border-radius: 2px;
}

.hero-eyebrow-no {
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.45);
}

.hero-meta h1 {
  /* 流体字号：手机 38px → 宽屏 76px，3:1 以上的层级比 */
  font-size: clamp(38px, 5.2vw, 76px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: clamp(12px, 1.8vh, 20px);
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
  -webkit-line-clamp: 3;
}

.hero-meta-row {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 14px;
}

.hero-badges { margin-bottom: clamp(12px, 1.8vh, 18px); }

/* 简介：两行截断，宽度按字符数收，避免横跨整个银幕。
   有内容才显示（hidden 由 JS 控制），没内容时下面的按钮组自动上移。 */
.hero-blurb {
  max-width: 54ch;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: clamp(18px, 2.6vh, 28px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}
.hero-blurb[hidden] { display: none; }

.hero-cta { gap: 12px; }

.btn-play {
  padding: 13px 30px;
  border-radius: 10px;
  font-size: 15px;
  transition: transform 0.22s var(--ease-out-quart),
              background-color 0.22s ease, box-shadow 0.22s ease;
}
.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(173, 96, 8, 0.42);
}
.btn-play-ico { font-size: 12px; }

.btn-ghost {
  padding: 13px 26px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
  transition: background-color 0.22s ease, transform 0.22s var(--ease-out-quart);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }

/* 右侧竖版海报：从「和文字并排的缩略图」升级成有装裱感的视觉锚点。
   细描边 + 暖色微光 + 深投影，在暗场里像一张被灯照亮的胶片。 */
.hero-poster-frame {
  position: relative;
  flex: none;
  width: clamp(170px, 19vw, 248px);
  border-radius: 14px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6),
              0 0 60px rgba(173, 96, 8, 0.16);
  /* v40：初始即正。原方案默认带 1.2° 倾斜、hover 才归零，
     用户看到的是「海报歪着，鼠标放上去才变正」——倾斜本身不该是默认态。
     hover 只做垂直上浮，任何状态下都不出现旋转。 */
  transform: none;
  transition: transform 0.4s var(--ease-out-quart);
}
.hero:hover .hero-poster-frame { transform: translateY(-4px); }

.hero-poster {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: none;
}

.hero-dots {
  bottom: 26px;
  right: clamp(28px, 4.5vw, 68px);
  gap: 6px;
}
.hero-dots i {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.32);
  transition: width 0.3s var(--ease-out-quart), background-color 0.3s ease;
}
.hero-dots i.on { width: 34px; background: var(--accent-bright); }

/* ---------------------------------------------------------- 分区节奏 */

.rail { margin-bottom: 52px; }
.rail-head { margin-bottom: 18px; }

.rail-head h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0;
  padding-left: 15px;
}
.rail-head h3::before {
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 3px;
}

/* 4pt 间距：14px → 20px，让海报之间留出呼吸，不再是连成一片的色块 */
/* v41：overflow-x:auto 会让浏览器把 overflow-y 也折算成 auto（规范：一个轴非
   visible 时，另一轴的 visible 会被算成 auto）。hover 时卡片放大 4.5% + 上浮 6px，
   顶部约 11px 被整齐裁掉 —— 用户看到「海报装在一个容器里、显示不全」。
   v50：当时只留了极窄的四周余量，hover 的大范围扩散阴影仍被切掉（用户截图
   「阴影被截断」）。安全区扩到能容纳阴影 + 放大，并用等量负 margin 抵消，
   卡片视觉位置与区块间距都保持不变；rail 内另用一套紧凑但完整的阴影。 */
.rail-track {
  gap: 20px;
  padding: 20px 20px 28px;
  margin: -20px -20px -28px;
  overflow-y: hidden;
  /* scroll-snap-align:start 默认会把第一张卡片滚到 scrollport 起点，
     把左内边距吃光（实测 hover 放大后左侧又被裁）。
     scroll-padding 让吸附基准内缩同样距离，左余量才真正生效。 */
  scroll-padding-inline: 20px;
}
/* v50：与「全部影片」网格列宽保持一致。网格是 auto-fill minmax(162px,1fr)，
   列宽随视口变化，写死 flex-basis 永远对不齐；由 app.v40.js 量测后写入变量。 */
.rail-track > .film-card { flex-basis: var(--rail-card-w, 162px); }

.film-grid {
  grid-template-columns: repeat(auto-fill, minmax(162px, 1fr));
  gap: 24px 20px;
}

/* ---------------------------------------------------------- 卡片：海报内嵌信息 */

.poster-wrap {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  transition: transform 0.3s var(--ease-out-quart),
              box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.film-card { position: relative; }
.film-card:hover { z-index: 5; }
.film-card:hover .poster-wrap {
  transform: translateY(-6px) scale(1.045);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32),
              0 0 0 1px var(--accent-border);
  border-color: var(--border-strong);
}
/* v50：横向滚动容器必然裁掉溢出内容，rail 内改用一套紧凑阴影，
   让四边光晕完整落在 .rail-track 的安全区内；无滚动容器的网格页仍用大阴影。 */
.rail-track .film-card:hover .poster-wrap {
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.3),
              0 0 0 1px var(--accent-border);
}

/* 底部黑色渐变：片名压在海报画面上，不再单独占一行。
   渐变只覆盖下半部，海报上半部完整露出。 */
.card-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.62) 18%,
    rgba(0, 0, 0, 0.12) 42%,
    transparent 62%);
  transition: opacity 0.3s ease;
}

.card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 12px 11px 11px;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.3s var(--ease-out-quart);
}

/* 内嵌版片名：白字 + 阴影，跨主题恒为白（压在暗渐变上） */
.card-copy .film-title {
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 0;
  letter-spacing: 0.1px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  -webkit-line-clamp: 2;
  margin-top: 0;
}
.card-copy .film-sub {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11.5px;
  font-weight: 500;
  margin-top: 3px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}
/* 横滑区原来是 12px/32px 的外部文字规则，内嵌后统一交回上面 */
.rail-track .card-copy .film-title { font-size: 13.5px; min-height: 0; }

/* 悬浮标签：右上角更新状态、左上角评分。
   半透明黑底 + 白字 + 小圆角，符合流媒体通行语汇。 */
.badge {
  top: 9px;
  right: 9px;
  bottom: auto;
  left: auto;
  z-index: 3;
  max-width: calc(100% - 18px);
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(8, 8, 12, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  backdrop-filter: blur(6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s var(--ease-out-quart);
}

.card-score {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(8, 8, 12, 0.78);
  border: 1px solid rgba(255, 215, 106, 0.34);
  color: #ffd76a;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px);
  transition: opacity 0.2s ease;
}

/* hover：标签与片名淡出让位给操作条，避免三层浮层互相打架 */
.film-card:hover .card-copy { opacity: 0; transform: translateY(8px); }
.film-card:hover .badge,
.film-card:hover .card-score { opacity: 0; }
.film-card:hover .card-scrim { opacity: 0.55; }

.card-hover {
  z-index: 4;
  transition: opacity 0.24s var(--ease-out-quart),
              transform 0.3s var(--ease-out-quart);
}
.ch-play, .ch-info { font-size: 12px; padding: 9px 0; }

/* ---------------------------------------------------------- 主题过渡与降级 */

/* 主题切换：背景色/文字色平滑过渡，不闪烁（首屏防闪烁由 index.html 内联脚本负责） */
.site-header,
.rail-head h3,
.section-head h2,
.film-title,
.film-sub {
  transition: color 0.3s ease, background-color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hero-poster-frame,
  .poster-wrap,
  .card-scrim,
  .card-copy,
  .card-hover,
  .hero-dots i,
  .btn-play,
  .btn-ghost { transition-duration: 0.01ms !important; }
  .film-card:hover .poster-wrap,
  .hero:hover .hero-poster-frame { transform: none; }
}

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

@media (max-width: 900px) {
  /* v40：平板断点同步下调，避免比桌面还高（倒挂） */
  :root { --v39-h: clamp(380px, 50vh, 480px); }
  .hero-body { grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 0 28px; }
  .hero-poster-frame { width: clamp(130px, 18vw, 180px); }
  .hero-meta h1 { font-size: clamp(32px, 4.6vw, 50px); }
}

@media (max-width: 640px) {
  :root { --v39-h: auto; }
  .hero {
    height: auto;
    min-height: 0;
    border-radius: 18px;
  }
  /* v42：原来手机端把竖版海报 display:none，唯一的背景图又被 22px 模糊 +
     0.72~0.95 遮罩压成纯色块 → 用户「hero 看不到海报」。
     改为右上角给一张清晰海报，文字区用 grid 让出宽度；背景降级为氛围层。
     v48：用户反馈「海报太小、其他元素太大」→ 海报列放大约 45%，
     眉题/片名/元信息/徽章/简介/按钮/轮播点等比收紧，让海报成为首屏主视觉。 */
  .hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(112px, 36vw, 150px);
    align-items: start;
    gap: 12px;
    padding: 24px 16px 54px;
  }
  .hero-poster-frame {
    display: block;
    width: 100%;
    padding: 4px;
    border-radius: 10px;
    margin-top: 0;
  }
  .hero-bg {
    background-position: 40% 20%;
    filter: blur(12px) saturate(1.15);
    opacity: 0.7;
  }
  .hero::after {
    background:
      linear-gradient(90deg, rgba(12, 12, 16, 0.9) 0%, rgba(12, 12, 16, 0.58) 100%),
      linear-gradient(to top, rgba(12, 12, 16, 0.6) 0%, rgba(12, 12, 16, 0) 34%);
  }
  .hero-meta { max-width: 100%; padding-top: 0; }
  .hero-eyebrow { font-size: 10.5px; gap: 7px; margin-bottom: 10px; }
  .hero-eyebrow-rule { width: 18px; }
  .hero-meta h1 {
    font-size: clamp(22px, 6.4vw, 30px);
    line-height: 1.12;
    margin-bottom: 8px;
  }
  .hero-meta-row { font-size: 11.5px; margin-bottom: 8px; }
  .hero-badges { gap: 6px; margin-bottom: 10px; }
  .hero-rem, .hero-score { font-size: 11px; padding: 2px 8px; }
  .hero-score small { font-size: 9.5px; }
  .hero-blurb {
    font-size: 12px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    margin-bottom: 12px;
  }
  /* 海报列变宽后文字区收窄，CTA 收紧到最窄机（320px）也能并排一行 */
  .hero-cta { gap: 8px; }
  .btn-play, .btn-ghost { padding: 8px 10px; font-size: 11px; gap: 5px; border-radius: 8px; }
  .btn-play-ico { font-size: 10px; }
  .hero-dots { bottom: 18px; right: 18px; gap: 5px; }
  .hero-dots i { width: 14px; height: 3px; }
  .hero-dots i.on { width: 26px; }
  /* v50：窄屏 .container 只有 14px 内边距，桌面那档负 margin 会顶出横向滚动条，
     这里单收一档；阴影同步收紧，四边依然完整。卡片宽度仍跟随网格列宽。 */
  .rail-track {
    padding: 20px 13px 24px;
    margin: -20px -13px -24px;
    scroll-padding-inline: 13px;
  }
  .rail-track > .film-card { flex-basis: var(--rail-card-w, 132px); }
  .rail-track .film-card:hover .poster-wrap {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.28),
                0 0 0 1px var(--accent-border);
  }
  /* v41：v39 把桌面 auto-fill minmax(162px,1fr) 写在移动端 3 列规则之后，
     层叠顺序把移动端规则盖掉了；窄屏（≤360px）算不满 2 列就直接退化成 1 列，
     即用户截图「一屏只有一张海报」。微信 webview 视口略宽才碰巧是 2 列。
     → 固定 2 列，列宽不限最小值，320px 窄机也稳；一屏能看到 2 行以上。 */
  .film-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .card-copy { padding: 9px 8px 8px; }
  .card-copy .film-title { font-size: 12px; }
  .card-copy .film-sub { font-size: 10.5px; }
  .card-score { font-size: 10px; padding: 2px 6px; }

  /* 导航两行化：原布局在 390px 下 logo + 8 个分类 + 主题钮 + 搜索框
     挤在同一行，导航只剩 40px 宽，「电影」被切成半个字。
     → 第一行 logo / 主题钮 / 搜索框，第二行导航整宽横滑。
     v38 加的 border-right 分组线在两行布局里失去意义，一并去掉。 */
  .header-inner {
    height: auto;
    min-height: 56px;
    padding: 8px 14px 0;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .logo { order: 1; }
  .theme-toggle { order: 2; }
  .search-box { order: 3; flex: 1 1 auto; width: auto; min-width: 0; }
  .nav-links {
    order: 4;
    flex: 1 0 100%;
    width: 100%;
    padding: 0 0 9px;
    border-right: 0;
  }
  .nav-links a { padding: 5px 12px; font-size: 13px; }
  /* 两行布局里导航项更矮，顶部小光点会挤到文字 → 收起，保留胶囊与底条 */
  .nav-links a.active::before { display: none; }
}

/* v48：≤360px 窄机上，海报列稍收 + CTA 再收紧，保证两个按钮始终并排一行。
   海报仍比 v42 的 80~90px 大，且与 361px 起的档位过渡平滑（不出现尺寸跳变）。 */
@media (max-width: 360px) {
  .hero-body {
    grid-template-columns: minmax(0, 1fr) clamp(100px, 33vw, 128px);
    gap: 10px;
    padding: 22px 14px 52px;
  }
  .hero-cta { gap: 6px; }
  .btn-play, .btn-ghost { padding: 7px 8px; font-size: 10.5px; }
}

/* ============================================================
   v62：质感细节层（统一图标 / 数字排版 / 微交互 / Hero 电影感 /
   焦点环 / rail 渐隐 / 骨架微光 / 详情页节奏）
   全部采用独立 class 或增量规则，不推翻既有视觉系统。
   ============================================================ */

/* ---- 1. 统一线性图标：尺寸跟随字号，垂直对齐文字 ---- */
.ico {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.14em;
  flex-shrink: 0;
}
.btn-play-ico { display: inline-flex; }
.btn-play-ico .ico { width: 15px; height: 15px; vertical-align: -0.1em; }
.card-score { display: inline-flex; align-items: center; gap: 3px; }
.card-score .ico { width: 11px; height: 11px; }
.ch-play { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.ch-play .ico { width: 13px; height: 13px; }
.rail-more span { display: inline-flex; }
.rail-more .ico { width: 12px; height: 12px; }
.empty .big .ico { width: 1em; height: 1em; }
.player-overlay .big .ico { width: 1em; height: 1em; }

/* ---- 2. 数字排版：评分/年份/集数等宽，列表里对齐不跳 ---- */
.card-score, .hero-score, .badge, .film-sub, .meta-list div,
.hero-meta-row, .side-head h3, .play-status, .ep-order-btn,
.detail-info .meta-list, .hero-eyebrow-no {
  font-variant-numeric: tabular-nums;
  -webkit-font-variant-numeric: tabular-nums;
}
/* 字阶：辅助文字统一收紧字距与行高，避免小字发虚 */
.card-score, .hero-score, .badge, .film-sub { letter-spacing: 0.01em; }

/* ---- 3. 卡片微交互：入场错峰 + 遮罩渐显评分 ---- */
@keyframes card-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.enter-card {
  animation: card-enter 0.42s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}
/* hover 时评分徽章从 0.82 提到 1，元信息行轻微上移——细节反馈 */
.film-card .card-score { transition: opacity .2s ease, transform .2s var(--ease); }
.film-card:hover .card-score { opacity: 1; transform: translateY(-1px); }
.film-card .card-scrim { transition: opacity .22s ease; }
.film-card:hover .card-scrim { opacity: 1; }

/* ---- 4. Hero 电影感：背景极缓慢 Ken Burns + 文案分层入场 ---- */
@keyframes hero-kenburns {
  from { transform: scale(1.24) translate3d(0, 0, 0); }
  to   { transform: scale(1.34) translate3d(-1.2%, -0.8%, 0); }
}
/* 只动 transform，不碰 opacity/filter —— 与既有 .hero-bg 覆盖规则兼容 */
.hero-bg {
  animation: hero-kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-in {
  animation: hero-in 0.5s var(--ease) backwards;
  animation-delay: var(--d, 0ms);
}
/* 评分徽章毛玻璃胶囊：加高光描边，暗底上更像"玻璃"而非色块 */
.hero-score {
  background: rgba(28, 20, 4, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14),
              0 0 0 1px rgba(0, 0, 0, 0.18);
}

/* ---- 5. 焦点环：键盘可达性是专业度的隐藏信号 ---- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* Hero 上的元素在暗底，焦点环用亮色保证可见 */
.hero :where(a, button):focus-visible {
  outline-color: #ffd76a;
}

/* ---- 6. rail 边缘渐隐：暗示"还有更多"，用 mask 而非叠色块 ---- */
.rail-track {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
}

/* ---- 7. 骨架屏微光：更亮一点的高光扫过，节奏更"活" ----
   ⚠ v63 修复：这里必须用 background-image（不能用 background 简写）！
   background 简写会把基础规则里的 background-size:220% 100% 重置成 auto，
   渐变铺满容器后 sk-shimmer 的背景位移就完全看不出来（动画在跑但视觉静止）。 */
.skeleton .sk {
  background-image: linear-gradient(100deg,
    var(--bg-card) 32%, var(--skel-hi) 48%, var(--bg-card) 64%);
  animation-duration: 1.6s;
}

/* ---- 8. 详情页元数据节奏：键值对用点线引导视线，行高更松 ---- */
.meta-list div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.7;
  padding-bottom: 2px;
}
.meta-list b {
  flex: 0 0 auto;
  min-width: 32px;
}

/* ---- 尊重减少动效：关掉所有新动效 ---- */
@media (prefers-reduced-motion: reduce) {
  .ico { transition: none; }
  .enter-card { animation: none; opacity: 1; transform: none; }
  .hero-in { animation: none; opacity: 1; transform: none; }
  .hero-bg { animation: none; }
}
