/* ============================================================
   TVBox 播放器 · TV 大屏端 UI 原型
   设计基准：1920 x 1080（16:9），遥控器方向键焦点导航
   ============================================================ */

:root {
  --bg-0: #070B14;
  --bg-1: #0C1322;
  --bg-2: #131C30;
  --bg-3: #1C2842;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .18);

  --t1: #F2F6FF;
  --t2: #A9B7D2;
  --t3: #6C7B9B;

  --brand: #3FA9FF;
  --brand-d: #1E6FD9;
  --brand-2: #22D3B8;
  --gold: #FFB43F;
  --red: #FF5C7A;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --r-xl: 26px;

  --pad: 64px;
}

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

html, body {
  height: 100%;
  background: #04060C;
  overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  color: var(--t1);
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 0; height: 0; }

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#screen {
  width: 1920px;
  height: 1080px;
  position: relative;
  overflow: hidden;
  background: var(--bg-0);
  transform-origin: center center;
  flex: none;
}

/* ---------- 背景氛围光 ---------- */
#screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(63, 169, 255, .22), transparent 62%),
    radial-gradient(900px 540px at 88% 4%, rgba(34, 211, 184, .12), transparent 60%),
    radial-gradient(1200px 800px at 50% 118%, rgba(30, 111, 217, .18), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   导航（唯一的顶部行）
   ============================================================ */
.tabs {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 84px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--pad);
  z-index: 38;
  transition: background .25s;
}

/* ---------- 左右分段：左半区（内容分类）横滑，右半区（App 功能）贴右固定 ---------- */
/* 顶栏最左的「当前站点」位。
   ★ 2026-09-16（第十轮）：**首页不再渲染它**（见 js/app.js renderTabs 的 site 变量）——
     哼蝶要求「点首页也能进站点选择，那首页左边的站点名称可以不要，直接去掉」。
     仍会渲染它的页面：频道 / 筛选 / 榜单 / 搜索 / 我的 —— 那边没有别的换源入口。
   Android 侧同名改动：首页删 activity_home.xml 的 CustomTitleView#title，
     分类页保留 activity_vod.xml 的 site_name 胶囊。
   样式本身不变：弱化、**只随换源变化、不随分类变化**（哼蝶 2026-09-15 第七轮）。 */
.tabs-site {
  flex: none;
  margin-right: 20px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 20px;
  color: var(--t3);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
/* 可点 = 换源入口，所以给它和 .tab 一样的焦点反馈，别让用户以为是个纯装饰的灰字 */
.tabs-site.focus,
.tabs-site:hover {
  color: #fff;
  background: var(--brand);
  border-color: #fff;
}
.tabs-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.tabs-main::-webkit-scrollbar { display: none; }
.tabs-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: none;
  margin-left: 14px;
}

/* ---------- 站点选择浮层（点顶栏「首页」弹出）----------
   与 Android 侧的 SiteDialog 一一对应。 */
.sp-mask {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 14, .74);
  backdrop-filter: blur(6px);
}
.sp-box {
  width: 1120px;
  max-height: 780px;
  display: flex;
  flex-direction: column;
  padding: 28px 30px 22px;
  border-radius: 24px;
  background: rgba(10, 16, 28, .97);
  border: 1px solid var(--line);
  box-shadow: 0 34px 80px rgba(0, 0, 0, .72);
}
.sp-head {
  font-size: 22px;
  color: var(--t1);
  margin-bottom: 18px;
}
.sp-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  overflow-y: auto;
}
.sp-item {
  flex: none;
  height: 52px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-radius: 26px;
  font-size: 19px;
  color: var(--t2);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s;
}
.sp-item:hover { color: var(--t1); background: rgba(255, 255, 255, .06); }
.sp-item.focus {
  color: #fff;
  background: var(--brand);
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(63, 169, 255, .3);
}
.sp-cancel { align-self: flex-end; margin-top: 18px; }
.sp-empty { padding: 40px 0; text-align: center; font-size: 20px; color: var(--t3); }

.tabs.solid {
  background: rgba(7, 11, 20, .92);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(14px);
}

.tab {
  position: relative;
  flex: none;
  height: 50px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-radius: 25px;
  font-size: 19px;
  color: var(--t2);
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s;
  border: 1px solid transparent;
}
.tab:hover { color: var(--t1); background: rgba(255, 255, 255, .06); }
.tab.active {
  color: #fff;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(63, 169, 255, .28), rgba(34, 211, 184, .16));
  border-color: rgba(63, 169, 255, .5);
}
.tab.focus {
  color: #fff;
  background: var(--brand);
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(63, 169, 255, .3);
}
.tab.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -1px;
  transform: translateX(-50%);
  width: 22px; height: 3px;
  border-radius: 2px;
  background: var(--brand);
}

/* ---------- 导航第三部分：圆形图标按钮（记录 / 搜索）----------
   2026-09-15 第六轮：全顶栏**只有这一段允许出现图标**，一二段仍是纯文字。
   对应 Android 侧 36dp 圆底（hd_nav_icon_bg）+ 22dp 描边矢量图标的 1:1 还原
   （设计稿 1920×1080 → 36dp = 72px、22dp = 44px）。 */
.nav-icon {
  flex: none;
  width: 72px; height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .07);
  color: var(--t2);
  cursor: pointer;
  transition: all .18s;
}
.nav-icon svg { width: 44px; height: 44px; }
.nav-icon:hover { color: var(--t1); background: rgba(255, 255, 255, .12); }
.nav-icon.active { color: #fff; }
.nav-icon.focus {
  color: #fff;
  background: var(--brand);
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(63, 169, 255, .3);
}

/* ============================================================
   内容滚动区
   ============================================================ */
.content {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1080px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  scroll-behavior: smooth;
}
.content.pad-top { padding-top: 112px; }
.content > .page { padding-bottom: 90px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  height: 540px;
  padding: 150px var(--pad) 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.hero-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-art .blob {
  position: absolute;
  filter: blur(70px);
  opacity: .85;
}
.hero-art .scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 11, 20, .96) 8%, rgba(7, 11, 20, .62) 46%, rgba(7, 11, 20, .1) 76%),
    linear-gradient(180deg, rgba(7, 11, 20, .9) 0%, transparent 26%, transparent 62%, var(--bg-0) 100%);
}

.hero-body { position: relative; z-index: 2; max-width: 900px; }

.hero-title {
  font-size: 64px;
  font-weight: 600;
  letter-spacing: 3px;
  line-height: 1.1;
  text-shadow: 0 8px 30px rgba(0, 0, 0, .7);
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.hero-title .tag {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--gold);
  color: #23180A;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  font-size: 17px;
  color: var(--t2);
}
.hero-meta .score { color: var(--gold); font-size: 22px; font-weight: 600; }
.hero-meta .sep { width: 1px; height: 14px; background: var(--line-2); }

.hero-desc {
  margin-top: 20px;
  font-size: 19px;
  line-height: 1.75;
  color: #CBD7EE;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 30px;
  border-radius: 28px;
  font-size: 19px;
  cursor: pointer;
  transition: all .18s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff; box-shadow: 0 10px 28px rgba(30, 111, 217, .4); }
.btn.ghost { background: rgba(255, 255, 255, .1); color: var(--t1); border-color: var(--line-2); }
.btn.focus { transform: scale(1.05); box-shadow: 0 0 0 3px #fff, 0 14px 34px rgba(0, 0, 0, .55); }
.btn.primary.focus { background: linear-gradient(135deg, #5CBBFF, var(--brand)); }

/* ============================================================
   横滑行
   ============================================================ */
.row { margin-top: 46px; }
.row-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--pad);
  margin-bottom: 20px;
}
.row-title { font-size: 28px; font-weight: 500; letter-spacing: .5px; }
.row-sub { font-size: 15px; color: var(--t3); padding-top: 6px; }
.row-more {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  font-size: 16px;
  color: var(--t2);
  cursor: pointer;
  border: 1px solid var(--line);
  transition: all .18s;
}
.row-more:hover, .row-more.focus { color: #fff; background: var(--brand); border-color: var(--brand); }
.row-more svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; }

.scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 212px;
  gap: 26px;
  padding: 14px var(--pad) 34px;
  overflow-x: auto;
  overflow-y: hidden;
}
.scroller.wide { grid-auto-columns: 336px; }

/* ============================================================
   卡片
   ============================================================ */
.card {
  cursor: pointer;
  transition: transform .2s cubic-bezier(.2, .8, .3, 1);
  border-radius: var(--r-m);
}
.card.focus { transform: scale(1.09); }
.card.focus .poster {
  box-shadow: 0 0 0 3px #fff, 0 22px 46px rgba(0, 0, 0, .72);
}

.poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
  transition: box-shadow .2s;
}
.poster.wide { aspect-ratio: 16 / 9; }

.poster .art {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(60% 45% at 30% 22%, var(--c1), transparent 68%),
    radial-gradient(55% 50% at 78% 76%, var(--c2), transparent 70%),
    linear-gradient(160deg, var(--c3), #060A12 92%);
}
.poster .glyph {
  position: absolute;
  right: -6px; bottom: -26px;
  font-size: 130px;
  font-weight: 700;
  color: rgba(255, 255, 255, .09);
  letter-spacing: -4px;
  line-height: 1;
  user-select: none;
}
.poster .gloss {
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(255, 255, 255, .16) 0%, transparent 38%);
}
.poster .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(4, 7, 14, .9) 100%);
}

.poster .badge-tl {
  position: absolute;
  top: 10px; left: 10px;
  height: 28px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  border-radius: 7px;
  font-size: 14px;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(6px);
  color: #fff;
}
.poster .badge-qual {
  position: absolute;
  top: 10px; right: 10px;
  height: 28px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  border-radius: 7px;
  font-size: 13px;
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  color: #fff;
  letter-spacing: .5px;
}
.poster .score {
  position: absolute;
  left: 12px; bottom: 10px;
  font-size: 21px;
  font-weight: 600;
  color: var(--gold);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .9);
}
.poster .progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, .2);
}
.poster .progress i {
  display: block;
  height: 100%;
  background: var(--brand);
}
.poster .play-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
  background: rgba(4, 7, 14, .35);
}
.card.focus .play-hint { opacity: 1; }
.play-hint .ring {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: rgba(63, 169, 255, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.play-hint .ring svg { width: 30px; height: 30px; fill: #fff; stroke: none; margin-left: 3px; }

.card-title {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .18s;
}
.card.focus .card-title { color: var(--brand); }
.card-sub {
  margin-top: 5px;
  font-size: 15px;
  color: var(--t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   页面标题
   ============================================================ */
.page-head {
  padding: 0 var(--pad);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.page-title { font-size: 38px; font-weight: 500; letter-spacing: 1px; }
.page-sub { font-size: 16px; color: var(--t3); padding-bottom: 8px; }

/* ============================================================
   筛选栏
   ============================================================ */
.filters { padding: 8px var(--pad) 0; }
.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.filter-label {
  flex: none;
  width: 76px;
  padding-top: 9px;
  font-size: 17px;
  color: var(--t3);
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  height: 40px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-radius: 20px;
  font-size: 17px;
  color: var(--t2);
  background: rgba(255, 255, 255, .05);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .16s;
}
.chip:hover { color: var(--t1); background: rgba(255, 255, 255, .1); }
.chip.active { color: #fff; background: rgba(63, 169, 255, .22); border-color: rgba(63, 169, 255, .6); }
.chip.focus { color: #fff; background: var(--brand); border-color: #fff; box-shadow: 0 0 0 4px rgba(63, 169, 255, .3); transform: scale(1.04); }

/* ============================================================
   网格
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 30px 26px;
  padding: 34px var(--pad) 0;
}
.grid.g5 { grid-template-columns: repeat(5, 1fr); }
.grid.g6 { grid-template-columns: repeat(6, 1fr); }

/* ============================================================
   榜单
   ============================================================ */
.rank-list { padding: 24px var(--pad) 0; display: grid; gap: 16px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  border-radius: var(--r-l);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .18s;
}
.rank-item:hover { background: rgba(255, 255, 255, .08); }
.rank-item.focus {
  background: rgba(63, 169, 255, .16);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(63, 169, 255, .28);
  transform: translateX(10px);
}
.rank-no {
  flex: none;
  width: 62px;
  font-size: 40px;
  font-weight: 600;
  font-style: italic;
  text-align: center;
  color: var(--t3);
  font-variant-numeric: tabular-nums;
}
.rank-item:nth-child(1) .rank-no { color: #FF5A5A; }
.rank-item:nth-child(2) .rank-no { color: #FF9B3F; }
.rank-item:nth-child(3) .rank-no { color: #FFD23F; }
.rank-poster {
  flex: none;
  width: 74px;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-s);
  overflow: hidden;
  position: relative;
}
.rank-body { flex: 1; min-width: 0; }
.rank-name { font-size: 24px; font-weight: 500; }
.rank-desc {
  margin-top: 7px;
  font-size: 16px;
  color: var(--t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 1100px;
}
.rank-stat {
  flex: none;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 26px;
}
.rank-stat .v { font-size: 24px; font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.rank-stat .k { font-size: 14px; color: var(--t3); margin-top: 3px; text-align: right; }

/* ============================================================
   搜索
   ============================================================ */
.search-wrap { padding: 16px var(--pad) 0; }
.search-box {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 74px;
  padding: 0 28px;
  border-radius: 37px;
  background: rgba(255, 255, 255, .06);
  border: 2px solid var(--line-2);
  transition: all .2s;
}
.search-box.focus { border-color: var(--brand); box-shadow: 0 0 0 5px rgba(63, 169, 255, .22); background: rgba(63, 169, 255, .08); }
.search-box svg { width: 26px; height: 26px; stroke: var(--t2); fill: none; stroke-width: 2; flex: none; }
.search-box .q { font-size: 26px; letter-spacing: 2px; }
.search-box .placeholder { font-size: 24px; color: var(--t3); }
.search-box .caret {
  width: 2px; height: 32px;
  background: var(--brand);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.sec-label {
  padding: 34px var(--pad) 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  color: var(--t2);
}
.sec-label .bar { width: 4px; height: 20px; border-radius: 2px; background: var(--brand); }
.sec-label .clear { margin-left: auto; font-size: 16px; color: var(--t3); cursor: pointer; }

.keyboard {
  padding: 22px var(--pad) 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 14px;
  max-width: 1180px;
}
.key {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
  font-size: 24px;
  color: var(--t1);
  cursor: pointer;
  transition: all .16s;
  text-transform: uppercase;
}
.key:hover { background: rgba(255, 255, 255, .14); }
.key.focus { background: var(--brand); color: #fff; border-color: #fff; transform: scale(1.06); box-shadow: 0 0 0 4px rgba(63, 169, 255, .3); }
.key.wide { grid-column: span 2; font-size: 18px; }

/* ============================================================
   详情页
   ============================================================ */
.detail-hero {
  position: relative;
  padding: 112px var(--pad) 40px;
  min-height: 600px;
}
.detail-hero .hero-art { border-radius: 0; }
.detail-body { position: relative; z-index: 2; display: flex; gap: 46px; }
.detail-poster {
  flex: none;
  width: 300px;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-l);
  overflow: hidden;
  position: relative;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .6);
}
.detail-info { flex: 1; min-width: 0; padding-top: 6px; }
.detail-title {
  font-size: 54px;
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1.15;
}
.detail-alias { margin-top: 12px; font-size: 18px; color: var(--t3); }
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.pill {
  height: 40px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  border-radius: 20px;
  font-size: 16px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  color: var(--t2);
}
.pill.gold { color: var(--gold); border-color: rgba(255, 180, 63, .45); background: rgba(255, 180, 63, .12); }
.pill.brand { color: #9FD3FF; border-color: rgba(63, 169, 255, .45); background: rgba(63, 169, 255, .12); }

.detail-actions { display: flex; gap: 16px; margin-top: 30px; }

.detail-section { padding: 0 var(--pad); margin-top: 42px; }
.detail-section h3 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-section h3 .bar { width: 4px; height: 22px; border-radius: 2px; background: var(--brand); }
.detail-text { font-size: 18px; line-height: 1.85; color: #C3CFE6; max-width: 1500px; }

.cast-row { display: flex; gap: 22px; overflow-x: auto; padding-bottom: 12px; }
.cast {
  flex: none;
  width: 132px;
  text-align: center;
  cursor: pointer;
  transition: transform .18s;
}
.cast.focus { transform: scale(1.08); }
.cast .avatar {
  width: 132px; height: 132px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2px solid var(--line-2);
}
.cast.focus .avatar { border-color: #fff; box-shadow: 0 0 0 4px rgba(63, 169, 255, .35); }
.cast .name { margin-top: 12px; font-size: 17px; }
.cast .role { margin-top: 4px; font-size: 14px; color: var(--t3); }

/* 播放源 / 剧集 */
.src-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.ep-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  max-width: 1560px;
}
.ep {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  font-size: 17px;
  color: var(--t2);
  cursor: pointer;
  transition: all .16s;
  overflow: hidden;
  white-space: nowrap;
  padding: 0 8px;
}
.ep:hover { background: rgba(255, 255, 255, .12); color: var(--t1); }
.ep.active { color: #fff; background: rgba(63, 169, 255, .24); border-color: rgba(63, 169, 255, .65); }
.ep.focus { color: #fff; background: var(--brand); border-color: #fff; transform: scale(1.07); box-shadow: 0 0 0 4px rgba(63, 169, 255, .3); }

/* ============================================================
   播放页
   ============================================================ */
.player-page {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: #000;
  display: none;
}
.player-page.show { display: block; }

.player-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.player-stage .art {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(70% 60% at 30% 30%, var(--c1), transparent 70%),
    radial-gradient(60% 60% at 75% 70%, var(--c2), transparent 72%),
    linear-gradient(160deg, var(--c3), #04060C 90%);
  filter: saturate(1.1);
}
.player-stage .dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }

.player-center {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 90px;
}
.pc-btn {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .12);
  border: 2px solid rgba(255, 255, 255, .28);
  cursor: pointer;
  transition: all .18s;
}
.pc-btn svg { width: 38px; height: 38px; fill: #fff; stroke: none; }
/* 快进 / 快退是用描边画的，不能被上面那条 fill 规则吃掉描边 */
.pc-btn svg.sk { fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pc-btn.focus { background: var(--brand); border-color: #fff; transform: scale(1.12); box-shadow: 0 0 0 6px rgba(63, 169, 255, .28); }
.pc-main { width: 130px; height: 130px; }
.pc-main svg { width: 58px; height: 58px; }

.player-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 40px var(--pad) 60px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .92), transparent);
  z-index: 5;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.player-top .pt-title { font-size: 38px; font-weight: 500; letter-spacing: 1px; }
.player-top .pt-sub { margin-top: 10px; font-size: 18px; color: var(--t2); display: flex; gap: 14px; align-items: center; }
.player-top .pt-right { margin-left: auto; display: flex; gap: 14px; }

.player-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 70px var(--pad) 46px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .95), transparent);
  z-index: 5;
}
.progress-line {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .2);
  cursor: pointer;
}
.progress-line .played {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand-d), var(--brand));
}
.progress-line .knob {
  position: absolute;
  top: 50%;
  width: 20px; height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 0 12px rgba(63, 169, 255, .9);
}
.time-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 17px;
  color: var(--t2);
  font-variant-numeric: tabular-nums;
}
.time-row .spacer { flex: 1; }
.p-btn {
  height: 48px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: 17px;
  color: var(--t1);
  cursor: pointer;
  transition: all .16s;
}
.p-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.p-btn:hover { background: rgba(255, 255, 255, .18); }
.p-btn.focus { background: var(--brand); border-color: #fff; transform: scale(1.05); }
.p-btn.on { background: rgba(63, 169, 255, .3); border-color: rgba(63, 169, 255, .7); color: #fff; }

/* 播放页右上角的广告屏蔽状态 */
.p-btn.ad-on {
  background: rgba(34, 211, 184, .2);
  border-color: rgba(34, 211, 184, .6);
  color: #7FF0DE;
}
.p-btn.ad-on svg { stroke: #7FF0DE; }
.p-btn.ad-off {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .14);
  color: var(--t3);
}
.p-btn.ad-on.focus, .p-btn.ad-off.focus {
  background: var(--brand);
  border-color: #fff;
  color: #fff;
}
.p-btn.ad-on.focus svg, .p-btn.ad-off.focus svg { stroke: #fff; }

.ep-drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 620px;
  background: linear-gradient(180deg, rgba(12, 19, 34, .99), rgba(7, 11, 20, .99));
  border-left: 1px solid var(--line);
  z-index: 8;
  padding: 40px 34px;
  transform: translateX(102%);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1);
  overflow-y: auto;
}
.ep-drawer.show { transform: translateX(0); }
.ep-drawer h3 { font-size: 26px; font-weight: 500; margin-bottom: 22px; }

/* ============================================================
   我的 / 设置
   ============================================================ */
.mine-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 24px var(--pad) 0;
}
.tile {
  padding: 30px;
  border-radius: var(--r-l);
  background: linear-gradient(150deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .18s;
}
.tile:hover { background: rgba(255, 255, 255, .1); }
.tile.focus {
  border-color: var(--brand);
  background: rgba(63, 169, 255, .16);
  box-shadow: 0 0 0 3px rgba(63, 169, 255, .28);
  transform: translateY(-6px);
}
.tile .ico {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(63, 169, 255, .18);
  margin-bottom: 20px;
}
.tile .ico svg { width: 28px; height: 28px; stroke: var(--brand); fill: none; stroke-width: 1.9; }
.tile .t { font-size: 23px; font-weight: 500; }
.tile .d { margin-top: 8px; font-size: 15px; color: var(--t3); line-height: 1.6; }

.src-card {
  margin: 24px var(--pad) 0;
  padding: 28px 32px;
  border-radius: var(--r-l);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
}
.src-row { display: flex; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.src-row:last-child { border-bottom: none; }
.src-row .nm { width: 210px; font-size: 20px; }
.src-row .url {
  flex: 1;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  color: var(--t3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.src-row .st {
  flex: none;
  height: 34px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-radius: 17px;
  font-size: 15px;
}
.st.ok { color: #6EE7C8; background: rgba(34, 211, 184, .14); }
.st.warn { color: var(--gold); background: rgba(255, 180, 63, .14); }
.st.off { color: var(--t3); background: rgba(255, 255, 255, .07); }

.switch {
  flex: none;
  width: 62px; height: 34px;
  border-radius: 17px;
  background: rgba(255, 255, 255, .16);
  position: relative;
  cursor: pointer;
  transition: background .2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(28px); }
.src-card .switch { transform: scale(.92); }

/* ---------- 播放源站点卡（真实 TVBox 源的站点情况） ---------- */
.src-row .nm { display: flex; align-items: center; }
.src-row .nm .nm-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-row.src-sum .nm { width: auto; flex: 1; font-size: 22px; font-weight: 500; }
.src-row.src-sum .url { flex: none; max-width: 430px; text-align: right; }

.src-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 6px 0 16px;
  border-bottom: 1px solid var(--line);
}
.src-pill {
  height: 30px; padding: 0 13px;
  display: flex; align-items: center;
  border-radius: 15px; font-size: 14px;
  color: var(--t2);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
}
.src-pill.warn { color: var(--gold); background: rgba(255, 180, 63, .12); border-color: rgba(255, 180, 63, .3); }

.site-ico { flex: none; width: 32px; font-size: 19px; }

.src-more { cursor: pointer; border-radius: var(--r-s); padding-left: 10px; padding-right: 10px; }
.src-more .nm { color: var(--brand); }
.src-more .url { color: var(--t2); }
.src-more.focus { background: rgba(63, 169, 255, .16); box-shadow: inset 0 0 0 2px var(--brand); }

/* ---------- 站点清单页 ---------- */
.site-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 18px var(--pad) 0;
}
.site-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  transition: transform .16s, background .16s, border-color .16s, box-shadow .16s;
}
.site-card .ico { flex: none; width: 34px; font-size: 26px; text-align: center; }
.sc-body { flex: 1; min-width: 0; }
.sc-nm {
  font-size: 20px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-key {
  margin-top: 4px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px; color: var(--t3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-tags { flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.sc-tg {
  height: 22px; padding: 0 9px;
  display: flex; align-items: center;
  border-radius: 11px; font-size: 12px;
  color: var(--t3); background: rgba(255, 255, 255, .07);
}
.sc-tg.on { color: #6EE7C8; background: rgba(34, 211, 184, .14); }
.sc-tg.warn { color: var(--gold); background: rgba(255, 180, 63, .14); }
.site-card.focus {
  background: rgba(63, 169, 255, .18);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(63, 169, 255, .28);
  transform: scale(1.02);
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
}
.setting-row .k { width: 300px; font-size: 20px; }
.setting-row .desc { flex: 1; font-size: 15px; color: var(--t3); }
.seg { display: flex; gap: 8px; }
.seg span {
  height: 42px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-radius: 21px;
  font-size: 16px;
  color: var(--t2);
  background: rgba(255, 255, 255, .06);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .16s;
}
.seg span.active { color: #fff; background: rgba(63, 169, 255, .24); border-color: rgba(63, 169, 255, .6); }
.seg span.focus { background: var(--brand); color: #fff; border-color: #fff; transform: scale(1.05); }

/* ============================================================
   加载态 / 空态 / Toast
   ============================================================ */
.loading {
  padding: 90px var(--pad);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--t2);
  font-size: 20px;
}
.spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .16);
  border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { padding: 120px var(--pad); text-align: center; }
.empty .big { font-size: 26px; color: var(--t2); }
.empty .small { margin-top: 14px; font-size: 17px; color: var(--t3); }

#hud {
  position: absolute;
  left: 50%; bottom: 62px;
  transform: translateX(-50%) translateY(24px);
  padding: 16px 32px;
  border-radius: 30px;
  background: rgba(12, 19, 34, .96);
  border: 1px solid var(--line-2);
  font-size: 19px;
  color: var(--t1);
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 90;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
}
#hud.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 遥控提示条 */
#hint {
  position: absolute;
  right: var(--pad);
  bottom: 26px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--t3);
  z-index: 35;
  pointer-events: none;
}
#hint b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--line-2);
  font-weight: 400;
  font-size: 13px;
  color: var(--t2);
}

/* ============================================================
   播放记录
   ============================================================ */
.record-head {
  padding: 8px var(--pad) 0;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.record-list {
  padding: 26px var(--pad) 0;
  display: grid;
  gap: 14px;
  max-width: 1720px;
}
.record-item {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 16px 26px 16px 16px;
  border-radius: var(--r-l);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .18s;
}
.record-item:hover { background: rgba(255, 255, 255, .08); }
.record-item.focus {
  background: rgba(63, 169, 255, .14);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(63, 169, 255, .26);
  transform: translateX(8px);
}

.record-thumb {
  flex: none;
  width: 214px;
  border-radius: var(--r-m);
}
.record-thumb .glyph { font-size: 64px; right: -4px; bottom: -12px; }
.record-thumb .play-hint { opacity: 0; }
.record-item.focus .record-thumb .play-hint { opacity: 1; }
.record-thumb .play-hint .ring { width: 54px; height: 54px; }
.record-thumb .play-hint .ring svg { width: 22px; height: 22px; }

.record-body { flex: 1; min-width: 0; }
.record-name {
  font-size: 25px;
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.record-name em {
  font-style: normal;
  font-size: 17px;
  color: var(--brand);
}
.record-meta {
  margin-top: 10px;
  font-size: 16px;
  color: var(--t3);
  display: flex;
  gap: 16px;
  align-items: center;
}
.record-bar {
  margin-top: 14px;
  height: 5px;
  max-width: 620px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}
.record-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-d), var(--brand));
}

.record-right {
  flex: none;
  display: flex;
  align-items: center;
  gap: 26px;
}
.record-time { font-size: 16px; color: var(--t3); white-space: nowrap; }
.record-go {
  height: 46px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 23px;
  font-size: 17px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--line-2);
  white-space: nowrap;
}
.record-go svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.record-item.focus .record-go { background: var(--brand); border-color: #fff; }

/* ============================================================
   配置同步状态（「我的」页顶部横幅）
   ============================================================ */
.cfg-entry {
  margin: 22px var(--pad) 0;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 26px 34px;
  border-radius: var(--r-xl);
  background: linear-gradient(115deg, rgba(63, 169, 255, .22), rgba(34, 211, 184, .1) 52%, rgba(255, 255, 255, .04));
  border: 1px solid rgba(63, 169, 255, .42);
  cursor: pointer;
  transition: all .18s;
}
.cfg-entry:hover { background: linear-gradient(115deg, rgba(63, 169, 255, .3), rgba(34, 211, 184, .14) 52%, rgba(255, 255, 255, .07)); }
.cfg-entry.focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(63, 169, 255, .34), 0 18px 44px rgba(0, 0, 0, .5);
  transform: scale(1.012);
}
.cfg-entry .ce-ico {
  flex: none;
  width: 66px; height: 66px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(30, 111, 217, .45);
}
.cfg-entry .ce-ico svg { width: 34px; height: 34px; stroke: #fff; fill: none; stroke-width: 1.9; }
.cfg-entry .ce-body { flex: 1; min-width: 0; }
.cfg-entry .ce-t { font-size: 27px; font-weight: 500; letter-spacing: .5px; }
.cfg-entry .ce-d { margin-top: 9px; font-size: 15px; color: var(--t2); line-height: 1.6; }
.cfg-entry .ce-tags { flex: none; display: flex; gap: 10px; }
.ce-tag {
  height: 34px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  border-radius: 17px;
  font-size: 14px;
  color: var(--t2);
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.ce-tag.on { color: #9FD3FF; border-color: rgba(63, 169, 255, .5); background: rgba(63, 169, 255, .16); }
.ce-tag.warn { color: #FFD08A; border-color: rgba(255, 180, 63, .45); background: rgba(255, 180, 63, .14); }

/* 没同步上时整条横幅转成琥珀色，一眼能看出来 */
.cfg-entry.warn {
  background: linear-gradient(115deg, rgba(255, 180, 63, .18), rgba(255, 180, 63, .07) 55%, rgba(255, 255, 255, .04));
  border-color: rgba(255, 180, 63, .42);
}
.cfg-entry.warn:hover {
  background: linear-gradient(115deg, rgba(255, 180, 63, .26), rgba(255, 180, 63, .1) 55%, rgba(255, 255, 255, .07));
}
.cfg-entry.warn .ce-ico {
  background: linear-gradient(135deg, #F0A02E, #B9741A);
  box-shadow: 0 10px 26px rgba(185, 116, 26, .4);
}
.cfg-entry.warn.focus { box-shadow: 0 0 0 3px rgba(255, 180, 63, .34), 0 18px 44px rgba(0, 0, 0, .5); }
.cfg-entry .ce-go {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: 26px;
  font-size: 18px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--line-2);
  white-space: nowrap;
}
.cfg-entry .ce-go svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.cfg-entry.focus .ce-go { background: var(--brand); border-color: #fff; }
