:root {
  color-scheme: dark;
  --background: #121514;
  --surface: #1b201e;
  --line: #303833;
  --text: #f3f5f0;
  --muted: #afb9b1;
  --accent: #d9f57c;
  --ink: #18230e;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--background);
  color: var(--text);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 6rem; }
body { margin: 0; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.container { width: min(100% - 4.5rem, 1200px); margin-inline: auto; }
.header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; min-height: 4.7rem; gap: 2.5rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-size: 1.25rem; font-weight: 800; white-space: nowrap; }
.pill-18 { align-self: flex-start; padding: .08rem .4rem; border: 1px solid var(--line); border-radius: .5rem; color: var(--accent); font-size: .72rem; font-weight: 700; }
.brand-mark { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: .65rem; background: var(--accent); color: var(--ink); }
.play-icon { display: inline-block; width: .78em; height: .9em; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.brand-mark .play-icon, .card-play .play-icon { margin-left: .14em; }
nav { display: flex; gap: 1.65rem; color: var(--muted); font-size: .95rem; white-space: nowrap; }
nav a { padding-block: .55rem; }
nav a:hover, .footer a:hover, .credits a:hover { color: var(--accent); }
.search { margin-left: auto; display: flex; align-items: center; gap: .7rem; width: min(17rem, 36vw); padding: 0 .85rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); }
.search:focus-within { border-color: var(--accent); }
.search-icon { width: .84rem; height: .84rem; flex: 0 0 .84rem; border: 1.5px solid var(--muted); border-radius: 50%; position: relative; }
.search-icon::after { content: ""; width: .39rem; height: 1.5px; position: absolute; bottom: -.18rem; right: -.28rem; background: var(--muted); transform: rotate(48deg); }
.search input { width: 100%; height: 2.65rem; padding: 0; border: 0; background: transparent; color: var(--text); outline: 0; }
.search input::placeholder { color: var(--muted); }

.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: clamp(27rem, 40vw, 35rem); border: 1px solid #343c36; border-radius: 1.25rem; margin-top: 1.65rem; background: #26362d; }
.hero-art, .hero::after { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero-art { object-fit: cover; object-position: 57% 47%; z-index: -2; }
.hero::after { content: ""; background: linear-gradient(90deg, #101611ed 0%, #101611cb 23%, #10161145 59%, transparent 85%), linear-gradient(0deg, #101611d9, transparent 50%); }
.hero-content { padding: clamp(1.65rem, 5.1vw, 4.25rem); max-width: 39rem; }
.feature-label { display: inline-flex; align-items: center; gap: .52rem; margin: 0 0 .8rem; font-size: .9rem; font-weight: 750; color: var(--accent); }
.feature-label span { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.hero h1 { margin: 0; font-size: clamp(3rem, 7.15vw, 6rem); line-height: 1.1; letter-spacing: -.06em; }
.hero-meta { font-size: .95rem; color: #e2e9df; margin: .85rem 0 0; }
.hero-summary { color: #e1e7dc; line-height: 1.75; margin: .75rem 0 1.6rem; }
.primary { display: inline-flex; align-items: center; gap: .7rem; min-height: 3rem; background: var(--accent); color: var(--ink); border: 0; border-radius: .65rem; padding: .7rem 1.15rem; font-weight: 800; }
.primary:hover { background: #ecffa9; }

.library { padding-top: 2.7rem; }
.library-heading, .filter-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.library-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.sort-label { position: relative; }
.sort-label::after { content: ""; width: .4rem; height: .4rem; position: absolute; right: .85rem; top: 43%; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.sort-label select { appearance: none; min-height: 2.65rem; padding: .5rem 2rem .5rem .75rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); color: var(--text); cursor: pointer; font-size: .875rem; }
.filter-row { margin: 1rem 0 1.2rem; align-items: flex-start; }
.categories { display: flex; flex-wrap: wrap; gap: .45rem; }
.category { border: 1px solid var(--line); border-radius: 100rem; padding: .48rem .88rem; min-height: 2.5rem; background: none; color: var(--muted); font-size: .875rem; }
.category:hover { color: var(--text); border-color: var(--muted); }
.category[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: var(--accent); font-weight: 750; }
.result-count { align-self: center; flex-shrink: 0; margin: 0; color: var(--muted); font-size: .875rem; }
.film-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.7rem 1.15rem; }
.film-card { display: block; width: 100%; padding: 0; text-align: left; color: var(--text); border: 0; border-radius: .75rem; background: transparent; }
.film-art { display: block; position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: #273b31; border-radius: .75rem; }
.film-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.film-art img[hidden] { display: none; }
.film-card:hover img { transform: scale(1.04); }
.card-play { position: absolute; inset: 50% auto auto 50%; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: var(--accent); color: var(--ink); transform: translate(-50%, -50%); opacity: 0; transition: opacity .2s ease; }
.film-card:hover .card-play, .film-card:focus-visible .card-play { opacity: 1; }
.film-duration { position: absolute; bottom: .48rem; right: .48rem; padding: .22rem .38rem; border-radius: .28rem; background: #111713e8; color: white; font-size: .77rem; font-variant-numeric: tabular-nums; }
.film-title { display: block; margin: .6rem 0 .22rem; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.film-meta { color: var(--muted); font-size: .875rem; }
.empty { padding: 2rem 1rem; margin: 0; border: 1px solid var(--line); border-radius: .75rem; text-align: center; color: var(--muted); }

.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .85rem; margin-top: 2.75rem; border-top: 1px solid var(--line); padding: 1.25rem 0 max(1.25rem, env(safe-area-inset-bottom)); color: var(--muted); font-size: .875rem; }
.player { width: min(55rem, 100% - 2rem); max-height: min(92vh, 56rem); max-height: min(92dvh, 56rem); padding: 0; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 1rem; overflow: auto; }
.player::backdrop { background: #080b09d9; }
.player-heading, .player-footer { padding: 1.15rem 1.3rem; }
.player-heading { display: flex; align-items: start; justify-content: space-between; gap: .8rem; }
.player-heading h2 { font-size: 1.35rem; margin: 0 0 .25rem; }
.player-heading p, .player-footer p { margin: 0; color: var(--muted); line-height: 1.5; }
.close { flex-shrink: 0; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--background); color: var(--text); font-size: 1.6rem; line-height: 1; }
.screen { width: 100%; aspect-ratio: 16 / 9; background: #050605; }
.screen video, .screen iframe { display: block; width: 100%; height: 100%; border: 0; }
.player-status { margin: .9rem 1.3rem 0; color: var(--accent); }
.credits { display: flex; flex-wrap: wrap; gap: .35rem 1rem; color: var(--muted); margin-top: .65rem; font-size: .875rem; }
.credits a { text-decoration: underline; text-underline-offset: .16em; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 850px) {
  .container { width: calc(100% - 2.5rem); }
  .film-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 1rem; }
  .container { width: calc(100% - 2rem); }
  .header-inner { min-height: 4rem; gap: 1rem; }
  .brand { gap: .45rem; font-size: 1.08rem; }
  .brand-mark { width: 1.9rem; height: 1.9rem; }
  nav { gap: .8rem; font-size: .875rem; }
  nav a:first-child { display: none; }
  .search { width: min(12rem, 44vw); }
  .hero { min-height: 27rem; margin-top: 1rem; }
  .hero-art { object-position: 60% 30%; }
  .hero::after { background: linear-gradient(0deg, #101611 1%, #101611e0 25%, #1016111a 72%); }
  .hero-content { padding: 1.35rem; }
  .hero-summary { margin-bottom: 1rem; }
  .library { padding-top: 1.8rem; }
  .filter-row { flex-wrap: wrap; margin-top: .8rem; }
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem .7rem; }
  .film-title { margin-top: .45rem; }
  .footer { margin-top: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

