:root {
  color-scheme: dark;
  --bg: #111714;
  --header: rgba(17, 23, 20, .94);
  --surface: #1b231e;
  --surface-hover: #263029;
  --text: #edf1ed;
  --muted: #9aa79e;
  --line: #2c3830;
  --accent: #b1d4bc;
  --accent-soft: #293d30;
  --accent-text: #d5ebdb;
  --frame: #050806;
  --shadow: 0 12px 40px rgba(0, 0, 0, .15);
  --page-padding: clamp(20px, 3vw, 56px);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f2;
  --header: rgba(244, 246, 242, .94);
  --surface: #ffffff;
  --surface-hover: #eaf0e8;
  --text: #202c24;
  --muted: #68776b;
  --line: #dce4d9;
  --accent: #3d7050;
  --accent-soft: #e0ecdf;
  --accent-text: #2a593a;
  --frame: #080c09;
  --shadow: 0 12px 40px rgba(33, 52, 38, .07);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 132px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); padding-top: env(safe-area-inset-top, 0px); }
.header-inner { max-width: 1920px; margin: 0 auto; padding: 0 var(--page-padding); min-height: 72px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; background: var(--accent-soft); color: var(--accent); }
.brand-mark svg { width: 23px; height: 23px; }
.brand-name { font-size: 15px; line-height: 1.4; font-weight: 650; letter-spacing: .015em; white-space: nowrap; }
.main-nav { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 4px; justify-self: center; width: min(100%, 610px); min-width: 0; }
.video-tab { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; line-height: 1.4; font-weight: 550; min-width: 0; transition: background .18s, color .18s; }
.video-tab:hover { background: var(--surface-hover); color: var(--text); }
.video-tab.active { color: var(--accent-text); background: var(--accent-soft); }
.tab-number { font-size: 10px; font-variant-numeric: tabular-nums; opacity: .65; }
.mobile-break { display: none; }
.theme-toggle { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 72px; min-height: 36px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; }
.theme-toggle:hover { background: var(--surface-hover); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }
.moon-icon { display: none; }
:root[data-theme="light"] .moon-icon { display: block; }
:root[data-theme="light"] .sun-icon { display: none; }
main { padding: 0 var(--page-padding) 28px; }
.screening { width: 100%; max-width: 1808px; margin: 0 auto; }
.screening-top { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 2px 14px; }
.screening-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; min-width: 0; }
.watching-label { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.screening-title h1 { font-size: 18px; font-weight: 620; line-height: 1.45; letter-spacing: -.02em; overflow-wrap: anywhere; margin: 0; }
#video-subtitle { color: var(--muted); font-size: 11px; }
.video-counter { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.player-shell { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.screen-frame { position: relative; width: 100%; height: min(66.667vh, calc(100vh - 206px)); height: min(66.667svh, calc(100svh - 206px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))); background: var(--frame); min-height: 0; }
.player-mount, .player-mount iframe, .player-mount video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--frame); }
.player-mount video { object-fit: contain; }
.player-mount:empty { pointer-events: none; }
.player-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; color: #9caaa0; font-size: 12px; }
.player-placeholder p { margin: 0; }
.loading-ring { width: 28px; height: 28px; border: 2px solid #2b3830; border-top-color: #b1d4bc; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; min-height: 56px; padding: 9px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.toolbar-left { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.source-switch { display: flex; flex-shrink: 0; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.source-button { min-height: 28px; padding: 5px 12px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 550; }
.source-button:hover { color: var(--text); }
.source-button.active { background: var(--accent-soft); color: var(--accent-text); }
.route-button { display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 2px 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.route-button #route-name { color: var(--text); }
.route-button svg { width: 13px; height: 13px; opacity: .65; }
.route-button:hover { color: var(--accent); }
.speed-control { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.speed-control select { max-width: 80px; min-height: 32px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 4px; font-size: 11px; }
.fullscreen-toggle { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; }
.fullscreen-toggle svg { width: 17px; height: 17px; }
.fullscreen-toggle:hover { background: var(--surface-hover); color: var(--text); }
.player-shell:fullscreen { width: 100%; height: 100%; display: flex; flex-direction: column; border: 0; border-radius: 0; background: var(--frame); }
.player-shell:fullscreen .screen-frame { height: auto; flex: 1 1 auto; }
.player-shell:fullscreen .player-toolbar { flex: 0 0 auto; padding-bottom: max(9px, env(safe-area-inset-bottom, 0px)); }
.mirror-error { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 24px; text-align: center; background: var(--frame); color: #edf1ed; }
.error-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #b1d4bc; border: 1px solid #4d6153; border-radius: 50%; margin-bottom: 16px; }
.mirror-error strong { font-size: 15px; line-height: 1.5; font-weight: 550; }
.mirror-error p { color: #9caaa0; font-size: 12px; line-height: 1.8; margin: 8px 0 16px; overflow-wrap: anywhere; }
.mirror-error code { color: #c4dfcc; font-size: 12px; }
.mirror-error button { border: 1px solid #46614e; border-radius: 7px; background: #263c2d; color: #d4e9da; padding: 9px 15px; font-size: 11px; }
.site-footer { padding: 0 var(--page-padding) max(18px, env(safe-area-inset-bottom, 0px)); }
.footer-inner { max-width: 1808px; margin: 0 auto; border-top: 1px solid var(--line); }
.footer-nav-row { display: flex; gap: 20px; padding: 22px 2px 20px; }
.footer-nav-row h2 { flex-shrink: 0; font-size: 12px; font-weight: 600; line-height: 20px; margin: 0; color: var(--text); }
.footer-links { min-width: 0; display: flex; flex-wrap: wrap; align-items: start; gap: 12px 22px; }
.footer-links a { text-decoration: none; color: var(--muted); font-size: 11px; line-height: 20px; white-space: nowrap; transition: color .18s; }
.footer-links a:hover { color: var(--accent); }
.footer-links a > span { color: var(--muted); opacity: .45; font-size: 10px; }
.footer-links em { font-style: normal; font-size: 9px; color: var(--accent); margin-left: 2px; }
.footer-links .old { color: var(--muted); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 10px; padding: 0 2px; }
.footer-bottom i { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); vertical-align: middle; margin: 0 6px; opacity: .6; }
.back-top { text-decoration: none; white-space: nowrap; padding: 7px 0 7px 10px; }
.back-top:hover { color: var(--text); }
@media (max-width: 1100px) {
  :root { --page-padding: 24px; }
  .header-inner { min-height: 64px; gap: 12px; }
  .brand-name { font-size: 14px; }
  .main-nav { grid-template-columns: 1.4fr 1fr 1fr; }
  .video-tab { padding: 10px 7px; gap: 5px; font-size: 11px; }
  .tab-number { display: none; }
  .theme-toggle { min-width: 36px; }
  .theme-label { display: none; }
}
@media (max-width: 820px) {
  :root { --page-padding: 16px; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 0; padding-top: 9px; padding-bottom: 9px; }
  .brand { min-height: 36px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; width: 100%; gap: 4px; margin-top: 9px; }
  .video-tab { min-height: 46px; padding: 6px 7px; font-size: 12px; }
  .brand-name { font-size: 15px; }
  .mobile-break { display: block; }
  .theme-label { display: inline; }
  .theme-toggle { min-width: 70px; }
  .screening-top { min-height: 56px; padding: 13px 1px; gap: 10px; }
  .screening-title { gap: 6px 10px; }
  .screening-title h1 { font-size: 16px; }
  .watching-label { display: none; }
  #video-subtitle { display: none; }
  .screen-frame { height: min(66.667vh, calc(100vh - 238px)); height: min(66.667svh, calc(100svh - 238px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))); }
  .player-shell { border-radius: 12px; }
  .player-toolbar { padding: 8px 10px; min-height: 54px; }
  .toolbar-left { gap: 5px 10px; }
  .footer-nav-row { flex-direction: column; gap: 11px; padding: 20px 1px 16px; }
  .footer-links { gap: 10px 20px; }
}
@media (max-width: 420px) {
  :root { --page-padding: 12px; }
  .brand-name { font-size: 14px; }
  .main-nav { grid-template-columns: 1.25fr 1fr 1.1fr; }
  .video-tab { font-size: 11px; min-height: 46px; padding: 5px 6px; }
  .screening-title h1 { font-size: 15px; }
  .video-counter { font-size: 10px; }
  .player-shell { border-radius: 10px; }
  .source-button { padding: 5px 9px; }
  .route-button { gap: 4px; font-size: 10px; }
  .fullscreen-toggle { padding: 6px 3px; }
  .fullscreen-toggle span { display: none; }
  .speed-control > span { display: none; }
  .footer-links { gap: 10px 16px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  :root { --page-padding: max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }
  .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 52px; padding-top: 5px; padding-bottom: 5px; gap: 8px; }
  .brand { gap: 6px; }
  .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
  .brand-name { white-space: normal; max-width: 100px; font-size: 11px; }
  .main-nav { grid-column: auto; grid-row: auto; margin: 0; width: 100%; }
  .video-tab { min-height: 36px; font-size: 10px; padding: 3px 4px; }
  .tab-number, .theme-label { display: none; }
  .theme-toggle { min-width: 32px; min-height: 32px; padding: 6px; }
  .screening-top { display: none; }
  main { padding-top: 8px; padding-bottom: 16px; }
  .screen-frame { height: calc(100vh - 122px); height: calc(100svh - 122px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .player-toolbar { min-height: 44px; padding: 4px 10px; }
  .source-button { min-height: 26px; padding-top: 3px; padding-bottom: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
