* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: #090909;
  color: #f4f4f4;
  font-family: "Segoe UI", system-ui, sans-serif;
  overflow-x: hidden;
  max-width: 100%;
}
button, input { font: inherit; }
.top {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 4vw;
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(rgba(9,9,9,.94), rgba(9,9,9,.78));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand {
  color: #fff;
  font-weight: 800;
  font-size: 1.45rem;
  text-decoration: none;
  letter-spacing: -0.05em;
}
.brand::after { content: ""; }
#search { display: flex; gap: 8px; flex: 1; max-width: 520px; margin-left: auto; }
#q {
  flex: 1;
  background: #181818;
  color: #fff;
  border: 1px solid #2c2c2c;
  border-radius: 999px;
  padding: 11px 16px;
}
#q:focus { outline: none; border-color: #f0f0f0; }
button { cursor: pointer; border: 0; border-radius: 999px; }
#search button, #hero-play, #close {
  background: #fff;
  color: #111;
  font-weight: 750;
  padding: 10px 18px;
}
#hero-play { font-size: 1.05rem; padding: 12px 22px; }
.cats, .subs, .years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 10px 4vw 0;
}
.cats button, .subs button, .years button {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
}
.cats button { background: transparent; color: #c8c8c8; padding: 8px 12px; flex: 0 1 auto; }
.cats button.on { color: #111; background: #f3f3f3; }
.subs[hidden] { display: none; }
.subs button { background: #161616; color: #d0d0d0; border: 1px solid #2e2e2e; padding: 6px 12px; }
.subs button.on { color: #111; background: #f3f3f3; border-color: #f3f3f3; }
.years { padding-bottom: 4px; }
.years[hidden] { display: none; }
.years button { background: transparent; color: #9a9a9a; border: 1px solid #2e2e2e; padding: 5px 10px; }
.years button.on { color: #fff; background: #2a2a2a; }
.hero {
  position: relative;
  margin: 14px 4vw 6px;
  min-height: 320px;
  border-radius: 16px;
  background: #161616 center 20%/cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 28px 28px 32px;
  box-shadow: inset 0 -120px 90px rgba(0,0,0,.55);
  overflow: hidden;
}
.hero[hidden] { display: none; }
.hero-copy { position: relative; z-index: 1; max-width: 640px; }
.kicker {
  margin: 0 0 8px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 700;
  color: #ffe1e1;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.05;
  max-width: 18ch;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.hero-meta { margin: 0 0 16px; color: #e6e6e6; font-size: .95rem; }
.status { margin: 8px 4vw; color: #9a9a9a; min-height: 0; }
.row { margin: 6px 0 18px; }
.row[hidden] { display: none; }
.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4vw 10px;
}
.row h2 { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.see {
  background: transparent;
  color: #bdbdbd;
  padding: 4px 0;
  font-size: .85rem;
  font-weight: 650;
}
.see:hover { color: #fff; }
.scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4vw 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.card {
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
  width: 156px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.card:hover img, .card:focus-visible img { transform: scale(1.03); }
.grid {
  display: grid;
  gap: 14px 12px;
  padding: 8px 4vw 64px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.grid .card { width: auto; }
.page-title, .grid .group { grid-column: 1 / -1; margin: 8px 0 0; font-size: 1.35rem; }
.thumb { position: relative; display: block; overflow: hidden; border-radius: 8px; }
.time, .rate, .fresh {
  position: absolute;
  z-index: 1;
  color: #fff;
  font-size: .72rem;
  font-weight: 750;
  border-radius: 6px;
  padding: 2px 6px;
}
.time { right: 6px; bottom: 6px; background: rgba(0,0,0,.82); }
.rate { left: 6px; bottom: 6px; background: rgba(0,0,0,.82); color: #ffe08a; }
.fresh { left: 6px; top: 6px; background: #e23d3d; }
.card img, .ph {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 8px;
  background: #1b1b1b;
  display: block;
  transition: transform .18s ease;
}
.card img.ok { object-position: center center; }
.ph { display: grid; place-items: center; color: #9a9a9a; }
.card b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 8px;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.3;
}
.card small.note { display: block; margin-top: 3px; color: #9a9a9a; font-size: .75rem; line-height: 1.3; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.badge { font-size: .68rem; font-weight: 700; background: #242424; color: #e4e4e4; border-radius: 999px; padding: 2px 7px; }
.badge.age { background: #4a2030; color: #ffd0dc; }
#sentinel { height: 1px; }
.player {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.82);
  padding: 18px;
}
.player[hidden] { display: none; }
.stage {
  width: min(960px, 92vw);
  max-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
  background: #000;
  border-radius: 12px;
  overflow: auto;
}
.related { padding: 8px 12px 14px; background: #101010; flex: none; }
.related[hidden] { display: none; }
.related h3 { margin: 0 0 8px; font-size: .92rem; font-weight: 650; }
.related .card { width: 132px; }
.player-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; flex: none; }
.player-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#frame, #vid {
  width: 100%;
  height: min(52vh, calc(100dvh - 220px));
  max-height: calc(100dvh - 220px);
  border: 0;
  background: #000;
  object-fit: contain;
  flex: none;
}
#vid[hidden], #frame[hidden] { display: none; }
@media (max-width: 720px) {
  .top { flex-wrap: wrap; }
  #search { width: 100%; margin-left: 0; max-width: none; }
  .hero { min-height: 280px; padding: 18px; margin-top: 10px; }
  .card { width: 132px; }
}
@media (min-width: 1100px) {
  .hero { min-height: 460px; }
  .card { width: 180px; }
  .cats button, .subs button, .years button { padding: 8px 12px; font-size: .95rem; }
  #close { min-width: 88px; min-height: 44px; }
}
