:root {
  --bg: #000;
  --bg-2: #141414;
  --card: #1a1a1a;
  --red: #e50914;
  --red-2: #f40612;
  --text: #fff;
  --muted: #b3b3b3;
  --soft: #808080;
  --line: rgba(255,255,255,.12);
  --shadow: 0 20px 50px rgba(0,0,0,.55);
  --nav-h: 68px;
  --dock: 64px;
  --ease: cubic-bezier(.33,1,.68,1);
  --max: 1760px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); min-height: 100%; }
body {
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.boot {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px 24px 40px;
}
.boot strong {
  display: block;
  font-family: "Bebas Neue", Inter, sans-serif;
  font-size: 72px;
  letter-spacing: .08em;
  color: var(--red);
  line-height: 1;
}
.boot p { color: #bbb; margin-top: 12px; font-size: 16px; }

#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 36px;
  background: #000;
}
.logo {
  font-family: "Bebas Neue", sans-serif;
  font-size: 38px;
  letter-spacing: .06em;
  color: var(--red);
  line-height: 1;
}
.links { display: flex; gap: 20px; font-size: 14px; font-weight: 500; }
.links a { color: var(--muted); transition: color .15s; }
.links a:hover, .links a.on { color: #fff; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
#search-form {
  display: flex; align-items: center;
  border: 1px solid transparent;
  background: transparent;
  transition: .2s ease;
}
#search-form.open {
  border-color: #fff;
  background: rgba(0,0,0,.78);
  padding-left: 8px;
}
#search-toggle { width: 40px; height: 40px; display: grid; place-items: center; }
#search-input {
  width: 0; opacity: 0; border: 0; background: transparent;
  padding: 8px 0; transition: width .22s var(--ease), opacity .22s;
}
#search-form.open #search-input { width: min(42vw, 280px); opacity: 1; padding-right: 12px; }
#search-input::placeholder { color: #888; }
.avatar {
  width: 32px; height: 32px; border-radius: 4px;
  background: linear-gradient(145deg, #e50914, #7a0810);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}

#app { min-height: 100vh; padding-bottom: 80px; }

.hero {
  position: relative;
  min-height: 420px;
  height: 58vh;
  max-height: 580px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: #141414;
  background-size: cover;
  background-position: center 22%;
  background-repeat: no-repeat;
}
.hero-copy {
  width: min(100%, var(--max));
  padding: 0 48px 36px;
  max-width: 760px;
}
.hero-kicker {
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-bottom: 10px;
}
.hero-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(52px, 8vw, 104px);
  line-height: .88;
  letter-spacing: .01em;
  text-shadow: 0 8px 30px rgba(0,0,0,.55);
}
.hero-logo {
  max-width: min(420px, 70vw); max-height: 132px;
  object-fit: contain; object-position: left bottom;
  margin-bottom: 10px;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.65));
}
.hero-copy .hero-title { margin-top: 4px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 14px; color: #e5e5e5; font-size: 14px; font-weight: 600; }
.pill { border: 1px solid rgba(255,255,255,.28); padding: 1px 7px; border-radius: 2px; font-size: 12px; color: #ddd; }
.match { color: #46d369; font-weight: 800; }
.hero-overview {
  color: #d8d8d8; font-size: 16px; line-height: 1.5;
  max-width: 560px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border-radius: 4px;
  font-weight: 700; font-size: 16px; transition: transform .15s, filter .15s, background .15s;
}
.btn:hover { transform: scale(1.03); filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn-play { background: #fff; color: #111; }
.btn-ghost { background: rgba(109,109,110,.55); color: #fff; }
.btn-ghost:hover { background: rgba(109,109,110,.4); }
.btn svg { width: 22px; height: 22px; }

.shelf-wrap { position: relative; z-index: 3; margin-top: -8px; background: #000; padding-top: 8px; }
.shelf { margin: 0 0 28px; }
.shelf-head {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 48px 10px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.shelf-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.shelf-head span { color: var(--muted); font-size: 13px; font-weight: 600; }
.scroller {
  display: flex; gap: 8px;
  overflow-x: auto; scroll-behavior: smooth;
  padding: 12px 48px 28px;
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.row-btn {
  position: absolute; top: 54px; bottom: 28px; z-index: 4;
  width: 42px;
  background: rgba(0,0,0,.45);
  color: #fff; font-size: 28px; font-weight: 700;
  opacity: 0; transition: opacity .2s, background .2s;
}
.shelf:hover .row-btn { opacity: 1; }
.row-btn:hover { background: rgba(20,20,20,.85); }
.row-btn.left { left: 0; }
.row-btn.right { right: 0; }

.card {
  flex: 0 0 auto;
  width: 240px;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--card);
  position: relative;
  cursor: pointer;
  transform-origin: center center;
  transition: transform .22s var(--ease), box-shadow .22s;
}
.grid .card,
.grid .poster-card {
  width: 100%;
  aspect-ratio: 2/3;
}
.card img {
  width: 100%; height: 100%; object-fit: cover;
  background:
    linear-gradient(160deg, #2a2a2a, #141414);
}
.card .shade {
  position: absolute; inset: auto 0 0; padding: 28px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.88));
  font-size: 13px; font-weight: 700;
  opacity: 1; transition: opacity .2s;
}
.card:hover { transform: scale(1.12); z-index: 5; box-shadow: var(--shadow); }
.card:hover .shade { opacity: 1; }
.poster-card { width: 168px; aspect-ratio: 2/3; }
.poster-card .shade { opacity: 1; }

.card.top10 {
  width: 270px;
  height: 210px;
  aspect-ratio: auto;
  display: flex;
  align-items: flex-end;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}
.top10 .num {
  font-family: Inter, sans-serif;
  font-weight: 900;
  font-size: 180px;
  line-height: .68;
  letter-spacing: -.1em;
  color: #000;
  -webkit-text-stroke: 4px #555;
  margin-right: -22px;
  user-select: none;
  flex: 0 0 auto;
}
.card.top10 img {
  width: 138px;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.card.top10 .shade { display: none; }
.card.top10:hover { transform: translateY(-6px) scale(1.03); }

.page { padding: calc(var(--nav-h) + 22px) 0 40px; }
.page-head {
  width: min(100%, var(--max));
  margin: 0 auto 18px;
  padding: 0 48px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.page-head h1 { font-size: 32px; font-weight: 900; letter-spacing: -.03em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #141414;
  color: #ddd; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
}
.chip.on, .chip:hover { background: #fff; color: #111; border-color: #fff; }
.grid {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 8px 48px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px 10px;
}
.grid .card { width: 100%; }
.empty {
  width: min(100%, var(--max));
  margin: 40px auto;
  padding: 0 48px;
  color: var(--muted);
  font-size: 18px;
}

#modal, #player {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,.72);
  overflow: auto;
}
#player { background: #000; display: grid; place-items: center; }
#player iframe, #player .frame { width: min(96vw, 1200px); aspect-ratio: 16/9; border: 0; background: #000; }
.player-bar {
  position: absolute; top: 18px; left: 18px; right: 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.close-x {
  width: 40px; height: 40px; border-radius: 50%;
  background: #181818; border: 1px solid #333;
  display: grid; place-items: center; font-size: 22px;
}

.sheet {
  width: min(980px, 94vw);
  margin: 48px auto 80px;
  background: #181818;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.sheet-hero { position: relative; aspect-ratio: 16/8.2; background: #111 center/cover no-repeat; }
.sheet-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, #181818 97%);
}
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.sheet-body { position: relative; margin-top: -90px; padding: 0 36px 36px; z-index: 2; }
.sheet-title { font-family: "Bebas Neue", sans-serif; font-size: clamp(40px, 6vw, 72px); line-height: .9; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 14px; color: #cfcfcf; font-weight: 600; font-size: 14px; }
.sheet-overview { color: #d2d2d2; line-height: 1.55; font-size: 15px; max-width: 68ch; }
.cast { margin-top: 22px; color: var(--muted); font-size: 14px; }
.cast b { color: #fff; font-weight: 600; }
.eps { margin-top: 28px; }
.eps-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
select.season {
  background: #242424; border: 1px solid #444; color: #fff;
  padding: 8px 12px; border-radius: 4px;
}
.ep {
  display: grid; grid-template-columns: 48px 160px 1fr; gap: 14px;
  padding: 14px 8px; border-top: 1px solid #2a2a2a; cursor: pointer;
}
.ep:hover { background: #232323; }
.ep img { width: 160px; height: 90px; object-fit: cover; border-radius: 4px; background: #222; }
.ep h4 { font-size: 15px; margin-bottom: 6px; }
.ep p { color: var(--muted); font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.providers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.providers img { width: 36px; height: 36px; border-radius: 8px; }

.skel {
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shine 1.2s linear infinite;
  border-radius: 4px;
}
@keyframes shine { to { background-position: -200% 0; } }

.dock {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--dock) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8,8,8,.94);
  border-top: 1px solid #222;
  grid-template-columns: repeat(5, 1fr);
}
.dock a, .dock button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; color: #aaa; font-weight: 600;
}
.dock span { font-size: 16px; line-height: 1; }

.site-foot {
  color: #555; font-size: 12px; text-align: center;
  padding: 8px 16px 28px;
}

@media (max-width: 820px) {
  #nav { padding: 0 16px; gap: 14px; }
  .links { display: none; }
  .hero { min-height: 78vh; }
  .hero-copy, .shelf-head, .page-head, .grid, .empty { padding-left: 16px; padding-right: 16px; }
  .scroller { padding-left: 16px; padding-right: 16px; }
  .card { width: 196px; }
  .poster-card { width: 132px; }
  .row-btn { display: none; }
  .dock { display: grid; }
  #app { padding-bottom: 110px; }
  .sheet { margin-top: 18px; }
  .sheet-body { padding: 0 16px 28px; }
  .ep { grid-template-columns: 32px 112px 1fr; }
  .ep img { width: 112px; height: 64px; }
  #search-form.open #search-input { width: 46vw; }
}

@media (hover: none) {
  .card:hover { transform: none; }
  .card .shade { opacity: 1; }
}
