/* 车机视觉更新：保留现有 DOM、焦点顺序和功能，只替换视觉层。 */
:root {
  --bg: #10141b;
  --panel: #1a212b;
  --text: #f3f5f7;
  --text-2: #c2cbd6;
  --muted: #96a3b3;
  --line: #ffffff0d;
  --line-strong: #ffffff20;
  --hair: #ffffff12;
  --amber: #83ddd1;
  --amber-ink: #102b29;
  --amber-soft: #83ddd114;
  --teal: #83ddd1;
  --surface-1: #202833;
  --surface-2: #19212b;
  --amber-grad: #83ddd1;
  --teal-grad: #83ddd1;
  --sheen: 0 0 transparent;
  --glow-amber: 0 0 transparent;
  --glow-teal: 0 0 transparent;
  --top-h: 88px;
  --rail-w: 208px;
  --pad: 28px;
  --gap: 20px;
  --poster-row-w: 340px;
  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 14px;
  --fs-nav: 30px;
  --fs-btn: 30px;
  --fs-clock: 36px;
}

body { -webkit-font-smoothing: antialiased; }
.app { background: var(--bg); }
button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible, .kbd :focus { outline: 3px solid var(--teal); outline-offset: 4px; }
.statusbar { gap: 28px; padding: 0 30px; background: #10141b; }
.clock { font-weight: 550; letter-spacing: -.025em; }
.stat { font-size: 25px; gap: 10px; }
.led, .led.off { width: 9px; height: 9px; box-shadow: none; }
.topbar-actions { gap: 12px; }
.chip { min-height: 64px; padding: 0 24px; border-radius: 12px; background: #1c232d; border-color: transparent; font-size: 25px; font-weight: 500; }
.chip.primary { background: var(--teal); }
.chip.qk, .chip.qk.on { background: #83ddd10b; border-color: #83ddd11a; color: #a5d9d2; }
.chip.qk.todo::after { border-width: 1px; animation: none; opacity: .45; }
.icon-btn { width: 64px; height: 64px; }
.icon-btn svg { width: 30px; height: 30px; }

.rail { padding: 24px 16px; gap: 12px; background: #121720; border-color: var(--line); }
.nav { min-height: 88px; gap: 16px; padding: 0 20px; border-radius: 14px; color: #8f9cac; }
.nav svg { width: 34px; height: 34px; stroke-width: 1.7; }
.nav b { font-weight: 550; letter-spacing: 0; }
.nav.on { background: #83ddd111; color: var(--teal); }
.nav.on::before { content: ''; position: absolute; left: 0; width: 3px; height: 30px; border-radius: 3px; background: var(--teal); }
.nav { position: relative; }

.btn { min-height: 80px; padding: 0 30px; background: #232c38; border: 1px solid #ffffff0c; border-radius: 14px; font-weight: 550; box-shadow: none; }
.btn.primary { background: var(--teal); border-color: transparent; color: var(--amber-ink); }
.rows { gap: 36px; }
.row-block { gap: 20px; }
.row-head h3 { font-size: 36px; font-weight: 550; letter-spacing: -.02em; }
.row-scroll { gap: 24px; }
.poster-card { gap: 14px; }
.poster-card .img { border: 0; border-radius: 16px; background: #202833; }
.poster-card .nm { font-size: 30px; font-weight: 550; }
.tag-tr { border-radius: 8px; background: #10141be0; font-size: 23px; font-weight: 500; }
.tag-rate { color: #d4e5e2; }
.grid { gap: 24px; }
.cat-load-state { grid-column: 1 / -1; min-height: 40px; padding: 6px 0; color: var(--muted); font-size: 25px; text-align: center; }
.chips button, .chips button.toggle { border-radius: 12px; box-shadow: none; }
.chips:not(.detail-lines) button:not(.on):not(.toggle) { background: #202833; border-color: transparent; color: var(--text-2); }
.chips button.on, .chips button.toggle { background: #83ddd112; border-color: #83ddd13a; color: var(--teal); }
.search-bar input { background: #1a222d; border-color: #ffffff12; border-radius: 14px; font-weight: 450; }
.cat-head h2 { font-weight: 550; font-size: 44px; }
.result-head { text-align: left; font-size: 26px; color: var(--muted); }

/* 详情页：独立的影片信息区、来源导航和选集，减少同屏描边。 */
.page-detail { gap: 16px; padding: 28px 36px; }
.detail-head {
  gap: 26px; align-items: center; padding: 16px 24px;
  min-height: 188px; border-radius: 20px;
  background: radial-gradient(ellipse at 100% 0%, #83ddd10a, transparent 65%), #171e28;
}
.detail-poster { width: 100px; border-radius: 12px; border: 0; box-shadow: 0 8px 24px #0003; background: #242e3b; }
.detail-meta { gap: 8px; }
.detail-meta h2 { font-size: 42px; font-weight: 550; line-height: 1.1; letter-spacing: -.025em; }
.detail-sub { font-size: 26px; color: #9aa9b9; min-height: 30px; font-weight: 400; }
.detail-actions { gap: 12px; margin-top: 0; }
.detail-actions .btn { min-height: 64px; font-size: 28px; padding: 0 28px; }
#dBack { background: #ffffff07; border-color: #ffffff0d; color: var(--text-2); }
.detail-lines-row { gap: 14px; }
.detail-tabs-row { border-bottom: 1px solid #ffffff0d; align-items: stretch; }
.detail-lines-count { align-self: center; font-size: 24px; color: #8392a4; padding-right: 2px; }
.line-tabs { padding: 0; gap: 28px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.line-tab { position: relative; min-height: 78px; padding: 0 4px 14px; gap: 5px; border: 0; border-radius: 0; align-items: flex-start; background: transparent; text-align: left; }
.line-tab b { font-size: 29px; font-weight: 550; line-height: 1.15; }
.line-tab small { color: #7f8ea0; font-size: 21px; font-weight: 400; line-height: 1.1; }
.line-tab.on, .line-tab[data-line-type="pan"].on { background: transparent; box-shadow: none; color: var(--text); }
.line-tab.on small, .line-tab[data-line-type="pan"].on small { color: #a4b5c3; }
.line-tab.on::after { content: ''; position: absolute; bottom: -1px; left: 4px; right: 4px; height: 3px; border-radius: 2px; background: var(--teal); }
.detail-lines { gap: 12px; max-height: 140px; }
.detail-lines.pan-layout { max-height: 220px; }
.detail-lines button, .detail-lines button.pan, .detail-lines button.pan-provider, .detail-lines button.pan-variant {
  min-height: 64px; align-items: center; padding: 0 20px; gap: 14px;
  border: 1px solid transparent; border-radius: 12px;
  background: #1d2530; box-shadow: none; color: #b6c2d1; font-weight: 500;
}
.detail-lines button b { font-size: 26px; line-height: 1.2; font-weight: 550; }
.detail-lines button small { font-size: 22px; line-height: 1.2; font-weight: 400; opacity: 1; color: #8293a6; }
.detail-lines button.on, .detail-lines button.pan.on, .detail-lines button.pan-provider.on, .detail-lines button.pan-variant.on {
  color: #b5ede5; background: #83ddd110; border-color: #83ddd14d; box-shadow: none;
}
.detail-lines button.on small, .detail-lines button.pan-provider.on small { color: #9ec8c2; }
.detail-lines button.pan-variant { max-width: 640px; }
.detail-lines button.pan-more { background: transparent; color: var(--teal); border-color: #83ddd125; }
.detail-lines .pan-sub-label { min-height: 26px; padding: 2px 0 0; font-size: 23px; font-weight: 450; letter-spacing: 0; color: #8393a6; }
.detail-lines .pan-status { min-height: 64px; font-weight: 400; }
.eps-head { min-height: 34px; font-size: 27px; font-weight: 550; color: #c5ced9; gap: 0; }
.eps-head::before { content: none; }
.eps-grid { grid-template-columns: repeat(auto-fill, 164px); gap: 12px; }
.ep-btn { min-height: 78px; font-size: 29px; font-weight: 500; border: 1px solid transparent; border-radius: 12px; background: #1d2530; box-shadow: none; color: #b7c3d2; }
.ep-btn.on { background: #83ddd1; color: #153a35; box-shadow: none; font-weight: 550; }
.ep-btn.on::before { font-size: 17px; }

/* 播放器保持原来的 30/70 分区和控件尺寸，使用同一套平面材质。 */
.play-side { background: #121923; border-color: #ffffff0d; }
.play-title { font-weight: 550; font-size: 35px; }
.play-sub { font-weight: 400; }
.pbtn { border-color: #ffffff0c; border-radius: 12px; background: #222c39; box-shadow: none; }
.pbtn b { font-weight: 550; }
#pFull { color: #b5ede5; background: #83ddd114; border-color: #83ddd12b; box-shadow: none; }
.play-status { background: #ffffff04; border: 0; border-radius: 12px; padding: 9px 14px; box-shadow: none; }
.play-status .dot, .play-status.busy .dot, .play-status.error .dot { width: 8px; height: 8px; box-shadow: none; }
.play-status-main { font-weight: 500; font-size: 28px; }
.side-block { border: 0; border-radius: 14px; background: #1b2430; box-shadow: none; }
.side-tag { font-size: 25px; font-weight: 550; }
.side-tag::before { content: none; }
.side-count { font-size: 22px; }
.play-side .line-tabs { padding: 0; gap: 20px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.play-side .line-tab { padding: 5px 0 10px; min-height: 54px; border: 0; border-radius: 0; background: transparent; text-align: left; align-items: flex-start; }
.play-side .line-tab b { font-size: 23px; font-weight: 550; }
.play-side .line-tab small { font-size: 18px; font-weight: 400; }
.play-side .line-tab.on, .play-side .line-tab[data-line-type="pan"].on { background: transparent; color: var(--text); box-shadow: none; }
.play-side .line-tab.on small, .play-side .line-tab[data-line-type="pan"].on small { color: #a4b5c3; }
.play-side #pLines { gap: 8px; }
.play-side #pLines button { background: #263140; border: 1px solid transparent; border-radius: 9px; box-shadow: none; color: var(--text-2); }
.play-side #pLines button b { font-weight: 500; }
.play-side #pLines button.on { color: #b5ede5; border-color: #83ddd140; background: #83ddd111; box-shadow: none; font-weight: 550; }
.play-side #pLines .p-pan-group b { font-weight: 550; }
.play-side #pEps .ep-btn { background: #263140; border-radius: 10px; }
.play-side #pEps .ep-btn.on { background: var(--teal); color: var(--amber-ink); }
.play-fs-bar { box-shadow: none; }

/* 状态只作为视频中央的临时覆盖层，不占画面布局，也不拦截原生控件。 */
.play-stage { position: relative; }
#pStatus {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 1; width: max-content; max-width: calc(100% - 96px);
  display: flex; align-items: center; gap: 18px;
  padding: 22px 30px; border: 1px solid #ffffff16; border-radius: 18px;
  background: #111923ed; box-shadow: 0 12px 48px #0004;
  pointer-events: none;
}
#pStatus .play-status-main { font-size: 30px; font-weight: 500; line-height: 1.3; color: var(--text); white-space: normal; }
#pStatus .play-status-hint { font-size: 24px; min-height: 0; line-height: 1.3; white-space: normal; }
#pStatus .play-status-hint:empty { display: none; }
#pStatus .play-status-text { gap: 6px; }
#pStatus .dot { width: 10px; height: 10px; box-shadow: none; }
#pStatus.busy .dot { width: 28px; height: 28px; border: 3px solid #83ddd130; border-top-color: var(--teal); background: transparent; animation: status-spin 1s linear infinite; }
#pStatus.error .dot { background: var(--danger); }
@keyframes status-spin { to { transform: rotate(360deg); } }
.play-start {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  min-width: 250px; min-height: 112px; padding: 24px 36px;
  border: 1px solid #ffffff30; border-radius: 22px;
  background: #83ddd1; color: #102b29; box-shadow: 0 16px 60px #0005;
  font-size: 34px; font-weight: 550;
}
.play-start svg { width: 38px; height: 38px; fill: currentColor; }

/* 换源的两级各自占位，真实资源始终有独立的可见区域。 */
.side-block-sources { flex: 0 0 auto; min-height: 0; max-height: 430px; }
#pProviders { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; max-height: 136px; overflow-y: auto; overflow-x: hidden; }
#pProviders button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 64px; min-width: 0; max-width: 100%; padding: 0 8px;
  background: #263140; border: 1px solid transparent; border-radius: 9px; color: var(--text-2);
}
#pProviders button b { font-size: 23px; font-weight: 500; }
#pProviders button small { color: #95a6b9; font-size: 19px; }
#pProviders button.on { background: #83ddd111; border-color: #83ddd140; color: #b5ede5; }
#pProviders .pan-more { background: transparent; border-color: #83ddd125; color: var(--teal); font-size: 22px; }
#pProviders .pan-status { display: flex; align-items: center; min-height: 44px; font-size: 20px; color: var(--muted); }
.play-resource-label { flex: 0 0 auto; min-height: 24px; font-size: 21px; color: #99aabd; }
.play-side #pLines.pan-layout { flex: 0 1 auto; min-height: 76px; max-height: 170px; align-items: stretch; }
.play-side #pLines.pan-layout button {
  flex: 1 0 100%; min-height: 68px; padding: 10px 14px; gap: 12px;
  justify-content: flex-start; align-items: center; max-width: 100%; white-space: normal;
}
.play-side #pLines.pan-layout button b { flex: 1 1 auto; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.play-side #pLines.pan-layout button small { flex: 0 0 auto; font-size: 20px; white-space: nowrap; }
.play-side #pLines.pan-layout button.on::before { content: none; }
.play-side #pLines.pan-layout .pan-variant.on { border-left: 3px solid var(--teal); }

.login, .bind { background: #10141bf5; }
.login-card, .bind-card { background: #19212c; border-color: #ffffff0d; box-shadow: 0 24px 80px #0004; }
.login-card h2, .bind-head h2 { font-weight: 550; }
.login-card input { background: #111923; border-color: #ffffff16; }
.bind-qr { background: #202a37; border-color: transparent; box-shadow: none; }
.bind-qr h3 { font-weight: 550; }
.toast { background: #283443; border: 1px solid #ffffff12; font-size: 30px; border-radius: 14px; box-shadow: 0 16px 60px #0005; }
.empty b { font-weight: 550; }
.empty-cta em { border-radius: 14px; font-weight: 550; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
