:root {
  color-scheme: light;
  --paper: #f5f8fc;
  --white: #fff;
  --ink: #112339;
  --soft: #53677f;
  --edge: #dde7f2;
  --teal: #36a9d1;
  --action: #096991;
  --navy: #101d32;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #2ca6cf; outline-offset: 3px; }
.shell { max-width: 1376px; margin-inline: auto; padding-inline: 26px; }
.site-header { min-height: 76px; background: #fff; border-top: 1px solid #dadde2; border-bottom: 1px solid #e0eaf4; }
.header-inner, .header-actions, .region summary { display: flex; align-items: center; }
.header-inner { justify-content: space-between; min-height: 75px; gap: 20px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; gap: 4px; }
.brand img { width: 66px; height: 42px; object-fit: contain; display: block; }
.brand-dot {
  width: 5px;
  height: 5px;
  margin-top: 16px;
  margin-inline-start: -3px;
  border-radius: 50%;
  background: #36a9d1;
}
.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 33px;
  height: 20px;
  margin-top: 3px;
  padding-right: 2px;
  border-radius: 2px;
  clip-path: polygon(9% 0, 100% 0, 91% 100%, 0 100%);
  background: linear-gradient(115deg, #1b4271, #0e2c55);
  color: #fff;
  font: italic 800 16px/1 Arial, sans-serif;
}
.header-actions { gap: 15px; font-weight: 690; font-size: .875rem; }
.login { padding: 10px 12px; }
.login:hover { color: var(--action); }
.join { border-radius: 8px; padding: 12px 18px; background: var(--teal); color: #092c3e; box-shadow: 0 6px 17px #36a9d12a; white-space: nowrap; }
.join:hover { background: #53bddf; }
.region { position: relative; }
.region summary { list-style: none; gap: 8px; padding: 7px 4px 7px 1px; cursor: pointer; }
.region summary::-webkit-details-marker { display: none; }
.region img { border-radius: 50%; object-fit: cover; }
.chevron { width: 6px; height: 6px; transform: rotate(45deg); border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; margin: 0 2px 3px 1px; }
.region-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 10; min-width: 176px; background: white; border: 1px solid var(--edge); border-radius: 12px; box-shadow: 0 12px 28px #19345316; padding: 11px; display: grid; gap: 4px; }
.region-menu button { border: 0; background: transparent; color: var(--ink); text-align: start; padding: 8px; border-radius: 7px; }
.region-menu button:hover, .region-menu button[aria-pressed="true"] { background: #e8f0f8; color: #075b83; }
.region { flex-shrink: 0; }
.workspace { padding-top: 24px; padding-bottom: 42px; }
.controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: #e8f0f8; border-radius: 12px; flex-wrap: wrap; }
.tabs a { font-size: .925rem; font-weight: 680; color: var(--soft); padding: 8px 16px; border-radius: 8px; white-space: nowrap; }
.tabs a[aria-current="page"] { background: white; color: #075b83; box-shadow: 0 2px 7px #18365613; }
.movie-search { display: flex; align-items: stretch; width: min(100%, 410px); gap: 7px; }
.movie-search input, .filters input, .filters select { width: 100%; min-width: 0; background: white; border: 1px solid var(--edge); border-radius: 9px; color: var(--ink); padding: 10px 12px; }
.movie-search input::placeholder, .filters input::placeholder { color: var(--soft); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 42px; padding: 8px 15px; white-space: nowrap; border: 1px solid var(--edge); border-radius: 9px; color: var(--ink); background: white; font-weight: 650; font-size: .9rem; }
.primary { background: var(--action); color: white; border-color: var(--action); }
.button:not(:disabled):hover { filter: brightness(.96); }
.button:disabled { opacity: .48; cursor: default; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.65rem); letter-spacing: -.036em; line-height: 1.16; }
h2 { font-size: 1.22rem; }
.featured { position: relative; min-height: 265px; border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .66fr); align-items: center; background: linear-gradient(108deg, #0d203b 5%, #153458 66%, #1e7295); color: white; isolation: isolate; }
.featured-copy { padding: clamp(23px, 5vw, 52px); z-index: 1; }
.featured-copy p { color: #d3e7fa; margin: 12px 0 23px; }
.featured-copy .button { color: #0e3751; background: #a5dff4; border: none; }
.featured-art { width: 100%; height: 100%; position: absolute; right: 0; inset-block: 0; width: 47%; overflow: hidden; }
.featured-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 34%; display: block; }
.featured-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #163a5d, transparent 65%); }
.section { margin-top: 26px; }
.section-heading, .page-heading, .filters, .paging { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-heading { margin-bottom: 10px; }
.section-heading a { color: var(--action); font-weight: 670; font-size: .9rem; white-space: nowrap; }
.page-heading { margin: 16px 0; align-items: baseline; }
.page-heading .sub, .sub { font-size: .875rem; color: var(--soft); }
.poster-row { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(125px, 15vw, 164px); gap: 12px; overflow-x: auto; scrollbar-color: #bdd0e2 transparent; padding: 2px 1px 9px; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(134px, 1fr)); gap: 15px; }
.movie-card { display: block; min-width: 0; overflow: hidden; background: white; border: 1px solid var(--edge); border-radius: 12px; }
.movie-card:hover { border-color: #83c3df; }
.poster { position: relative; display: grid; place-items: center; aspect-ratio: 2 / 3; overflow: hidden; background: linear-gradient(145deg, #dce9f7, #eff5fb); color: #607d9e; font-weight: 760; font-size: 2rem; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster-copy { padding: 8px 9px 10px; display: block; }
.poster-copy b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: .93rem; line-height: 1.4; }
.poster-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .78rem; color: var(--soft); margin-top: 4px; }
.history-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.history-card .movie-card { flex: 1; }
.source-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.source-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); gap: 8px; }
.source-card { flex-direction: column; align-items: start; white-space: normal; text-align: start; }
.source-card small { color: var(--soft); font-weight: 500; }
.source-auto[aria-pressed="true"], .source-card[aria-pressed="true"] { border-color: #83bdd5; background: #e7f4fa; color: #075577; }
.filters { margin-bottom: 15px; justify-content: flex-start; }
.filters select { max-width: 260px; appearance: none; padding-right: 29px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%2353677f' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.paging { justify-content: center; margin: 21px 0; color: var(--soft); }
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.category-tabs .button[aria-current="page"], .detail-actions .button[aria-pressed="true"] { background: #e1f1fa; color: #075879; border-color: #89c4dc; }
.subcategory-tabs { border-top: 1px solid var(--line, #dce5ee); padding-top: 12px; }
.subcategory-tabs .button { min-height: 36px; padding: 5px 12px; border-radius: 999px; font-size: .875rem; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.detail-actions .back { margin: 0; }
.notice { padding: 21px; font-size: .96rem; background: white; border: 1px solid var(--edge); border-radius: 12px; color: var(--soft); }
.notice.error { color: #874244; border-color: #ead3d3; }
.detail-head { display: grid; grid-template-columns: minmax(108px, 180px) minmax(0, 1fr); gap: clamp(14px, 4vw, 28px); margin-bottom: 22px; }
.detail-head .poster { border-radius: 12px; }
.detail-head p { color: var(--soft); line-height: 1.65; margin-top: 11px; }
.back { display: inline-block; margin-bottom: 10px; color: var(--action); font-weight: 680; }
.player { padding: 12px; border-radius: 14px; background: var(--navy); margin-bottom: 16px; color: #eaf5ff; }
.player video { width: 100%; aspect-ratio: 16 / 9; max-height: min(68vh, 680px); display: block; background: #0b101a; border-radius: 7px; }
.player p { padding: 9px 3px 0; color: #d0e1f2; font-size: .875rem; min-height: 27px; }
.episode-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.episode-row .button[aria-pressed="true"] { border-color: #83bdd5; background: #e7f4fa; color: #075577; }
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 340px); align-items: start; gap: 17px; }
.live-sidebar { background: white; border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; padding: 13px; }
.live-sidebar .filters { align-items: stretch; flex-direction: column; gap: 8px; }
.live-sidebar select { max-width: none; }
.channel-list { list-style: none; padding: 0; margin: 0; max-height: 480px; overflow: auto; }
.channel-list button { width: 100%; display: flex; align-items: center; justify-content: space-between; text-align: left; padding: 9px 10px; gap: 8px; min-height: 41px; border: 0; border-radius: 7px; background: white; font-weight: 650; color: var(--ink); }
.channel-list button:hover, .channel-list button[aria-pressed="true"] { background: #e9f5fc; color: #075577; }
.channel-list small { color: var(--soft); font-size: .75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 850px) {
  .controls { align-items: flex-start; flex-direction: column; gap: 11px; }
  .movie-search { width: 100%; }
}
@media (max-width: 680px) {
  .shell { padding-inline: 14px; }
  .site-header, .header-inner { min-height: 63px; }
  .header-inner { gap: 8px; }
  .header-actions { gap: 8px; min-width: 0; }
  .brand img { width: 56px; height: 36px; }
  .brand-dot { width: 4px; height: 4px; margin-top: 14px; }
  .brand-badge { width: 30px; height: 18px; font-size: 14px; }
  .join { padding: 10px 12px; }
  .login { padding-inline: 7px; }
  .join, .login { white-space: normal; text-align: center; }
  .workspace { padding-top: 15px; }
  .controls { margin-bottom: 15px; }
  .tabs { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tabs a { padding: 8px 3px; text-align: center; font-size: .875rem; white-space: normal; display: grid; place-items: center; }
  .featured { min-height: 204px; grid-template-columns: minmax(0, 1fr); }
  .featured-copy { padding: 20px; max-width: 80%; }
  .featured-art { width: 55%; }
  .featured-art::after { background: linear-gradient(90deg, #153758 2%, #15375830 88%); }
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 9px; }
  .page-heading { flex-wrap: wrap; gap: 5px; }
  .live-layout { grid-template-columns: minmax(0, 1fr); }
  .channel-list { max-height: 380px; }
  .section { margin-top: 19px; }
}
@media (max-width: 350px) { .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
