/* Reference-led layout: measured on the same 1403px desktop viewport. */
.portal {
  --bg: #090b21;
  --panel: #151830;
  --line: #292c46;
  --text: #fff;
  --muted: #a2a3b8;
  --accent: #20afe6;
  --accent-soft: #152438;
  margin: 0;
  padding-top: 60px;
  background: var(--bg);
  font: 13px/1.6 -apple-system, system-ui, BlinkMacSystemFont, Arial, "Segoe UI", Roboto, "Hiragino Sans GB", STHeiti, "Microsoft YaHei", sans-serif;
}
.portal.midnight {
  --bg: #100d22;
  --panel: #1a1731;
  --line: #332c47;
  --accent: #cb91df;
  --accent-soft: #2e203b;
}
.portal.feature-page { padding-top: 0; }
.portal > main, .portal > .site-footer { margin-left: 180px; }
.portal h1, .portal h2, .portal h3 { font-weight: 500; letter-spacing: 0; }
.portal .page { max-width: 1600px; padding: 28px 26px 60px 20px; }
.portal .page > h1 { font-size: 26px; margin: 7px 0 24px; }
.portal .eyebrow { font-size: 12px; color: var(--muted); letter-spacing: 0; }
.portal :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 180px;
  background: #090b21;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
}
.feature-page .site-rail { background: linear-gradient(90deg, #090b21eb, #090b2199 80%, transparent); }
.site-rail .brand { display: block; flex-shrink: 0; width: 126px; margin: 13px 0 18px 32px; }
.site-rail .brand img { width: 126px; height: 36px; object-fit: contain; }
.rail-tools { margin: 0 0 0; }
.rail-tools > a, .rail-nav > a, .rail-bottom > a {
  display: flex;
  align-items: center;
  height: 49px;
  padding-left: 39px;
  padding-right: 12px;
  gap: 11px;
  color: #c5c7d8;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  position: relative;
}
.nav-symbol { width: 24px; flex-shrink: 0; color: #b2bad9; font: 23px/1 system-ui; text-align: center; }
.nav-symbol svg { display: block; width: 24px; height: 24px; }
.header-tools > a svg { display: block; width: 25px; height: 25px; }
.header-search button svg { display: block; width: 22px; height: 22px; }
.header-search button { padding-top: 2px; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 100; padding: 10px 16px; background: #fff; color: #090b21; }
.skip-link:focus { top: 10px; }
.portal [id] { scroll-margin-top: 76px; }
.rail-tools > .rail-vip, .rail-tools > .rail-vip .nav-symbol { color: #d8b9b3; }
.rail-tools > .night-link .nav-symbol { color: #cf9ccf; }
.rail-cross small { font-size: 9px; color: #a49aaf; margin-left: -6px; }
.rail-nav > a:hover, .rail-bottom > a:hover { color: #fff; }
.rail-nav > a.active, .rail-nav > a.active .nav-symbol { color: var(--accent); }
.rail-nav > a.active .nav-symbol { filter: drop-shadow(0 0 5px #20afe688); }
.rail-nav > a.active::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 18px;
  height: 10px;
  width: 4px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent);
}
.rail-bottom { margin-top: auto; padding: 18px 0 10px; }
.rail-bottom > small { display: block; color: #686b82; font-size: 10px; margin: 15px 40px 5px; }
.portal-topbar {
  position: fixed;
  inset: 0 0 auto 180px;
  z-index: 35;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 42px 0 98px;
  background: #090b21f2;
}
.feature-page .portal-topbar { background: linear-gradient(#0006, transparent); }
.feature-page.is-scrolled .portal-topbar { background: #090b21f5; box-shadow: 0 1px 0 #ffffff0a; }
.top-channel { width: 160px; flex-shrink: 0; margin-right: 98px; color: var(--accent); font-size: 16px; font-weight: 600; }
.top-channel span { margin-left: 4px; }
.top-channel summary { display: flex; align-items: center; gap: 6px; }
.top-channel summary > svg { width: 15px; height: 15px; }
.channel-menu { position: relative; }
.channel-menu summary { cursor: pointer; list-style: none; }
.channel-menu summary::-webkit-details-marker { display: none; }
.channel-menu > nav { position: absolute; left: -15px; top: 37px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 12px; width: 270px; background: #191d38; border: 1px solid #363c59; box-shadow: 0 8px 20px #0006; }
.channel-menu nav a { display: flex; align-items: center; gap: 9px; color: #bfc5dd; font-size: 14px; font-weight: 400; padding: 9px; }
.channel-menu nav .nav-symbol svg { width: 20px; height: 20px; }
.channel-menu nav a:hover { color: #fff; background: #30365a; }
.header-search { display: flex; flex-shrink: 0; align-items: center; width: 330px; height: 40px; border-radius: 24px; background: #ffffff24; overflow: hidden; }
.portal .header-search input { width: 100%; min-width: 0; border: 0; background: transparent; border-radius: 0; outline: none; padding: 9px 22px; font-size: 13px; }
.header-search input::placeholder { color: #b8b8c0; }
.header-search button { background: none; border: 0; color: #dddde6; padding: 0 16px 3px 9px; font-size: 29px; line-height: 1; }
.header-tools { display: flex; flex: 1; align-items: center; justify-content: space-between; margin-left: 34px; gap: 22px; }
.header-tools > a { font-size: 24px; line-height: 1; color: #c8cbd3; white-space: nowrap; }
.header-tools > a > span { display: none; }
.header-tools > .vip-shortcut { color: #d8b9b3; }
.vip-menu { position: relative; color: #d8b9b3; flex-shrink: 0; }
.vip-menu > summary { cursor: pointer; list-style: none; width: 34px; height: 38px; display: grid; place-items: center; }
.vip-menu > summary::-webkit-details-marker { display: none; }
.vip-menu > summary svg { width: 27px; height: 27px; display: block; }
.vip-popover { position: absolute; top: 46px; right: -100px; width: 400px; background: #27243c; padding: 23px; border: 1px solid #645274; border-radius: 12px; box-shadow: 0 14px 40px #0008; color: #e4d5d5; }
.vip-popover-heading { display: flex; align-items: center; gap: 14px; }
.vip-popover-heading > svg { width: 42px; height: 42px; color: #e4bedf; }
.vip-popover-heading strong { color: #fff; font-size: 18px; font-weight: 600; }
.vip-popover-heading p { color: #c8b9ca; font-size: 12px; margin: 5px 0 0; }
.vip-popover-benefits { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; border-top: 1px solid #ffffff12; margin-top: 20px; padding-top: 20px; }
.vip-popover-benefits > span { display: flex; align-items: center; flex-direction: column; gap: 10px; font-size: 12px; white-space: nowrap; }
.vip-popover-benefits svg { display: block; width: 30px; height: 30px; color: #e6c8b1; }
.vip-popover-action { display: block; background: #efd0b5; color: #563522; padding: 10px 14px; text-align: center; border-radius: 6px; margin: 22px 0 9px; font-size: 15px; }
.vip-popover-action:hover { color: #563522; background: #f5dcc7; }
.vip-popover > small { display: block; color: #bbb0c0; font-size: 11px; text-align: center; }
.account-links { display: flex; align-items: center; margin: 0; gap: 10px; font-size: 13px; white-space: nowrap; }
.account-links form { margin: 0; }
.avatar { width: 29px; height: 29px; border-radius: 50%; display: inline-grid; place-items: center; color: #d9ddeb; background: #303b65; margin-right: 10px; font-size: 14px; }
.profile-link { display: inline-flex; align-items: center; }
.profile-link > span:last-child { max-width: 60px; overflow: hidden; text-overflow: ellipsis; }
.mobile-brand, .mobile-channels { display: none; }
.cover-hero { position: relative; height: 550px; width: calc(100% + 180px); margin-left: -180px; overflow: hidden; background: #131a23; }
.cover-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg), #090b2100 58%), linear-gradient(90deg, #090b21a6, #090b2100 40%, #090b2100 82%, #090b2166); }
.cover-copy { position: absolute; bottom: 18px; left: 200px; max-width: 570px; z-index: 2; }
.cover-copy h1 { font-size: 26px; font-weight: 600; margin: 0 0 12px; }
.cover-meta { font-size: 16px; color: #c1bdc2; line-height: 1.7; margin-bottom: 14px; }
.cover-meta span + span::before { content: " / "; color: #9294a4; margin: 0 3px; }
.cover-copy .button-row { margin: 0; }
.portal .button.play-primary { border: 0; border-radius: 30px; background: #ffffff33; color: #fff; font-size: 22px; font-weight: 400; padding: 7px 22px; }
.play-primary span { font-size: 24px; line-height: 1; margin-left: 3px; }
.portal .button.play-primary:hover { background: #ffffff44; filter: none; }
.hero-thumbnails { position: absolute; right: 78px; bottom: 19px; z-index: 3; display: flex; gap: 9px; max-width: 42%; overflow: hidden; }
.hero-thumbnails > a { display: block; width: 90px; height: 124px; position: relative; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.hero-thumbnails img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumbnails span { position: absolute; inset: auto 0 0; font-size: 14px; padding: 20px 6px 3px; color: #e9e9ed; background: linear-gradient(transparent, #000c); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; text-align: center; }
.hero-thumbnails a.active { box-shadow: inset 0 0 0 1px #fff; }
.no-feature { background: #11152b; }
.no-feature .cover-copy h1 { font-size: 26px; }
.no-feature .cover-copy p { color: #a5a6b7; font-size: 14px; }
.home-content { max-width: 1640px; padding: 0 26px 40px 18px; margin: auto; }
.channel-directory { margin: 17px 0 55px; }
.directory-links { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.directory-links > a { color: #bfc0d6; background: #24274b; border-radius: 7px; font-size: 14px; padding: 6px 21px; white-space: nowrap; line-height: 1.65; }
.directory-links > a:hover { color: #fff; background: #30355c; }
.directory-links span { margin-left: 5px; }
.film-shelf { margin: 0 0 40px; }
.shelf-head { display: flex; align-items: center; gap: 24px; min-height: 28px; margin-bottom: 30px; }
.shelf-head h2 { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 22px; font-weight: 500; white-space: nowrap; }
.shelf-head h2 i { width: 23px; height: 25px; display: inline-block; background: linear-gradient(145deg, #35c3ed 0 42%, #a275dc 43% 65%, #df87b5 66%); clip-path: polygon(8% 25%, 52% 0, 40% 43%, 94% 23%, 66% 88%, 35% 100%, 40% 57%, 0 76%); }
.shelf-tabs { display: flex; gap: 19px; font-size: 13px; color: #9296af; }
.shelf-tabs .selected { color: var(--accent); }
.shelf-more { margin-left: auto; font-size: 13px; color: #9296af; }
.shelf-hint { display: none; }
.shelf-empty { display: flex; gap: 20px; font-size: 13px; color: #8589a1; margin: -12px 0 0 40px; min-height: 20px; }
.shelf-empty > a { color: #abb3ce; }
.portal .cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 9px; margin: 0; }
.portal .poster { aspect-ratio: 3/4; position: relative; display: block; border-radius: 0; overflow: hidden; background: #25263c; }
.portal .poster img { width: 100%; height: 100%; object-fit: cover; transition: none; }
.portal .poster:hover img { transform: none; }
.portal .poster-label { position: absolute; inset: auto 0 0; text-align: right; font-size: 13px; padding: 22px 8px 5px; color: #eee; border-radius: 0; background: linear-gradient(transparent, #0009); }
.portal .play-circle { display: none; }
.portal .film-card h3 { font-size: 17px; font-weight: 400; margin: 6px 0 2px; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal .film-card p { margin: 0; font-size: 13px; color: #898caa; }
.local-content-note { font-size: 12px; color: #868aa4; }
.portal .panel { background: var(--panel); border: 1px solid #ffffff0a; border-radius: 5px; }
.portal .button { border-radius: 5px; font-weight: 500; color: #fff; }
.portal .button.secondary { background: #ffffff08; color: #d5d6e3; }
.portal .favorite[aria-pressed="true"], .status-login { color: var(--accent); }
.portal input, .portal select, .portal textarea { background: #11152c; border-color: #303652; border-radius: 4px; }
.portal .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 20px; gap: 14px; }
.portal .filters label { font-size: 13px; }
.portal .filters input, .portal .filters select { font-size: 13px; height: 39px; padding: 8px 12px; }
.portal .detail-grid { grid-template-columns: 210px minmax(0, 1fr); gap: 35px; max-width: 1100px; margin: 22px 0 36px; }
.portal .detail-poster { width: 210px; height: 280px; object-fit: cover; border-radius: 0; }
.portal .detail-grid h1 { font-size: 30px; margin: 10px 0 14px; }
.portal .detail-grid p { font-size: 14px; color: #b0b5cc; }
.portal .auth { max-width: calc(100% - 36px); width: 430px; padding: 35px; margin: 55px auto 75px; }
.portal .auth h1 { font-size: 26px; }
.portal .notice { font-size: 13px; border-left-width: 2px; background: #ffffff05; color: #bbbdd0; }
.portal .watch-page { max-width: 1450px; padding-top: 22px; }
.portal .player-shell { border: 0; border-radius: 0; }
.portal video { max-height: 70vh; }
.portal .player-status { padding: 7px 14px; font-size: 12px; background: #12162d; }
.portal .watch-page > .button-row { margin: 14px 0; gap: 13px; }
.seek-label { min-width: 110px; max-width: 330px; flex: 1; }
.portal .player-toolbar { padding: 15px 0; border-block: 1px solid #ffffff0a; }
.portal .player-toolbar select { font-size: 12px; padding: 7px 12px; }
.portal .watch-page > .section-top h1 { font-size: 24px; }
.portal .feature-grid { gap: 18px; }
.vip-intro > h1 { font-size: 30px !important; }
.vip-intro > p { color: #a0a6bd; }
.vip-benefits { display: grid; grid-template-columns: repeat(4, 1fr); margin: 30px 0; border-block: 1px solid var(--line); }
.vip-benefits > div { text-align: center; padding: 22px 14px; }
.vip-benefits strong { font-size: 16px; font-weight: 500; display: block; }
.vip-benefits span { color: #868da8; font-size: 12px; }
.plan-card { padding: 26px !important; }
.plan-card h2 { font-size: 20px; margin: 12px 0; }
.plan-card .price { font-size: 36px; color: #dbc1b2; margin: 16px 0; }
.plan-card ul { font-size: 14px; color: #a0a7bf; padding-left: 18px; line-height: 2.1; }
.plan-card .button { margin-top: 15px; width: 100%; }
.site-footer { border-top: 1px solid #ffffff0a; color: #6c728e; padding: 25px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: 12px; }
.site-footer nav { display: flex; gap: 20px; margin-left: auto; }
.site-footer strong { font-weight: 400; }
.site-footer > small { font-size: 10px; }
.site-footer > small:last-child { display: block; width: 100%; }
@media (min-width: 1700px) {
  .cover-hero { height: 650px; }
  .portal .cards { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cover-copy { bottom: 30px; }
  .hero-thumbnails { bottom: 30px; }
}
@media (max-width: 1250px) {
  .portal-topbar { padding-left: 65px; padding-right: 30px; }
  .top-channel { margin-right: 35px; width: 130px; }
  .header-search { width: 300px; }
  .header-tools { gap: 24px; margin-left: 25px; }
  .portal .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .site-rail { width: 150px; }
  .site-rail .brand { margin-left: 26px; width: 113px; }
  .site-rail .brand img { width: 113px; }
  .rail-tools > a, .rail-nav > a, .rail-bottom > a { padding-left: 27px; font-size: 14px; }
  .portal > main, .portal > .site-footer { margin-left: 150px; }
  .portal-topbar { left: 150px; padding-left: 40px; gap: 20px; }
  .top-channel { width: 70px; margin-right: 10px; }
  .header-search { width: 260px; }
  .header-tools { margin-left: auto; gap: 20px; flex: 0; }
  .header-tools .favorite-shortcut { display: none; }
  .account-links .profile-link > span:last-child, .account-links .text-button { display: none; }
  .avatar { margin-right: 0; }
  .cover-hero { margin-left: -150px; width: calc(100% + 150px); height: 510px; }
  .cover-copy { left: 185px; }
  .hero-thumbnails { right: 35px; }
  .portal .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .directory-links { gap: 10px; }
  .directory-links > a { padding: 6px 16px; }
  .portal .film-card h3 { font-size: 15px; }
  .portal .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 660px) {
  .portal, .portal.feature-page { padding-top: 0; }
  .site-rail { display: none; }
  .portal > main, .portal > .site-footer { margin-left: 0; }
  .portal-topbar, .feature-page .portal-topbar { position: relative; left: 0; height: 58px; padding: 0 15px; gap: 13px; background: var(--bg); }
  .mobile-brand { display: block; flex-shrink: 0; width: 113px; }
  .mobile-brand img { display: block; width: 100%; }
  .top-channel { display: none; }
  .header-search { min-width: 0; flex: 1; height: 32px; width: auto; }
  .portal .header-search input { font-size: 11px; padding: 5px 10px; height: 30px; }
  .header-search button { padding: 0 10px 3px 0; font-size: 24px; }
  .header-tools { flex: 0; margin-left: 0; }
  .header-tools > a { display: none; }
  .vip-menu > summary { width: 28px; height: 36px; }
  .vip-menu > summary svg { width: 23px; height: 23px; }
  .vip-popover { position: fixed; top: 58px; right: 12px; left: 12px; width: auto; max-width: 400px; margin-left: auto; padding: 20px; }
  .login-link { font-size: 0; }
  .avatar { width: 26px; height: 26px; font-size: 13px; }
  .mobile-channels { display: flex; gap: 25px; overflow-x: auto; align-items: center; height: 44px; padding: 0 17px; white-space: nowrap; font-size: 14px; }
  .mobile-channels a[aria-current] { color: var(--accent); }
  .mobile-channels .night-link { font-size: 12px; }
  .cover-hero { height: 285px; width: 100%; margin-left: 0; }
  .cover-image { object-position: 62% center; }
  .cover-shade { background: linear-gradient(0deg, var(--bg), transparent 85%), linear-gradient(90deg, #090b2144, transparent); }
  .cover-copy { left: 18px; bottom: 17px; max-width: 75%; }
  .cover-copy h1 { font-size: 23px; margin: 0 0 5px; }
  .cover-meta { font-size: 12px; margin-bottom: 9px; }
  .portal .button.play-primary { font-size: 15px; padding: 6px 15px; }
  .play-primary span { font-size: 18px; }
  .hero-thumbnails { right: 18px; bottom: 16px; max-width: 25%; }
  .hero-thumbnails > a { width: 57px; height: 80px; }
  .hero-thumbnails span { font-size: 10px; padding: 15px 3px 3px; }
  .home-content { padding: 0 16px 25px; }
  .channel-directory { margin: 13px 0 32px; }
  .directory-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
  .directory-links > a { text-align: center; padding: 5px 0; font-size: 12px; border-radius: 4px; }
  .film-shelf { margin-bottom: 30px; }
  .shelf-head { gap: 14px; margin-bottom: 20px; }
  .shelf-head h2 { font-size: 18px; gap: 9px; }
  .shelf-head h2 i { width: 18px; height: 20px; }
  .shelf-tabs { font-size: 11px; gap: 12px; }
  .shelf-more { font-size: 11px; }
  .shelf-empty { font-size: 11px; margin-left: 28px; gap: 12px; }
  .portal .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px 7px; }
  .portal .film-card h3 { font-size: 13px; margin-top: 5px; }
  .portal .film-card p { font-size: 10px; }
  .portal .poster-label { font-size: 10px; padding-right: 5px; }
  .portal .page { padding: 22px 16px 40px; }
  .portal .page > h1 { font-size: 23px; }
  .portal .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 15px; gap: 12px; }
  .portal .filters label:first-child { grid-column: 1/-1; }
  .portal .detail-grid { grid-template-columns: 108px minmax(0, 1fr); gap: 18px; margin-top: 20px; }
  .portal .detail-poster { width: 108px; height: 155px; }
  .portal .detail-grid h1 { font-size: 22px; margin-top: 0; }
  .portal .detail-grid p { font-size: 12px; }
  .portal .detail-grid .button { font-size: 10px; padding: 7px 10px; }
  .portal .detail-grid .button-row { gap: 8px; margin-top: 12px; }
  .portal .auth { margin: 28px auto 45px; padding: 25px; }
  .portal .watch-page > .button-row { gap: 9px; }
  .portal .watch-page .button-row .button { padding: 8px 10px; font-size: 11px; }
  .portal .player-toolbar label { width: calc(50% - 10px); }
  .portal .player-toolbar select { width: 100%; font-size: 11px; }
  .portal .watch-page > .section-top h1 { font-size: 21px; }
  .vip-benefits { grid-template-columns: repeat(2, 1fr); }
  .vip-benefits strong { font-size: 14px; }
  .vip-benefits span { font-size: 10px; }
  .portal .panel { padding: 20px; }
  .site-footer { padding: 22px 16px; font-size: 10px; gap: 12px; }
  .site-footer nav { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal *, .portal *::before, .portal *::after { transition: none !important; animation: none !important; }
}
