﻿/* 大触TV —— 复用博客首页的配色与玻璃拟态变量，只写本页独有样式 */
:root {
  --tv-ink: #fff;
  --tv-muted: rgba(255, 255, 255, .66);
  --tv-line: rgba(255, 255, 255, .22);
  --tv-glass: rgba(255, 255, 255, .08);
  --tv-glass-strong: rgba(255, 255, 255, .16);
  --tv-accent: #ff8fa3;
  --tv-bg: #0d070a;
  --tv-sans: 'DM Sans', 'Microsoft YaHei', sans-serif;
  --tv-serif: 'Noto Serif SC', Georgia, serif;
  --tv-mono: 'DM Mono', Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
.tv-body {
  margin: 0;
  min-height: 100vh;
  color: var(--tv-ink);
  background:
    radial-gradient(1200px 620px at 18% -10%, rgba(255, 143, 163, .18), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(120, 170, 255, .14), transparent 62%),
    var(--tv-bg);
  font-family: var(--tv-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 顶栏 ---------- */
.tv-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  height: 68px; padding: 0 clamp(14px, 3vw, 34px);
  background: rgba(12, 10, 8, .72);
  border-bottom: 0;
  backdrop-filter: blur(18px);
}
.tv-brand { display: flex; flex: 0 0 auto; align-items: center; width: 123.2px; height: 36.8px; }
.tv-brand img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left center; opacity: .8; }
.tv-tabs { display: flex; gap: 6px; margin-left: 8px; }
.tv-tabs button {
  padding: 8px 16px; color: var(--tv-muted); background: transparent;
  border: 1px solid transparent; border-radius: 999px; font-size: 14px;
}
.tv-tabs button:hover { color: #fff; }
.tv-tabs button.is-active { color: #1a1210; background: #fff; }
.tv-search { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 901px) {
  .tv-header .tv-search {
    position: absolute;
    left: 50%;
    margin-left: 0;
    transform: translateX(-50%);
    z-index: 1;
  }
  .tv-header .tv-account {
    margin-left: auto;
  }
}
.tv-search input {
  width: clamp(150px, 22vw, 280px); height: 36px; padding: 0 13px;
  color: #fff; background: var(--tv-glass-strong); border: 1px solid var(--tv-line);
  border-radius: 999px; font-size: 14px; outline: none;
}
.tv-search input:focus { border-color: rgba(255, 255, 255, .55); }
.tv-search button {
  height: 36px; padding: 0 15px; color: #fff; background: transparent;
  border: 1px solid var(--tv-line); border-radius: 999px; font-size: 13px;
}
.tv-search button:hover { background: var(--tv-glass-strong); }
.tv-account { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.tv-account .tv-user { display: flex; align-items: center; gap: 7px; color: var(--tv-muted); }
.tv-account .tv-user b { color: #fff; font-weight: 500; }
.tv-account button {
  height: 32px; padding: 0 13px; color: #fff; background: var(--tv-glass-strong);
  border: 1px solid var(--tv-line); border-radius: 999px; font-size: 13px;
}
.tv-account button:hover { border-color: rgba(255, 255, 255, .5); }

/* ---------- 布局 ---------- */
.tv-main { padding: clamp(14px, 2.4vw, 28px) clamp(14px, 3vw, 34px) 60px; }
.tv-panel { display: none; }
.tv-panel.is-active { display: block !important; }
.tv-panel[hidden].is-active { display: block !important; }
.tv-empty, .tv-hint { color: var(--tv-muted); font-size: 13px; line-height: 1.7; }
.tv-hint:empty { display: none; }

.tv-live { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(14px, 2vw, 24px); }
.tv-groups { display: flex; flex-direction: column; gap: 6px; align-self: start; max-height: 78vh; overflow: auto; padding-right: 4px; }
.tv-groups::-webkit-scrollbar { width: 6px; }
.tv-groups::-webkit-scrollbar-thumb { background: var(--tv-line); border-radius: 3px; }
.tv-group {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; color: var(--tv-muted); text-align: left; font-size: 13px;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
}
.tv-group:hover { color: #fff; background: var(--tv-glass); }
.tv-group.is-active { color: #fff; background: var(--tv-glass-strong); border-color: var(--tv-line); }
.tv-group span { color: var(--tv-muted); font: 11px var(--tv-mono); }

/* ---------- 播放器 ---------- */
.tv-stage { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tv-screen {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border: 1px solid var(--tv-line); border-radius: 14px; overflow: hidden;
}
.tv-screen video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tv-gate {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 20px; text-align: center;
  background: radial-gradient(circle at 50% 45%, rgba(24, 18, 16, .82), rgba(8, 7, 6, .96));
}
.tv-gate[hidden] { display: none; }
.tv-gate strong { font: 600 19px var(--tv-serif); letter-spacing: .03em; }
.tv-gate p { margin: 0; max-width: 420px; color: var(--tv-muted); font-size: 13px; line-height: 1.7; }
.tv-gate-ring {
  width: 34px; height: 34px; border: 2px solid rgba(255, 255, 255, .18);
  border-top-color: var(--tv-accent); border-radius: 50%; animation: tv-spin 1s linear infinite;
}
@keyframes tv-spin { to { transform: rotate(360deg); } }
.tv-gate-button, .tv-primary {
  padding: 10px 22px; color: #22120f; background: var(--tv-accent);
  border: 0; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.tv-gate-button:hover, .tv-primary:hover { filter: brightness(1.07); }
.tv-quiet { padding: 9px 18px; color: var(--tv-muted); background: transparent; border: 1px solid var(--tv-line); border-radius: 999px; font-size: 13px; }
.tv-quiet:hover { color: #fff; }

.tv-now { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tv-now h2 { margin: 0; font: 600 20px var(--tv-serif); }
.tv-now p { margin: 0; color: var(--tv-muted); font-size: 13px; }

.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 9px; }
.tv-channel {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 11px;
  color: #fff; text-align: left; background: var(--tv-glass); border: 1px solid transparent;
  border-radius: 10px; transition: background .18s ease, border-color .18s ease;
}
.tv-channel:hover { background: var(--tv-glass-strong); border-color: var(--tv-line); }
.tv-channel.is-active { border-color: var(--tv-accent); background: rgba(255, 143, 163, .14); }
.tv-channel b { font-size: 13px; font-weight: 500; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-channel small { color: var(--tv-muted); font: 11px var(--tv-mono); }
.tv-channel.is-dead { opacity: .48; }
.tv-channel.is-dead small { color: #ffb0b0; }

/* ---------- 点播 ---------- */
.tv-vod-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tv-select { display: flex; align-items: center; gap: 7px; color: var(--tv-muted); font-size: 12px; }
.tv-select select {
  height: 34px; padding: 0 10px; color: #fff; background: var(--tv-glass-strong);
  border: 1px solid var(--tv-line); border-radius: 9px; font-size: 13px; outline: none;
}
.tv-cats { display: flex; gap: 7px; flex-wrap: wrap; }
.tv-cat {
  padding: 7px 13px; color: var(--tv-muted); background: transparent;
  border: 1px solid var(--tv-line); border-radius: 999px; font-size: 12px;
}
.tv-cat:hover { color: #fff; }
.tv-cat.is-active { color: #22120f; background: #fff; border-color: #fff; }

.tv-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: clamp(10px, 1.6vw, 18px); }
.tv-card {
  display: flex; flex-direction: column; gap: 8px; padding: 0; color: #fff;
  background: transparent; border: 0; text-align: left;
}
.tv-card-poster {
  position: relative; width: 100%; aspect-ratio: 2 / 3; overflow: hidden;
  background: var(--tv-glass); border: 0; border-radius: 11px;
}
.tv-card-poster img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.tv-card-poster .tv-card-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; color: var(--tv-muted); background: linear-gradient(145deg, rgba(77, 92, 112, .55), rgba(36, 47, 60, .9)); font-size: 13px; line-height: 1.5; text-align: center; }
.tv-card-poster .tv-card-badge { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; padding: 6px 8px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); font: 11px var(--tv-mono); }
.tv-card-poster img:not([hidden]) ~ .tv-card-fallback { display: none; }
.tv-card b { font-size: 13px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-card small { color: var(--tv-muted); font-size: 11px; }
.tv-card-skeleton { pointer-events: none; }
.tv-card-skeleton-poster,
.tv-card-skeleton-line {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, .075);
}
.tv-card-skeleton-poster::after,
.tv-card-skeleton-line::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .12) 48%, transparent 76%);
  transform: translateX(-100%);
  animation: tv-skeleton-sweep 1.25s ease-in-out infinite;
  content: '';
}
.tv-card-skeleton-line {
  width: 76%;
  height: 16px;
  border-radius: 6px;
}
@keyframes tv-skeleton-sweep {
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .tv-card-skeleton-poster::after,
  .tv-card-skeleton-line::after { animation: none; }
}

/* ---------- 详情 ---------- */
.tv-detail { display: flex; flex-direction: column; gap: 16px; }
.tv-detail[hidden] { display: none; }
.vp-detail-back {
  align-self: flex-start;
  min-height: 36px;
  padding: 0 15px;
  color: var(--tv-muted);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--tv-line);
  border-radius: 999px;
  font-size: 13px;
}
.vp-detail-back:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
}
.tv-detail-top { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(14px, 2vw, 22px); align-items: start; }
.tv-episodes {
  padding: 14px; background: var(--tv-glass); border: 1px solid var(--tv-line); border-radius: 14px;
}
.tv-episodes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tv-episodes-head h3 { margin: 0; font: 600 15px var(--tv-serif); }
.tv-episodes-head span { color: var(--tv-muted); font: 11px var(--tv-mono); }
.tv-back { padding: 5px 10px; color: var(--tv-muted); background: transparent; border: 1px solid var(--tv-line); border-radius: 999px; font-size: 12px; }
.tv-back:hover { color: #fff; }
.tv-lines { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tv-line {
  padding: 6px 12px; color: #22120f; background: var(--tv-accent);
  border: 0; border-radius: 999px; font-size: 12px;
}
.tv-line:not(.is-active) { color: var(--tv-muted); background: transparent; border: 1px solid var(--tv-line); }
.tv-order { display: flex; gap: 6px; margin-bottom: 10px; }
.tv-order button { padding: 5px 11px; color: var(--tv-muted); background: transparent; border: 1px solid var(--tv-line); border-radius: 7px; font-size: 12px; }
.tv-order button.is-active { color: #fff; background: var(--tv-glass-strong); }
.tv-ep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 42vh; overflow: auto; }
.tv-ep {
  padding: 7px 6px; color: #fff; background: var(--tv-glass); border: 1px solid transparent;
  border-radius: 7px; font-size: 12px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tv-ep:hover { background: var(--tv-glass-strong); }
.tv-ep.is-active { color: #22120f; background: var(--tv-accent); border-color: var(--tv-accent); }
.tv-ep:disabled { opacity: .4; cursor: not-allowed; }
.tv-detail-info h1 { margin: 0 0 8px; font: 600 clamp(19px, 2.4vw, 26px) var(--tv-serif); }
.tv-detail-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; color: var(--tv-muted); font-size: 12px; }
.tv-detail-meta span { padding: 3px 9px; border: 1px solid var(--tv-line); border-radius: 999px; }
.tv-detail-info p { margin: 0; max-width: 900px; color: var(--tv-muted); font-size: 13px; line-height: 1.85; }

/* ---------- 登录层 ---------- */
.tv-login-layer {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(6, 5, 4, .78); backdrop-filter: blur(6px);
}
.tv-login-layer[hidden] { display: none; }
.tv-login-card {
  width: min(420px, calc(100vw - 32px)); min-height: 224px; padding: 0; overflow: hidden; background: #1b1613;
  border: 1px solid var(--tv-line); border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.tv-login-head { min-height: 62px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--tv-line); }
.tv-login-head h2 { margin: 0; font: 600 20px/1.2 var(--tv-serif); }
.tv-login-close { width: 32px; height: 32px; padding: 0; color: var(--tv-muted); background: transparent; border: 1px solid var(--tv-line); border-radius: 50%; font-size: 22px; line-height: 1; }
.tv-login-body { padding: 22px; }
.tv-unified-login { display: flex; align-items: center; justify-content: center; min-height: 44px; color: #17110e; background: #f1d6b3; border-radius: 6px; font-size: 14px; font-weight: 700; text-decoration: none; }
.tv-unified-login:hover { background: #ffe6c7; }
.tv-unified-login-intro { margin: 0 0 18px; color: var(--tv-muted); font-size: 13px; line-height: 1.7; }
.tv-login-help { margin: 14px 0 0; color: var(--tv-muted); font-size: 11px; line-height: 1.6; }
.tv-account-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; color: var(--tv-muted); font-size: 12px; }
.tv-account-current b { color: #fff; font-size: 14px; font-weight: 600; }
.tv-account-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tv-account-action { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 40px; padding: 0 8px; color: #fff; background: rgba(255,255,255,.06); border: 1px solid var(--tv-line); border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; }
.tv-account-action:hover { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.1); }
.tv-account-action.is-danger { color: #ffb4ab; }
.tv-logout-progress { display: flex; min-height: 136px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--tv-muted); text-align: center; }
.tv-logout-progress strong { color: #fff; font-size: 15px; }
.tv-logout-progress small { color: var(--tv-muted); font-size: 12px; }
.tv-logout-spinner { width: 24px; height: 24px; margin-bottom: 5px; border: 2px solid rgba(255,255,255,.18); border-top-color: #ff4b5f; border-radius: 50%; animation: tv-logout-spin .72s linear infinite; }
@keyframes tv-logout-spin { to { transform: rotate(360deg); } }

/* ---------- 提示 ---------- */
.tv-toast {
  position: fixed; bottom: 26px; left: 50%; z-index: 80; padding: 11px 20px;
  color: #fff; background: rgba(20, 16, 14, .95); border: 1px solid var(--tv-line);
  border-radius: 999px; font-size: 13px; opacity: 0; pointer-events: none;
  transform: translate(-50%, 12px); transition: opacity .22s ease, transform .22s ease;
}
.tv-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .tv-live { grid-template-columns: 170px minmax(0, 1fr); }
  .tv-detail-top { grid-template-columns: minmax(0, 1fr) 220px; }
}
@media (max-width: 760px) {
  .tv-header { height: auto; flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .tv-brand { width: 108px; height: 32px; }
  .tv-login-card { width: 100%; min-height: 246px; }
  .tv-tabs { order: 3; margin-left: 0; }
  .tv-search { order: 4; width: 100%; margin-left: 0; }
  .tv-search input { flex: 1; width: auto; }
  .tv-account { margin-left: auto; }
  .tv-live { grid-template-columns: minmax(0, 1fr); }
  .tv-groups {
    flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden;
    padding: 2px 2px 8px; scrollbar-width: none;
  }
  .tv-groups::-webkit-scrollbar { display: none; }
  .tv-group { flex: 0 0 auto; border-color: var(--tv-line); }
  .tv-group span { display: none; }
  .tv-detail-top { grid-template-columns: minmax(0, 1fr); }
  .tv-ep-list { max-height: 26vh; }
  .tv-card-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
  .tv-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .tv-main { padding-bottom: 34px; }
}

/* ---------- 点播：左侧分类 + 大图 + 海报行 ---------- */
.tv-vod-layout { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: clamp(14px, 2vw, 26px); align-items: start; }
.tv-vod-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 84px; }
.tv-select-block { display: grid; gap: 5px; font-size: 11px; }
.tv-select-block select { width: 100%; height: 34px; }
.tv-vod-nav { display: flex; flex-direction: column; gap: 3px; padding-top: 4px; border-top: 1px solid var(--tv-line); }
.tv-nav-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--tv-muted);
  background: transparent; border: 0; border-radius: 9px; font-size: 13px; text-align: left;
}
.tv-nav-item:hover { color: #fff; background: var(--tv-glass); }
.tv-nav-item.is-active { color: #1a1210; background: #fff; font-weight: 600; }
.tv-vod-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.tv-hero { position: relative; width: 100%; aspect-ratio: 28 / 9; overflow: hidden; border: 0; border-radius: 16px; background: #0b0908; }
.tv-hero-dots { position: absolute; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 6px; z-index: 2; }
.tv-hero-dot { width: 8px; height: 8px; padding: 0; background: rgba(255, 255, 255, .38); border: 0; border-radius: 999px; transition: width .2s ease, background .2s ease; }
.tv-hero-dot.is-active { width: 22px; background: #fff; }
.tv-hero[hidden] { display: none; }
.tv-hero img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .34s ease, transform .58s cubic-bezier(.22, .61, .36, 1); will-change: opacity, transform; }
.tv-hero-mask {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: clamp(16px, 3vw, 34px); background: linear-gradient(to top, rgba(6, 5, 4, .94) 12%, rgba(6, 5, 4, .55) 48%, transparent 82%);
  transition: opacity .28s ease, transform .52s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.tv-hero.is-changing img { opacity: 0; transform: scale(1.035); }
.tv-hero.is-changing .tv-hero-mask { opacity: 0; transform: translateX(22px); }
.tv-hero.is-changing.is-reverse .tv-hero-mask { transform: translateX(-22px); }
@media (prefers-reduced-motion: reduce) {
  .tv-hero img,
  .tv-hero-mask { transition: none; }
  .tv-hero.is-changing img,
  .tv-hero.is-changing .tv-hero-mask { opacity: 1; transform: none; }
}
.tv-hero-kicker { margin: 0; color: var(--tv-accent); font: 11px var(--tv-mono); letter-spacing: .16em; text-transform: uppercase; }
.tv-hero h2 { margin: 0; font: 600 clamp(20px, 2.8vw, 32px) var(--tv-serif); }
.tv-hero-meta { margin: 0; color: var(--tv-muted); font: 12px var(--tv-mono); }
.tv-hero-desc { margin: 0; max-width: 760px; color: rgba(255, 255, 255, .8); font-size: 13px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-hero .tv-primary { align-self: flex-start; margin-top: 4px; }
.tv-rows { display: flex; flex-direction: column; gap: 20px; }
.tv-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tv-row-head h3 { margin: 0; font: 600 16px var(--tv-serif); letter-spacing: .02em; }
.tv-row-more { padding: 4px 10px; color: var(--tv-muted); background: transparent; border: 1px solid var(--tv-line); border-radius: 999px; font-size: 12px; }
.tv-row-more:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.tv-row-track {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 14px);
}
@media (max-width: 1400px) { .tv-row-track { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .tv-row-track { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 760px) { .tv-row-track { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tv-row-track { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tv-more-wrap { display: flex; justify-content: center; }
.tv-more-wrap[hidden] { display: none; }
@media (max-width: 900px) {
  .tv-vod-layout { grid-template-columns: minmax(0, 1fr); }
  .tv-vod-side { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .tv-select-block { flex: 1 1 130px; }
  .tv-vod-nav { flex-direction: row; overflow-x: auto; border-top: 0; padding-top: 0; width: 100%; scrollbar-width: none; }
  .tv-vod-nav::-webkit-scrollbar { display: none; }
  .tv-nav-item { flex: 0 0 auto; border: 1px solid var(--tv-line); }
  .tv-hero { aspect-ratio: 16 / 9; }
}

/* ---------- 详情页（海报）与独立播放页 ---------- */
.tv-detail-poster { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--tv-glass); border: 0; border-radius: 14px; }
.tv-detail-poster img { width: 100%; height: 100%; object-fit: contain; background: #0b0908; }
.tv-detail-poster span { position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; color: #fff; background: rgba(0, 0, 0, .72); border-radius: 999px; font: 11px var(--tv-mono); }
.tv-ep-list-detail { max-height: 34vh; }
.tv-play-start { width: 100%; margin-top: 12px; }
.tv-play { display: flex; flex-direction: column; gap: 14px; }
.tv-play[hidden] { display: none; }
.tv-play-top { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(14px, 2vw, 22px); align-items: start; }
.tv-play-caption { margin: 0; color: var(--tv-muted); font-size: 13px; line-height: 1.7; }
@media (max-width: 900px) {
  .tv-play-top { grid-template-columns: minmax(0, 1fr); }
}

/* hidden 属性的优先级修正：类选择器里的 display 会覆盖 UA 的 [hidden]{display:none}，
   导致切视图时旧面板仍然显示（曾经表现为详情块被追加到列表最下面）。 */
.tv-body [hidden] { display: none !important; }

/* ---------- 门户式详情 / 播放页 ---------- */
.vp-hero { position: relative; overflow: hidden; border: 1px solid var(--tv-line); border-radius: 16px; }
.vp-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center top; filter: blur(24px) saturate(1.15); transform: scale(1.14); opacity: .5; }
.vp-hero::after { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 7, 6, .96) 4%, rgba(8, 7, 6, .74) 44%, rgba(8, 7, 6, .34) 100%); content: ''; }
.vp-hero-inner { position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; padding: clamp(18px, 3vw, 34px); align-items: end; }
.vp-poster { width: 100%; aspect-ratio: 2 / 3; overflow: hidden; background: #120e0c; border: 0; border-radius: 12px; }
.vp-poster img { width: 100%; height: 100%; object-fit: cover; }
.vp-meta { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vp-meta h1 { margin: 0; font: 600 clamp(22px, 3vw, 34px)/1.25 var(--tv-serif); letter-spacing: .02em; }
.vp-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.vp-tags span { padding: 3px 10px; color: var(--tv-muted); border: 1px solid var(--tv-line); border-radius: 999px; font-size: 12px; }
.vp-desc { display: -webkit-box; max-width: 840px; margin: 0; overflow: hidden; color: rgba(255, 255, 255, .78); font-size: 13px; line-height: 1.85; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.vp-actions { display: flex; gap: 10px; margin-top: 4px; }
.vp-play-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 24px; color: #2a1510; background: linear-gradient(135deg, #ffd166, #ff8fa3); border: 0; border-radius: 999px; font-size: 15px; font-weight: 600; }
.vp-play-btn:hover { filter: brightness(1.06); }
.vp-quiet { min-height: 40px; padding: 0 18px; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid var(--tv-line); border-radius: 999px; font-size: 13px; }
.vp-quiet:hover { border-color: rgba(255, 255, 255, .5); }
.vp-section { margin-top: 18px; }
.vp-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.vp-section-head h2 { margin: 0; font: 600 17px var(--tv-serif); }
.vp-section-head h2 span, .vp-count { margin-left: 8px; color: var(--tv-muted); font: 12px var(--tv-mono); }
.vp-season-list {
  display: flex;
  gap: 12px;
  padding: 0 2px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.vp-season-list::-webkit-scrollbar { display: none; }
.vp-season-card {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 7px;
  width: clamp(116px, 10vw, 138px);
  padding: 0;
  color: var(--tv-muted);
  background: transparent;
  border: 0;
  text-align: left;
}
.vp-season-cover {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--tv-glass);
  border: 0;
  border-radius: 10px;
}
.vp-season-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vp-season-cover .tv-card-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: var(--tv-muted);
  text-align: center;
  font-size: 12px;
}
.vp-season-cover img:not([hidden]) + .tv-card-fallback { display: none; }
.vp-season-card strong {
  width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vp-season-card small {
  color: inherit;
  font-size: 11px;
}
.vp-season-card:hover .vp-season-cover,
.vp-season-card.is-active .vp-season-cover {
  box-shadow: 0 0 0 2px rgba(255, 143, 163, .3);
}
.vp-season-card.is-active small { color: var(--tv-accent); }
.vp-lines { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.vp-lines:empty { display: none; }
.vp-lines button { padding: 6px 14px; color: var(--tv-muted); background: transparent; border: 1px solid var(--tv-line); border-radius: 8px; font-size: 12px; }
.vp-lines button.is-active { color: #2a1510; background: #fff; border-color: #fff; }
.vp-ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.vp-ep-grid button { padding: 9px 6px; overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; background: var(--tv-glass); border: 1px solid transparent; border-radius: 8px; font-size: 12px; text-align: center; }
.vp-ep-grid button:hover { background: var(--tv-glass-strong); }
.vp-ep-grid button.is-active { color: #2a1510; background: linear-gradient(135deg, #ffd166, #ff8fa3); font-weight: 600; }
.vp-play-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.vp-play-head h1 { margin: 0; font: 600 clamp(17px, 2.2vw, 22px) var(--tv-serif); }
.vp-play-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.vp-play-side { max-height: min(62vh, 620px); padding: 14px; overflow: auto; background: var(--tv-glass); border: 1px solid var(--tv-line); border-radius: 14px; }
.vp-ep-grid-side { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
.vp-play-caption { margin: 10px 0 0; color: var(--tv-muted); font-size: 13px; }
@media (max-width: 900px) {
  .vp-hero-inner { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .vp-play-body { grid-template-columns: minmax(0, 1fr); }
  .vp-play-side { max-height: none; }
}
.vp-poster { position: relative; }
.vp-poster span { position: absolute; right: 8px; bottom: 8px; padding: 3px 9px; color: #fff; background: rgba(0, 0, 0, .72); border-radius: 999px; font: 11px var(--tv-mono); }
.vp-poster span:empty { display: none; }

/* 遮罩层不得覆盖内容 */
.vp-hero-inner { position: relative; z-index: 1; }
/* 操作项（媒体信息/全局搜索/稍后再看）与真实剧集区分 */
.vp-ep-grid button.is-action { color: var(--tv-muted); background: transparent; border-color: var(--tv-line); opacity: .9; }
.vp-ep-grid button.is-action:hover { color: #fff; background: var(--tv-glass); }
.vp-ep-grid button.is-action.is-active { color: #2a1510; }

/* 播放页：隐藏左侧源/站点/分类，改为全宽 */
.tv-vod-layout.is-wide { grid-template-columns: minmax(0, 1fr); }

/* ---------- 播放页：播放器吸附顶部，向下滚动看剧集信息 ---------- */
.tv-play { display: flex; flex-direction: column; gap: 14px; }
.vp-screen-wrap { position: sticky; top: 72px; z-index: 6; padding-bottom: 6px; background: linear-gradient(to bottom, rgba(18, 15, 12, .96) 82%, rgba(18, 15, 12, 0)); }
.vp-screen-wrap .tv-screen { max-height: calc(100vh - 150px); border-radius: 14px; }
.vp-screen-wrap .tv-screen video { max-height: calc(100vh - 150px); }
.vp-play-meta { display: flex; flex-direction: column; gap: 8px; }
.vp-play-meta .vp-play-head { margin-bottom: 0; }
.vp-play-meta .vp-play-caption { margin: 0; }
@media (max-width: 900px) {
  .vp-screen-wrap { top: 60px; }
  .vp-screen-wrap .tv-screen, .vp-screen-wrap .tv-screen video { max-height: none; }
}

/* 播放页：取消吸附，随页面正常滚动；返回按钮组 */
.vp-screen-wrap { position: static; background: none; padding-bottom: 0; }
.vp-screen-wrap .tv-screen { max-height: none; }
.vp-screen-wrap .tv-screen video { max-height: none; }
.vp-play-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.vp-play-tools .vp-quiet { min-height: 34px; padding: 0 14px; font-size: 12px; }
.tv-play { scroll-margin-top: 80px; }

/* 收藏按钮 */
.vp-fav-btn { min-height: 40px; padding: 0 18px; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid var(--tv-line); border-radius: 999px; font-size: 13px; }
.vp-fav-btn:hover { border-color: rgba(255, 255, 255, .5); }
.vp-fav-btn.is-active { color: #2a1510; background: linear-gradient(135deg, #ffd166, #ff8fa3); border-color: transparent; font-weight: 600; }


/* 网盘面板 */
.tv-pan { display: flex; flex-direction: column; gap: 14px; }
.tv-pan[hidden] { display: none; }
.tv-pan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tv-pan-head h2 { margin: 0; font: 600 18px var(--tv-serif); }
.tv-pan-status { color: var(--tv-muted); font: 12px var(--tv-mono); }
.tv-pan-hint { margin: 0; color: var(--tv-muted); font-size: 13px; line-height: 1.7; }
.tv-pan-form { display: flex; gap: 10px; flex-wrap: wrap; }
.tv-pan-form input { flex: 1 1 260px; height: 42px; padding: 0 14px; color: #fff; background: var(--tv-glass); border: 1px solid var(--tv-line); border-radius: 10px; font-size: 13px; }
.tv-pan-form input:focus { outline: none; border-color: rgba(255, 255, 255, .45); }
.tv-pan-files { display: flex; flex-direction: column; gap: 8px; }
.tv-pan-file { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--tv-glass); border: 1px solid var(--tv-line); border-radius: 10px; }
.tv-pan-file b { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-pan-file small { color: var(--tv-muted); font: 11px var(--tv-mono); white-space: nowrap; }
.tv-pan-file button { min-height: 32px; padding: 0 14px; color: #2a1510; background: linear-gradient(135deg, #ffd166, #ff8fa3); border: 0; border-radius: 999px; font-size: 12px; font-weight: 600; }

.tv-pan-results { display: flex; flex-direction: column; gap: 8px; }
.tv-pan-results:empty { display: none; }

.tv-page-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 4px 2px 10px; border-bottom: 1px solid var(--tv-line);
}
.tv-page-head h2 { margin: 0; font: 600 22px var(--tv-serif); letter-spacing: .02em; }
.tv-page-count { color: var(--tv-muted); font: 12px var(--tv-mono); }
.tv-line-badge {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px;
  color: #1a1210; background: var(--tv-accent); font-size: 11px; font-weight: 700; line-height: 17px;
}

/* 顶部提示文字不再显示 */
[data-vod-hint], .tv-hint[data-vod-hint] { display: none !important; }

.tv-play-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 24vw, 340px);
  gap: clamp(12px, 1.6vw, 20px); align-items: start;
}
.tv-play-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tv-play-side { min-width: 0; }
.vp-play-eps {
  padding: 14px; background: var(--tv-glass); border: 1px solid var(--tv-line);
  border-radius: 14px; max-height: calc(100vh - 120px); overflow: auto;
}
.vp-play-eps .vp-ep-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
@media (max-width: 900px) {
  .tv-play-layout { grid-template-columns: minmax(0, 1fr); }
  .vp-play-eps { max-height: none; }
}

/* 栏目页：每行 8 个 + 筛选栏 */
.tv-card-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(8px, 1vw, 14px); }
@media (max-width: 1400px) { .tv-card-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .tv-card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .tv-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tv-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 2px 14px; border-bottom: 1px solid var(--tv-line); }
.tv-filter label { display: flex; align-items: center; gap: 6px; color: var(--tv-muted); font-size: 12px; }
.tv-filter select {
  height: 32px; min-width: 96px; padding: 0 8px; color: #fff; background: rgba(255,255,255,.06);
  border: 1px solid var(--tv-line); border-radius: 8px; font-size: 12px;
}
.tv-filter .tv-quiet { height: 32px; }

.vp-lines-play { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 12px; }
.vp-lines-play:empty { display: none; }
.vp-lines-play .tv-ep { padding: 7px 12px; }

/* 胶囊式筛选（由下拉自动生成） */
.tv-filter-line { display: flex; align-items: flex-start; gap: 10px; width: 100%; }
.tv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tv-chip { padding: 5px 12px; color: #d8d2cc; background: rgba(255,255,255,.05); border: 1px solid transparent; border-radius: 6px; font-size: 13px; }
.tv-chip:hover { color: #fff; background: rgba(255,255,255,.12); }
.tv-chip.is-active { color: #1a1210; background: var(--tv-accent); border-color: var(--tv-accent); font-weight: 600; }
/* 侧栏栏目改为链接后的样式 */
a.tv-nav-item { text-decoration: none; }
/* 字号放大 15% */
.tv-nav-item { font-size: 15px; }
.tv-chip { font-size: 15px; }
.tv-card b { font-size: 15px; }
.tv-card small { font-size: 13px; }
.tv-row-head h3 { font-size: 18px; }
.tv-page-head h2 { font-size: 25px; }
.tv-section-head h2, .vp-section-head h2 { font-size: 18px; }
.tv-ep { font-size: 15px; }
.tv-hint, .tv-empty { font-size: 15px; }
.tv-filter-line span, .tv-filter-label { font-size: 15px; }
/* 底部声明固定 */
.tv-attribution {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 6px 16px; text-align: center; opacity: .5;
  background: rgba(6, 5, 4, .85); backdrop-filter: blur(4px);
  font-size: 12px; color: #d8d2cc;
}
.tv-attribution a { color: inherit; text-decoration: underline; }
body.tv-body { padding-bottom: 34px; }
/* 顶部页签间距 */
.tv-tabs { gap: 28px; }
.tv-tabs a, .tv-tabs button { padding: 0 6px; }
/* 当前集高亮 */
.tv-ep.is-active {
  background: linear-gradient(135deg, #ff8f9e, #f26b8a);
  color: #1a0d10; border-color: transparent; font-weight: 700;
  box-shadow: 0 4px 14px rgba(242, 107, 138, .35);
}
.tv-ep.is-active:hover { color: #1a0d10; }


/* 播放页两栏比例：主区约缩小 10%，右栏相应加宽，避免留白与错位 */
@media (min-width: 901px) {
  .tv-play-layout { grid-template-columns: minmax(0, 1fr) clamp(300px, 27vw, 390px); }
}
.tv-play-main .vp-screen-wrap { width: 100%; }
.tv-play-main video { width: 100%; height: 100%; display: block; object-fit: contain; }
/* 详情页：评分环 + 元信息 + 简介加高 */
.vp-hero-inner { align-items: stretch; }
.vp-meta { justify-content: flex-start; }
.vp-meta h1 { font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; font-weight: 700; margin-top: -4px; }
.vp-score {
  display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 4px; width: fit-content;
  padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.06);
}
.vp-score b {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: conic-gradient(#2ee6a8 calc(var(--pct) * 1%), rgba(46, 230, 168, .18) 0);
  color: #fff; font: 700 15px/1 "Microsoft YaHei", system-ui, sans-serif;
  box-shadow: inset 0 0 0 5px #0d3b2c;
  text-shadow: -1px 0 #000, 1px 0 #000, 0 -1px #000, 0 1px #000;
}
.vp-score small { color: var(--tv-muted); font-size: 12px; }
.vp-tags { align-items: center; }
.vp-tags span { font-family: "Microsoft YaHei", system-ui, sans-serif; }
.vp-desc { -webkit-line-clamp: 4; }
.vp-poster { height: 100%; min-height: 240px; }
.vp-poster img { height: 100%; }
/* 海报按比例铺满右侧外框高度 */
.vp-hero-inner {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(16px, 2vw, 26px);
}
.vp-poster {
  height: 100%;
  width: auto;
  aspect-ratio: 2 / 3;
  align-self: stretch;
  min-height: 260px;
  max-height: 460px;
}
.vp-poster img { width: 100%; height: 100%; object-fit: cover; }
.vp-meta { gap: 12px; justify-content: flex-start; }
@media (max-width: 900px) {
  .vp-hero-inner { grid-template-columns: 132px minmax(0, 1fr); }
}
/* 详情底图铺满 */
.vp-hero-bg {
  background-size: cover !important;
  background-position: center center !important;
  filter: blur(3px) saturate(1.08) brightness(.9) !important;
  transform: scale(1.04) !important;
  opacity: .72 !important;
}
.vp-hero::after {
  background: linear-gradient(90deg, rgba(8,7,6,.92) 0%, rgba(8,7,6,.72) 42%, rgba(8,7,6,.5) 100%) !important;
}
/* 海报宽度自适应 + 底图兜底 */
.vp-hero { background: linear-gradient(135deg, #14100e, #0a0807 60%, #120e0c); }
.vp-poster {
  width: clamp(180px, 15vw, 250px);
  height: auto;
  aspect-ratio: 2 / 3;
  align-self: start;
  min-height: 0;
  max-height: none;
}
.vp-poster img { width: 100%; height: auto; display: block; }
section[data-detail-episodes].is-wogg-files [data-ep-list-detail] { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
section[data-detail-episodes].is-wogg-files .wogg-file-button,
.vp-play-eps.is-wogg-files .wogg-file-button {
  min-width: 0; width: 100%; max-width: none; justify-content: flex-start;
  text-align: left; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
}
.vp-play-layout.is-wogg-files { grid-template-columns: minmax(0, 1fr) clamp(520px, 40vw, 720px); }
.vp-play-layout.is-wogg-files .vp-play-eps [data-ep-list] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
@media (max-width: 1100px) { .vp-play-layout.is-wogg-files { grid-template-columns: minmax(0, 1fr); } }
.vp-play-layout.is-wogg-files .vp-play-eps [data-ep-list] .wogg-file-button {
  width: 100% !important; min-width: 0; max-width: none !important;
  justify-content: flex-start; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 560px) {
  .vp-play-layout.is-wogg-files .vp-play-eps [data-ep-list] { grid-template-columns: minmax(0, 1fr) !important; }
}
.vp-hero-inner { grid-template-columns: min-content minmax(0, 1fr); align-items: start; }
.vp-hero-bg { opacity: .8 !important; }
/* 按钮行与海报底部对齐 */
.vp-hero-inner { align-items: stretch; }
.vp-poster { align-self: start; }
.vp-meta { height: 100%; }
.vp-desc { flex: 0 0 auto; }
.vp-actions { margin-top: auto; }
/* 详情页线路徽标（与播放页一致） */
.vp-lines { gap: 10px; }
.vp-lines button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 10px; border: 1px solid var(--tv-line);
  background: var(--tv-glass); color: #fff; font-size: 13px;
}
.vp-lines button:hover { background: var(--tv-glass-strong); }
.tv-line-badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  background: linear-gradient(135deg, #ffb3c6, #ff8aa3); color: #2a1016;
  border-radius: 999px; font: 700 12px/1 "Microsoft YaHei", system-ui, sans-serif;
}
/* 已收藏按钮：纯黄底 */
[data-vod-fav].is-active,
.vp-actions [data-vod-fav].is-active {
  background: #ffd233 !important;
  border-color: #ffd233 !important;
  color: #2a1510 !important;
  font-weight: 600;
}
[data-vod-fav].is-active:hover { filter: brightness(.96); }
/* 切换线路按钮自适应宽度 */
section[data-detail-lines] .vp-ep-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
}
section[data-detail-lines] .vp-ep-grid button,
section[data-detail-lines] .tv-ep {
  width: auto; max-width: none; padding: 8px 16px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; border-radius: 10px;
}
/* 侧栏底部分隔线 */
.tv-nav-sep {
  height: 0; margin: 12px 4px; border-top: 1px solid var(--tv-line);
}
/* 侧栏固定并独立滚动 */
.tv-vod-side {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
}
.tv-vod-side::-webkit-scrollbar { width: 6px; }
.tv-vod-side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; }
.tv-vod-side::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 900px) {
  .tv-vod-side { position: static; max-height: none; overflow: visible; }
}
/* 栏目切换加载动画 */
.tv-page-loading {
  position: fixed; inset: 0; z-index: 80; display: none;
  align-items: center; justify-content: center; gap: 12px;
  background: rgba(10, 8, 7, .72); backdrop-filter: blur(3px);
  color: #f3ece4; font-size: 14px;
}
.tv-page-loading.is-visible { display: flex; }
.tv-page-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.22); border-top-color: #ffd233;
  animation: tv-spin .8s linear infinite;
}
@keyframes tv-spin { to { transform: rotate(360deg); } }
/* 筛选开关按钮 */
.tv-filter-toggle {
  width: fit-content; margin: 8px 0 12px; padding: 7px 16px;
  border-radius: 999px; font-size: 13px;
}
.tv-filter-toggle[hidden] { display: none; }
/* 筛选按钮在标题行右侧 */
.tv-page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tv-page-head .tv-filter-toggle {
  margin: 0 0 0 auto; padding: 6px 16px; border-radius: 999px; font-size: 13px;
}
.tv-page-head .tv-page-count { margin-right: 0; }
/* 轮播横版图铺满 */
.tv-hero img, [data-hero-img] {
  width: 100% !important; height: 100% !important;
  object-fit: cover !important; object-position: center 30% !important;
}
/* 底部声明去掉色块，只保留文字 */
.tv-attribution {
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  opacity: .5 !important;
  pointer-events: none;
}
.tv-attribution a { pointer-events: auto; }
/* 去掉页面彩色渐变，避免出现紫色色块 */
.tv-body {
  background: #0b0908 !important;
  background-image: none !important;
}
/* 播放页「返回详情」浮在左上角 */
.vp-back-float {
  position: absolute; top: 12px; left: 12px; z-index: 9;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(12, 10, 9, .78); color: #fff;
  border: 1px solid rgba(255,255,255,.28); font-size: 13px;
  backdrop-filter: blur(6px);
}
.vp-back-float:hover { background: rgba(12,10,9,.92); }
.vp-play-tools { justify-content: flex-end; }
/* 返回详情按钮定位基准 */
.tv-screen { position: relative; }
.vp-back-float {
  position: absolute; top: 12px; left: 12px; z-index: 9;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(12, 10, 9, .78); color: #fff;
  border: 1px solid rgba(255,255,255,.28); font-size: 13px;
}
.vp-back-float:hover { background: rgba(12,10,9,.92); }
/* 返回详情：播放区左上，正常文档流（不压画面） */
.vp-back-inline {
  display: inline-flex; align-items: center; width: fit-content;
  margin: 0 0 10px 0; padding: 6px 16px; border-radius: 999px;
  color: #fff; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.24); font-size: 13px;
}
.vp-back-inline:hover { background: rgba(255,255,255,.18); }
.vp-back-float { position: static !important; }
/* 播放器缩小 15% 并留边距 */
@media (min-width: 901px) {
  .tv-play-main .vp-screen-wrap {
    width: 85%;
    margin: 0 auto;
  }
}
.tv-play-main .vp-screen-wrap .tv-screen,
.tv-play-main .vp-screen-wrap video {
  width: 100%;
  border-radius: 14px;
}
/* 播放器靠右收紧与选集的间距 */
@media (min-width: 901px) {
  .tv-play-main .vp-screen-wrap {
    width: 88%;
    margin-left: auto;
    margin-right: 0;
  }
}
/* 播放器左右等距留白 */
@media (min-width: 901px) {
  .tv-play-main .vp-screen-wrap {
    width: 90%;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
/* 播放区左右等距内边距（不用百分比，避免与选集栏错位） */
@media (min-width: 901px) {
  .tv-play-main { padding-left: 18px; padding-right: 18px; }
  .tv-play-main .vp-screen-wrap {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
/* 播放页整体居中缩小 */
@media (min-width: 901px) {
  .tv-play {
    width: 85% !important;
    max-width: 1600px;
    margin: 0 auto !important;
  }
  .tv-play-main { padding-left: 0 !important; padding-right: 0 !important; }
  .tv-play-main .vp-screen-wrap {
    width: 100% !important;
    margin: 0 !important;
  }
}
/* 播放侧栏 v1：头部 + 四列线路卡片 + 选集黄色选中 */
@media (min-width: 901px) {
  .tv-play-layout { grid-template-columns: minmax(0, 1fr) clamp(360px, 30vw, 470px); }
}
.tv-play-side {
  padding: 16px 16px 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--tv-line);
  border-radius: 16px;
}
.vp-side-head { margin: 0 0 12px; }
.vp-side-head h2 { margin: 0; font: 700 20px/1.3 "Microsoft YaHei", system-ui, sans-serif; color: #fff; }
.vp-side-head p { margin: 4px 0 0; color: var(--tv-muted); font-size: 13px; }
.tv-play-side .vp-section-head { margin: 16px 0 10px; }
.tv-play-side .vp-section-head h2 { font: 700 15px "Microsoft YaHei", system-ui, sans-serif; color: #fff; }

/* 线路卡片：4 列 */
.vp-lines-play, [data-lines-play] {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.vp-line-card {
  position: relative;
  display: flex; flex-direction: column; gap: 3px;
  padding: 9px 8px; min-height: 54px;
  text-align: left; border-radius: 8px;
  background: rgba(255,255,255,.07); border: 1px solid transparent; color: #e9e2da;
}
.vp-line-card:hover { background: rgba(255,255,255,.14); }
.vp-line-card.is-active { background: #ffd233; border-color: #ffd233; color: #241c08; }
.vp-line-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-line-sub { font-size: 11px; color: rgba(233,226,218,.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-line-card.is-active .vp-line-sub { color: rgba(36,28,8,.7); }
.vp-line-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center;
  background: #ffd233; color: #241c08;
  border-radius: 6px; font: 700 11px/1 "Microsoft YaHei", system-ui, sans-serif;
  font-style: normal;
}
.vp-line-card.is-active .vp-line-badge { background: #241c08; color: #ffd233; }

/* 选集：四列，当前集黄色 */
[data-ep-list] {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px; max-height: 46vh; overflow: auto;
}
[data-ep-list] .tv-ep {
  min-height: 40px; border-radius: 8px;
  background: rgba(255,255,255,.07); color: #e9e2da;
  border: 1px solid transparent; font-size: 13px;
}
[data-ep-list] .tv-ep.is-active {
  background: #ffd233 !important; color: #241c08 !important;
  border-color: #ffd233 !important; font-weight: 700;
  box-shadow: none;
}
/* 播放侧栏 v2 修正 */
/* 1) 线路序号角标完整显示：移到卡片内部右上 */
.vp-line-card { padding-right: 26px; overflow: visible; }
.vp-line-badge {
  top: 5px !important; right: 6px !important;
  min-width: 16px; height: 16px; border-radius: 5px;
  font-size: 10px;
}
.tv-play-side { overflow: visible !important; }

/* 2) 选中态改回粉色 */
.vp-line-card.is-active {
  background: linear-gradient(135deg, #ffb3c6, #ff8aa3) !important;
  border-color: #ff8aa3 !important;
  color: #2a1016 !important;
}
.vp-line-card.is-active .vp-line-sub { color: rgba(42,16,22,.72) !important; }
.vp-line-badge { background: linear-gradient(135deg,#ffb3c6,#ff8aa3); color: #2a1016; }
.vp-line-card.is-active .vp-line-badge { background: #2a1016; color: #ffb3c6; }
[data-ep-list] .tv-ep.is-active {
  background: linear-gradient(135deg,#ffb3c6,#ff8aa3) !important;
  color: #2a1016 !important;
  border-color: #ff8aa3 !important;
}

/* 3) 右侧面板与视频等高，内部可滚动 */
.tv-play-layout { align-items: stretch; }
.tv-play-side {
  display: flex; flex-direction: column;
  height: 100%; min-height: 0;
}
.tv-play-side > section, .tv-play-side .vp-section { display: flex; flex-direction: column; min-height: 0; }
.tv-play-side [data-ep-list] { flex: 1 1 auto; overflow: auto; }
/* 播放器与右侧面板严格等高 */
@media (min-width: 901px) {
  .tv-play-layout {
    grid-template-rows: auto auto;
    align-items: stretch;
  }
  .tv-play-main { grid-column: 1; grid-row: 1; min-height: 0; }
  .tv-play-main .vp-screen-wrap { padding-bottom: 0 !important; }
  .tv-play-side {
    grid-column: 2; grid-row: 1;
    align-self: stretch; height: auto !important;
    min-height: 0; max-height: calc(100vh - 150px);
    overflow: hidden !important;
  }
  .tv-play-side .vp-play-eps {
    flex: 1 1 auto; min-height: 0; max-height: none;
    display: flex; flex-direction: column; overflow: hidden;
  }
  .tv-play-side [data-ep-list] {
    flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto;
  }
  .tv-play-layout > .vp-play-meta {
    grid-column: 1; grid-row: 2; margin-top: 12px;
  }
}
@media (max-width: 900px) {
  .tv-play-layout { grid-template-columns: minmax(0,1fr); }
  .tv-play-main { grid-column: 1; grid-row: 1; }
  .tv-play-layout > .vp-play-meta { grid-column: 1; grid-row: 2; margin-top: 12px; }
  .tv-play-side { grid-column: 1; grid-row: 3; max-height: none; }
}
/* 右侧面板严格与视频本体等高：面板绝对铺满仅含视频的布局行 */
@media (min-width: 901px) {
  .tv-play-layout {
    display: block !important;
    position: relative;
    min-width: 0;
  }
  .tv-play-main {
    display: block !important;
    width: calc(100% - clamp(360px, 30vw, 470px) - 20px);
    min-width: 0;
    padding: 0 !important;
  }
  .tv-play-main .vp-screen-wrap {
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
  }
  .tv-play-main .tv-screen {
    width: 100%; aspect-ratio: 16 / 9;
    max-height: calc(100vh - 150px);
  }
  .tv-play-main .tv-screen video { max-height: calc(100vh - 150px); }
  .tv-play-side {
    position: absolute !important;
    top: 0; right: 0; bottom: 0;
    width: clamp(360px, 30vw, 470px);
    height: auto !important; max-height: none !important;
    min-height: 0; overflow: hidden !important;
  }
  .tv-play-layout > .vp-play-meta { margin-top: 12px; }
}
@media (max-width: 900px) {
  .tv-play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .tv-play-main { grid-column: 1; grid-row: 1; width: auto; }
  .tv-play-side { position: static !important; width: auto; height: auto !important; max-height: none !important; grid-column: 1; grid-row: 2; }
  .tv-play-layout > .vp-play-meta { grid-column: 1; grid-row: 3; }
}

/* 线路卡片：角标右移避开线路名称，避免数字和文字重叠 */
.vp-line-card { padding-right: 32px !important; }
.vp-line-name { max-width: calc(100% - 18px); }
.vp-line-badge { top: 5px !important; right: 6px !important; min-width: 18px; height: 18px; }
/* 详情页线路卡片给编号留足宽度，名称不与角标相撞 */
section[data-detail-lines] [data-lines-list] {
  display: flex !important; flex-wrap: wrap; gap: 10px;
}
section[data-detail-lines] .vp-line-card {
  flex: 0 0 auto; min-width: 120px; box-sizing: border-box;
}
section[data-detail-lines] .vp-line-card.is-cloud-line { border-color: rgba(255, 204, 120, .5); background: rgba(255, 204, 120, .08); }
section[data-detail-lines] .vp-line-card.is-cloud-line:hover,
section[data-detail-lines] .vp-line-card.is-cloud-line.is-active { border-color: #ffb86b; background: rgba(255, 184, 107, .18); }
section[data-detail-lines] .vp-line-name { max-width: none; }
/* 选集单项不拉伸，线路名称避开角标 */
.tv-play-side [data-ep-list] {
  align-content: start !important;
  grid-auto-rows: min-content !important;
}
.tv-play-side [data-ep-list] .tv-ep {
  height: 40px !important;
  min-height: 40px !important;
  align-self: start !important;
}
.tv-play-side .vp-line-card { padding-right: 32px !important; box-sizing: border-box; }
.tv-play-side .vp-line-name {
  display: block; width: 100%; max-width: 100% !important;
  padding-right: 0; box-sizing: border-box;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 桌面详情展示区整体高度缩小约 20%，高度仍由海报比例自然撑开，避免裁切内容 */
@media (min-width: 901px) {
  .tv-detail .vp-hero .vp-poster {
    width: clamp(135px, calc(12vw - 9px), 191px);
  }
}

/* ---------- 移动端布局收敛 ---------- */
@media (max-width: 760px) {
  body.tv-body {
    min-height: 100dvh;
    padding-bottom: 0;
  }
  .tv-header {
    gap: 8px;
    padding: 8px 12px;
  }
  .tv-brand {
    width: 104px;
    height: 31px;
  }
  .tv-tabs {
    order: 3;
    flex: 0 0 auto;
    gap: 6px;
    margin-left: 0;
  }
  .tv-tabs a,
  .tv-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
  }
  .tv-tabs a.is-active,
  .tv-tabs button.is-active {
    color: #1a1210;
    background: #fff;
    border-color: #fff;
  }
  .tv-search {
    order: 3;
    flex: 1 1 200px;
    width: auto;
    min-width: 0;
    margin-left: 0;
    gap: 8px;
  }
  .tv-search input {
    min-width: 0;
  }
  .tv-search input,
  .tv-search button {
    height: 44px;
    font-size: 16px;
  }
  .tv-search button {
    min-width: 62px;
    padding: 0 12px;
  }
  .tv-account button {
    min-width: 56px;
    height: 40px;
  }
  .tv-account {
    flex: 0 0 auto;
  }
  .tv-account .tv-user {
    min-width: 0;
    white-space: nowrap;
  }
  .tv-account .tv-user b {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tv-main {
    padding: 12px 12px 28px;
  }
  .tv-vod-side {
    gap: 6px;
  }
  .tv-select-block select {
    height: 40px;
  }
  .tv-vod-nav {
    gap: 8px;
    padding: 2px 18px 2px 2px;
    scroll-padding-inline: 12px;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
  }
  .tv-nav-item {
    min-height: 44px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .tv-hero {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
  }
  .tv-hero-mask {
    gap: 6px;
    padding: 16px;
  }
  .tv-hero h2 {
    max-width: calc(100% - 8px);
    font-size: 24px;
    line-height: 1.25;
  }
  .tv-hero-desc {
    font-size: 12px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
  }
  .tv-hero .tv-primary {
    min-height: 40px;
    padding: 0 18px;
  }
  .tv-hero-dots {
    right: 14px;
    bottom: 14px;
  }
  .tv-rows {
    gap: 16px;
  }
  .tv-row-head {
    margin-bottom: 8px;
  }
  .tv-row-more {
    min-height: 36px;
    padding: 0 12px;
  }
  .tv-row-track {
    display: flex;
    grid-template-columns: none;
    gap: 10px;
    padding: 0 2px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tv-row-track::-webkit-scrollbar {
    display: none;
  }
  .tv-row-track > .tv-card {
    flex: 0 0 clamp(128px, 42vw, 156px);
    scroll-snap-align: start;
  }
  .tv-detail .vp-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    align-items: start;
  }
  .tv-detail .vp-hero .vp-poster {
    width: 112px;
    height: auto;
    min-height: 0;
    max-height: none;
    align-self: start;
  }
  .tv-detail .vp-poster img {
    width: 100%;
    height: auto;
  }
  .tv-detail .vp-meta {
    width: 100%;
    height: auto;
    gap: 9px;
  }
  .tv-detail .vp-meta h1 {
    margin-top: 0;
    font-size: 24px;
    line-height: 1.2;
  }
  .tv-detail .vp-score {
    gap: 8px;
    padding: 4px 10px 4px 4px;
  }
  .tv-detail .vp-score b {
    width: 42px;
    height: 42px;
    font-size: 13px;
  }
  .tv-detail .vp-tags {
    gap: 6px;
  }
  .tv-detail .vp-tags span {
    padding: 3px 8px;
    font-size: 11px;
  }
  .tv-detail .vp-desc {
    font-size: 12px;
    line-height: 1.65;
    -webkit-line-clamp: 3;
  }
  .tv-detail .vp-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-top: 4px;
  }
  .tv-detail .vp-actions [data-vod-play-start] {
    grid-column: auto;
  }
  .tv-detail .vp-actions button {
    width: 100%;
    min-height: 44px;
    padding: 0 10px;
    justify-content: center;
    white-space: nowrap;
    font-size: 13px;
  }
  .vp-detail-back {
    min-height: 40px;
    padding: 0 14px;
  }
  .vp-season-card {
    width: 124px;
  }
  section[data-detail-lines] [data-lines-list] {
    gap: 8px;
  }
  section[data-detail-lines] .vp-line-card {
    flex: 1 1 calc(50% - 4px);
    min-width: calc(50% - 4px);
  }
  .vp-lines-play,
  [data-lines-play] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  [data-ep-list] {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  [data-ep-list] .tv-ep {
    min-height: 44px !important;
  }
  .tv-play-side [data-ep-list] .tv-ep {
    height: 44px !important;
    min-height: 44px !important;
  }
  .tv-play-side {
    padding: 12px;
  }
  .vp-play-eps {
    padding: 12px;
  }
  .tv-now {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .tv-group {
    min-height: 44px;
    flex: 0 0 auto;
  }
  .tv-account-action {
    min-height: 44px;
  }
  .tv-attribution {
    position: static;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 370px) {
  .tv-card-grid,
  .tv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tv-row-track > .tv-card {
    flex-basis: 138px;
  }
}

/* 详情信息保持在海报右侧；简介独立放到海报下方 */
.vp-hero-inner {
  grid-template-areas:
    "poster meta"
    "poster desc"
    "poster actions";
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.vp-poster { grid-area: poster; }
.vp-meta { grid-area: meta; height: auto; }
.vp-desc { grid-area: desc; align-self: start; }
.vp-actions { grid-area: actions; margin-top: 12px; }

@media (min-width: 901px) {
  .tv-detail .vp-hero .vp-poster {
    align-self: stretch;
    width: auto;
    height: 100%;
  }
}

@media (max-width: 760px) {
  .tv-detail .vp-hero-inner {
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas:
      "poster meta"
      "desc desc"
      "actions actions";
    grid-template-rows: auto auto auto;
  }
  .tv-detail .vp-desc {
    margin-top: 2px;
  }
  .tv-row-track > .tv-card {
    flex: 0 0 calc((100% - 20px) / 3);
  }
}

@media (min-width: 761px) {
  .tv-detail .vp-meta {
    min-height: 121px;
  }
  .tv-detail .vp-desc {
    min-height: 97px;
  }
}

@media (max-width: 760px) {
  .tv-detail .vp-meta {
    min-height: 152px;
  }
  .tv-detail .vp-desc {
    min-height: 60px;
  }
}

@media (max-width: 370px) {
  .tv-detail .vp-meta {
    min-height: 182px;
  }
}

.tv-theme-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 32px;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  font-size: 16px;
  white-space: nowrap;
}
.tv-theme-toggle:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .42);
}

/* 主页主题 A1：夜间的深莓波纹。 */
html[data-home-theme="night"] body.tv-body[data-page="home"] {
  --tv-night-accent: #ff3d9a;
  --tv-night-second: #5ee4ff;
  --tv-muted: rgba(255, 255, 255, .8);
  background: #0d070a !important;
  color: #fff;
}
html[data-home-theme="night"] body.tv-body[data-page="home"] .tv-header {
  background: rgba(7, 4, 6, .98) !important;
  border-bottom: 0;
  box-shadow: none;
}
html[data-home-theme="night"] body.tv-body[data-page="home"] .tv-main {
  background-color: #0d070a;
  background-image:
    repeating-radial-gradient(ellipse at 94% -18%, transparent 0 70px, rgba(255, 61, 154, .075) 71px 73px, transparent 74px 112px),
    repeating-radial-gradient(ellipse at 0% 108%, transparent 0 84px, rgba(94, 228, 255, .05) 85px 87px, transparent 88px 126px),
    radial-gradient(780px 520px at 86% 0%, rgba(255, 61, 154, .22), transparent 64%);
}
html[data-home-theme="night"] body.tv-body[data-page="home"] .tv-vod-side {
  background: linear-gradient(160deg, rgba(31, 10, 23, .98), rgba(9, 5, 7, .98));
  border: 1px solid rgba(255, 61, 154, .16);
  border-radius: 12px;
}
html[data-home-theme="night"] body.tv-body[data-page="home"] .tv-nav-item.is-active,
html[data-home-theme="night"] body.tv-body[data-page="home"] .tv-tabs .is-active {
  background: var(--tv-night-accent);
  color: #18070f;
}
html[data-home-theme="night"] body.tv-body[data-page="home"] .tv-hero {
  border: 0;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .32);
}
html[data-home-theme="night"] body.tv-body[data-page="home"] .tv-primary {
  background: linear-gradient(135deg, #ff6db5, #ff2d95);
  color: #1a0710;
}
html[data-home-theme="night"] body.tv-body[data-page="home"] .tv-row-head {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 61, 154, .2);
}
html[data-home-theme="night"] body.tv-body[data-page="home"] .tv-row-more {
  color: #fff;
  background: rgba(44, 14, 34, .8);
  border-color: rgba(94, 228, 255, .18);
}
html[data-home-theme="night"] body.tv-body[data-page="home"] .tv-card-poster {
  box-shadow: 0 12px 28px rgba(0, 0, 0, .24);
}

/* 主页主题 A4：日间的雾粉画廊。 */
html[data-home-theme="day"] body.tv-body[data-page="home"] {
  --tv-day-accent: #e40072;
  --tv-day-second: #2f80ed;
  --tv-muted: rgba(40, 23, 33, .62);
  background: #f5eaf0 !important;
  color: #281721;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-header {
  --tv-line: rgba(255, 255, 255, .22);
  --tv-muted: rgba(255, 255, 255, .74);
  --tv-glass: rgba(255, 255, 255, .08);
  --tv-glass-strong: rgba(255, 255, 255, .16);
  background: #281721 !important;
  border-bottom: 0;
  box-shadow: none;
  color: #fff;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-main {
  color: #281721;
  background-color: #f5eaf0;
  background-image:
    linear-gradient(118deg, transparent 0 76%, rgba(228, 0, 114, .07) 76.2%, transparent 76.5%),
    linear-gradient(rgba(40, 23, 33, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 23, 33, .045) 1px, transparent 1px),
    radial-gradient(700px 440px at 96% 0%, rgba(47, 128, 237, .11), transparent 62%);
  background-size: auto, 28px 28px, 28px 28px, auto;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-vod-side {
  background: #281721;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  box-shadow: 9px 9px 0 rgba(228, 0, 114, .16);
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-nav-item {
  color: rgba(255, 255, 255, .78);
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-nav-item.is-active,
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-tabs .is-active {
  background: var(--tv-day-accent);
  color: #fff;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-row-head h3 {
  color: #281721;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-hero {
  border: 0;
  box-shadow: 0 22px 55px rgba(40, 23, 33, .18);
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-hero,
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-hero * {
  color: #fff;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-primary {
  background: var(--tv-day-accent);
  color: #fff;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-row-head {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(40, 23, 33, .14);
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-row-more {
  color: #fff;
  background: #281721;
  border-color: #281721;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-card {
  color: #281721;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-card b {
  color: #281721;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-card small {
  color: #6f5263;
}
html[data-home-theme="day"] body.tv-body[data-page="home"] .tv-card-poster {
  box-shadow: 0 12px 26px rgba(40, 23, 33, .2);
}

/* 剧集卡片不使用整块黑底，只保留海报和文字。 */
html[data-home-theme] body.tv-body[data-page="home"] .tv-card {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
html[data-home-theme] body.tv-body[data-page="home"] .tv-card:hover {
  background: transparent;
  border-color: transparent;
  transform: none;
}

/* 夜间主题扩展到详情和播放页。 */
html[data-home-theme="night"] body.tv-body[data-page="detail"],
html[data-home-theme="night"] body.tv-body[data-page="play"] {
  --tv-muted: rgba(255, 255, 255, .8);
  background: #0d070a !important;
  color: #fff;
}
html[data-home-theme="night"] body.tv-body[data-page="detail"] .tv-header,
html[data-home-theme="night"] body.tv-body[data-page="play"] .tv-header {
  background: rgba(7, 4, 6, .98) !important;
  border-bottom-color: rgba(255, 61, 154, .55);
}
html[data-home-theme="night"] body.tv-body[data-page="detail"] .tv-main,
html[data-home-theme="night"] body.tv-body[data-page="play"] .tv-main {
  background-color: #0d070a;
  background-image:
    repeating-radial-gradient(ellipse at 94% -18%, transparent 0 70px, rgba(255, 61, 154, .06) 71px 73px, transparent 74px 112px),
    repeating-radial-gradient(ellipse at 0% 108%, transparent 0 84px, rgba(94, 228, 255, .04) 85px 87px, transparent 88px 126px);
}
html[data-home-theme="night"] body.tv-body[data-page="detail"] .tv-vod-side,
html[data-home-theme="night"] body.tv-body[data-page="play"] .tv-vod-side {
  background: linear-gradient(160deg, rgba(31, 10, 23, .98), rgba(9, 5, 7, .98));
  border: 1px solid rgba(255, 61, 154, .14);
  border-radius: 12px;
}
html[data-home-theme="night"] body.tv-body[data-page="detail"] .tv-nav-item.is-active,
html[data-home-theme="night"] body.tv-body[data-page="play"] .tv-nav-item.is-active {
  background: #ff3d9a;
  color: #18070f;
}

/* 日间主题扩展到详情和播放页。 */
html[data-home-theme="day"] body.tv-body[data-page="detail"],
html[data-home-theme="day"] body.tv-body[data-page="play"] {
  --tv-line: rgba(40, 23, 33, .16);
  --tv-glass: rgba(255, 255, 255, .42);
  --tv-glass-strong: rgba(255, 255, 255, .7);
  --tv-muted: rgba(40, 23, 33, .62);
  background: #f5eaf0 !important;
  color: #281721;
}
html[data-home-theme="day"] body.tv-body[data-page="detail"] .tv-header,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-header {
  --tv-line: rgba(255, 255, 255, .22);
  --tv-muted: rgba(255, 255, 255, .72);
  --tv-glass: rgba(255, 255, 255, .08);
  --tv-glass-strong: rgba(255, 255, 255, .16);
  background: #281721 !important;
  border-bottom: 0;
  box-shadow: none;
  color: #fff;
}
html[data-home-theme="day"] body.tv-body[data-page="detail"] .tv-main,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-main {
  color: #281721;
  background-color: #f5eaf0;
  background-image:
    linear-gradient(118deg, transparent 0 76%, rgba(228, 0, 114, .065) 76.2%, transparent 76.5%),
    linear-gradient(rgba(40, 23, 33, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 23, 33, .045) 1px, transparent 1px),
    radial-gradient(700px 440px at 96% 0%, rgba(47, 128, 237, .1), transparent 62%);
  background-size: auto, 28px 28px, 28px 28px, auto;
}
html[data-home-theme="day"] body.tv-body[data-page="detail"] .tv-vod-side,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-vod-side {
  background: #281721;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  box-shadow: 9px 9px 0 rgba(228, 0, 114, .14);
}
html[data-home-theme="day"] body.tv-body[data-page="detail"] .tv-nav-item,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-nav-item {
  color: rgba(255, 255, 255, .78);
}
html[data-home-theme="day"] body.tv-body[data-page="detail"] .tv-nav-item.is-active,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-nav-item.is-active {
  color: #fff;
  background: #e40072;
}
html[data-home-theme="day"] body.tv-body[data-page="detail"] .tv-vod-side .tv-select select,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-vod-side .tv-select select {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .2);
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-detail-back {
  color: #5d4050;
  background: rgba(255, 255, 255, .54);
  border-color: rgba(40, 23, 33, .16);
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-hero,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-hero {
  color: #281721;
  background: linear-gradient(135deg, #fff9fc, #f1dce7 62%, #eed4e2);
  border-color: rgba(40, 23, 33, .28);
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-hero-bg,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-hero-bg {
  filter: blur(3px) saturate(1.08) brightness(1.16) !important;
  opacity: .46 !important;
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-hero::after,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-hero::after {
  background: linear-gradient(90deg, rgba(248, 240, 245, .90) 0%, rgba(248, 240, 245, .78) 46%, rgba(248, 240, 245, .42) 100%) !important;
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-hero h1,
html[data-home-theme="day"] body.tv-body .tv-detail .vp-hero .vp-desc,
html[data-home-theme="day"] body.tv-body .tv-detail .vp-hero .vp-tags span,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-hero h1,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-hero .vp-desc,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-hero .vp-tags span {
  color: #281721;
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-hero .vp-desc,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-hero .vp-desc {
  color: rgba(40, 23, 33, .76);
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-hero .vp-tags span,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-hero .vp-tags span {
  border-color: rgba(40, 23, 33, .2);
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-hero .vp-score,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-hero .vp-score {
  background: rgba(255, 255, 255, .54);
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-section-head h2,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-play-meta h1,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-play-side h2 {
  color: #281721;
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-section-head h2 span,
html[data-home-theme="day"] body.tv-body .tv-detail .vp-count,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-play-caption {
  color: #6f5263;
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-season-card {
  color: #281721;
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-season-card strong {
  color: #281721;
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-line-card,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-line-card {
  color: #281721;
  background: rgba(255, 255, 255, .64);
  border-color: rgba(40, 23, 33, .14);
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-line-sub,
html[data-home-theme="day"] body.tv-body[data-page="play"] .vp-line-sub {
  color: rgba(40, 23, 33, .62);
}
html[data-home-theme="day"] body.tv-body .tv-detail .tv-ep,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-ep {
  color: #281721;
  background: rgba(255, 255, 255, .64);
  border-color: rgba(40, 23, 33, .12);
}
html[data-home-theme="day"] body.tv-body .tv-detail .tv-order button,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-order button {
  color: #5d4050;
  border-color: rgba(40, 23, 33, .18);
}
html[data-home-theme="day"] body.tv-body .tv-detail .tv-order button.is-active,
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-order button.is-active {
  color: #fff;
  background: #281721;
}
html[data-home-theme="day"] body.tv-body .tv-detail .vp-fav-btn {
  color: #281721;
  background: rgba(255, 255, 255, .56);
  border-color: rgba(40, 23, 33, .16);
}
html[data-home-theme="day"] body.tv-body[data-page="play"] .tv-play-side {
  background: rgba(255, 255, 255, .55);
  border-color: rgba(40, 23, 33, .13);
}
