:root {
  color-scheme: dark;
  --bg: #0b0c0f;
  --surface: #15171c;
  --surface-2: #1c1f25;
  --surface-3: #242832;
  --line: #2b2f38;
  --text: #f7f7f8;
  --muted: #a7abb4;
  --accent: #e44f5b;
  --accent-hover: #f0606b;
  --yellow: #f2c552;
  --cyan: #62cad4;
  --success: #57c887;
  --container: 1360px;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}
img { max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
svg { display: block; }
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
.narrow { max-width: 840px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 72px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(11,12,15,.95);
  backdrop-filter: blur(16px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: max-content; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: #111; font-size: 12px; font-weight: 900; }
.brand strong { display: block; font-size: 22px; line-height: 1.05; }
.brand small { display: block; color: var(--muted); font-size: 9px; line-height: 1; margin-top: 4px; }
.main-nav { display: flex; align-items: center; gap: 24px; }
.nav-link { position: relative; color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active { font-weight: 700; }
.nav-link.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 2px; background: var(--accent); }
.header-search { margin-left: auto; width: min(360px, 30vw); height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.header-search svg { width: 18px; color: var(--muted); flex: 0 0 auto; }
.header-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.header-search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(98,202,212,.12); }
.menu-button { display: none; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.menu-button svg { width: 20px; }
.mobile-nav { padding: 8px 24px 18px; border-top: 1px solid var(--line); }
.mobile-nav a { display: block; min-height: 44px; padding: 10px 0; color: var(--muted); text-decoration: none; }

main { min-height: 70vh; }
.hero-band { padding: 24px 0 0; }
.hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #111318;
  background-image: linear-gradient(90deg, #0d0e12 0%, rgba(13,14,18,.97) 38%, rgba(13,14,18,.54) 68%, rgba(13,14,18,.1) 100%), var(--hero-image);
  background-position: center, right 14% center;
  background-size: cover, min(44%, 560px) auto;
  background-repeat: no-repeat;
}
.hero-copy { position: relative; z-index: 2; width: min(620px, 57%); padding: 64px 0 54px 56px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--cyan); font-size: 13px; font-weight: 700; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--cyan); }
.hero h1 { margin: 16px 0 12px; font-size: clamp(36px, 4vw, 52px); line-height: 1.12; letter-spacing: 0; }
.hero-meta, .detail-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 14px; color: #d4d6db; font-size: 14px; }
.outline-badge { display: inline-flex; align-items: center; min-height: 27px; padding: 2px 8px; border: 1px solid rgba(242,197,82,.58); border-radius: 4px; color: var(--yellow); font-size: 12px; }
.hero-copy > p { margin: 20px 0 26px; color: var(--muted); line-height: 1.8; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.hero-actions, .age-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 6px; text-decoration: none; font-weight: 700; }
.button svg { width: 18px; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); }
.button.secondary { border-color: var(--line); background: rgba(28,31,37,.9); color: #fff; }
.button.secondary:hover { background: var(--surface-3); }
.quick-filters, .genre-filter { display: flex; gap: 8px; padding: 22px 0 4px; overflow-x: auto; scrollbar-width: none; }
.quick-filters::-webkit-scrollbar, .genre-filter::-webkit-scrollbar { display: none; }
.quick-filters a, .genre-filter a { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; }
.quick-filters a:hover, .genre-filter a:hover { border-color: #6a6f7a; color: var(--text); }
.quick-filters a.active, .genre-filter a.active { border-color: var(--text); background: var(--text); color: #111; font-weight: 700; }

.content-section { padding-top: 34px; padding-bottom: 10px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 24px; line-height: 1.25; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.section-heading > a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); text-decoration: none; font-size: 14px; }
.section-heading > a:hover { color: var(--text); }
.section-heading svg { width: 16px; }
.video-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 24px 16px; }
.video-card { min-width: 0; }
.poster { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid rgba(255,255,255,.07); border-radius: 6px; background: var(--surface-2); }
.poster img { width: 100%; height: 100%; display: block; object-fit: cover; }
.poster::after { content: ""; position: absolute; inset: 56% 0 0; background: linear-gradient(transparent, rgba(4,5,7,.75)); pointer-events: none; }
.quality-badge { position: absolute; z-index: 2; top: 9px; right: 9px; padding: 3px 6px; border-radius: 4px; background: rgba(10,11,14,.86); color: #fff; font-size: 11px; }
.card-play { position: absolute; z-index: 2; left: 10px; bottom: 10px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(228,79,91,.96); color: #fff; opacity: 0; transition: opacity .2s ease; }
.card-play svg { width: 16px; }
.video-card:hover .card-play, .video-card:focus-within .card-play { opacity: 1; }
.video-card h3 { margin: 11px 0 5px; font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-card h3 a { text-decoration: none; }
.video-card h3 a:hover { color: var(--accent-hover); }
.video-card p { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.page-band { padding: 34px 0 24px; border-bottom: 1px solid var(--line); background: #101216; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 15px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs svg { width: 14px; }
.page-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.page-title h1, .page-band h1 { margin: 0; font-size: 34px; line-height: 1.25; }
.page-title p, .page-band > .container > p { margin: 7px 0 0; color: var(--muted); }
.genre-filter { padding-bottom: 0; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 42px 0 22px; }
.pagination a { min-width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); text-decoration: none; }
.pagination a:hover, .pagination a.current { border-color: var(--text); color: var(--text); }
.pagination a.current { background: var(--text); color: #111; }
.pagination svg { width: 17px; }

.search-page h1 { margin-bottom: 16px; }
.page-search { display: flex; align-items: center; gap: 10px; max-width: 760px; height: 52px; padding-left: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.page-search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(98,202,212,.1); }
.page-search svg { width: 20px; color: var(--muted); }
.page-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.page-search .button { align-self: stretch; border-radius: 0 5px 5px 0; }

.player-section { padding: 24px 0 0; }
.player-shell { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 8px 8px 0 0; background: #050506; }
.player-shell video, .player-shell iframe { width: 100%; height: 100%; display: block; border: 0; background: #050506; }
.player-status { position: absolute; left: 16px; bottom: 14px; padding: 5px 9px; border-radius: 4px; background: rgba(5,5,6,.74); color: #d7d9de; font-size: 12px; pointer-events: none; }
.source-panel { padding: 16px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; background: var(--surface); }
.source-tabs { display: flex; gap: 8px; padding-bottom: 12px; overflow-x: auto; }
.source-tabs button, .episode-list button { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--muted); }
.source-tabs button.active, .episode-list button.active { border-color: var(--accent); background: rgba(228,79,91,.13); color: #fff; }
.episode-list { display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); gap: 8px; max-height: 250px; overflow-y: auto; }
.episode-list button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-unavailable { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: center; }
.player-unavailable svg { width: 36px; color: var(--muted); }
.player-unavailable h2 { margin: 8px 0 0; }
.player-unavailable p { margin: 0; color: var(--muted); }
.detail-band { margin-top: 28px; padding: 34px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #101216; }
.detail-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 34px; align-items: start; }
.detail-poster { aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px; background: var(--surface); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-copy h1 { margin: 0 0 12px; font-size: 34px; line-height: 1.25; }
.metadata { margin: 24px 0; display: grid; gap: 9px; }
.metadata > div { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 12px; }
.metadata dt { color: var(--muted); }
.metadata dd { margin: 0; color: #e4e5e8; }
.summary { max-width: 920px; }
.summary h2 { margin: 0 0 7px; font-size: 18px; }
.summary p { margin: 0; color: var(--muted); line-height: 1.85; }

.empty-state { min-height: 260px; grid-column: 1 / -1; display: grid; place-items: center; align-content: center; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.empty-state svg { width: 36px; color: var(--muted); }
.empty-state h2 { margin: 10px 0 2px; }
.empty-state p { margin: 0; color: var(--muted); }
.prose { padding-top: 36px; padding-bottom: 60px; }
.prose section { padding: 0 0 28px; }
.prose h2 { margin: 0 0 8px; font-size: 21px; }
.prose p { margin: 0; color: var(--muted); line-height: 1.85; }
.age-gate, .error-page { min-height: 68vh; display: grid; place-items: center; padding: 40px 24px; }
.age-panel { width: min(560px,100%); text-align: center; }
.age-mark { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 20px; border: 2px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 22px; font-weight: 900; }
.age-panel h1, .error-page h1 { margin: 0 0 10px; font-size: 34px; }
.age-panel p, .error-page p { margin: 0 auto 24px; color: var(--muted); max-width: 520px; }
.age-actions { justify-content: center; }
.error-page { text-align: center; align-content: center; }
.error-page > span { color: var(--accent); font-size: 56px; font-weight: 900; }

.site-footer { margin-top: 54px; padding: 34px 0; border-top: 1px solid var(--line); background: #090a0c; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .8fr 1.2fr; gap: 36px; align-items: start; }
.footer-brand { font-size: 21px; font-weight: 800; text-decoration: none; }
.footer-grid p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.footer-grid nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 18px; }
.footer-grid nav a { color: var(--muted); text-decoration: none; font-size: 13px; }
.footer-grid nav a:hover { color: var(--text); }
.footer-note { text-align: right; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

@media (max-width: 1120px) {
  .main-nav { display: none; }
  .menu-button { display: grid; }
  .video-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .episode-list { grid-template-columns: repeat(7,minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .container { width: min(var(--container), calc(100% - 28px)); }
  .site-header, .header-inner { min-height: 62px; }
  .header-inner { gap: 10px; }
  .brand strong { font-size: 18px; }
  .brand small { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .header-search { flex: 1; width: auto; min-width: 0; }
  .header-search input::placeholder { color: transparent; }
  .hero-band { padding-top: 14px; }
  .hero { min-height: 490px; background-image: linear-gradient(0deg, #0d0e12 0%, rgba(13,14,18,.94) 45%, rgba(13,14,18,.1) 88%), var(--hero-image); background-position: center, center top; background-size: cover, 100% auto; }
  .hero-copy { width: 100%; padding: 230px 20px 24px; }
  .hero h1 { font-size: 32px; margin-top: 10px; }
  .hero-copy > p { margin: 13px 0 18px; -webkit-line-clamp: 2; }
  .hero-actions .button { flex: 1; padding-inline: 10px; }
  .quick-filters { padding-top: 16px; }
  .content-section { padding-top: 26px; }
  .section-heading { align-items: center; }
  .section-heading h2 { font-size: 21px; }
  .video-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 21px 12px; }
  .card-play { opacity: 1; }
  .page-band { padding: 26px 0 20px; }
  .page-title h1, .page-band h1 { font-size: 28px; }
  .page-search { height: auto; min-height: 52px; flex-wrap: wrap; padding: 10px; }
  .page-search .button { width: 100%; border-radius: 5px; }
  .player-section { padding-top: 14px; }
  .player-shell { border-radius: 6px 6px 0 0; }
  .source-panel { padding: 12px; }
  .episode-list { grid-template-columns: repeat(4,minmax(0,1fr)); max-height: 300px; }
  .detail-band { margin-top: 20px; padding: 24px 0; }
  .detail-layout { grid-template-columns: 104px minmax(0,1fr); gap: 16px; }
  .detail-copy h1 { font-size: 26px; }
  .detail-poster { grid-row: 1; }
  .metadata, .summary { grid-column: 1 / -1; }
  .metadata > div { grid-template-columns: 48px minmax(0,1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-note { text-align: left; }
}

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