:root {
  color-scheme: dark;
  --bg: #141414;
  --bg-deep: #050505;
  --panel: #181818;
  --panel-soft: #242424;
  --text: #ffffff;
  --muted: #b7b7b7;
  --quiet: #808080;
  --brand: #ccff00;
  --brand-soft: #dfff35;
  --brand-dark: #6f8f00;
  --match: #46d369;
  --green: #2dd36f;
  --gold: #d6a93a;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.68);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  min-height: 68px;
  padding: 0 4%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.34) 58%, rgba(0, 0, 0, 0));
  transition: background 180ms ease, min-height 180ms ease, box-shadow 180ms ease;
}

.topbar.scrolled {
  min-height: 58px;
  background: rgba(12, 12, 12, 0.98);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.brand {
  margin-right: 34px;
  color: var(--brand);
  font-size: 1.72rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgba(204, 255, 0, 0.22);
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #e5e5e5;
  font-size: 0.91rem;
}

.main-nav a {
  opacity: 0.82;
  transition: opacity 150ms ease, color 150ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  opacity: 1;
  color: #fff;
}

.main-nav a.active {
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.icon-button,
.x-button,
.profile-button,
.round-action,
.modal-close,
.rail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: transparent;
}

.icon-button {
  width: 32px;
  height: 32px;
  padding: 6px;
  transition: color 150ms ease, transform 150ms ease;
}

.x-button {
  width: 32px;
  height: 32px;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.icon-button:hover,
.x-button:hover,
.profile-button:hover {
  color: var(--brand);
}

.x-button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.icon-button svg,
.x-button svg,
.round-action svg,
.modal-close svg,
.rail-button svg {
  width: 100%;
  height: 100%;
}

.profile-button {
  gap: 8px;
  min-width: 56px;
  min-height: 34px;
  padding: 0;
}

.profile-button svg {
  width: 15px;
  height: 15px;
}

.profile-logo {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 18px rgba(204, 255, 0, 0.2);
}

.hero {
  position: relative;
  min-height: 760px;
  height: 82vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: url("assets/hero.webp");
  background-position: center top;
  background-size: cover;
  transform: scale(1.02);
}

.hero-video-stack {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #080808;
}

.hero-video-stack video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 900ms ease;
}

.hero-video-stack video.active {
  opacity: 1;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.66) 30%, rgba(0, 0, 0, 0.16) 58%, rgba(0, 0, 0, 0) 76%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.08) 44%, rgba(20, 20, 20, 0.98) 100%);
}

.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 170px;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0), var(--bg));
  pointer-events: none;
}

.hero-copy {
  width: min(670px, 48%);
  padding: 204px 0 0 4%;
  transition: opacity 280ms ease, transform 280ms ease;
}

.hero-copy.is-switching {
  opacity: 0.82;
  transform: translateY(4px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: #d7d7d7;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

.series-mark {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 2px;
  background: var(--brand);
  color: #111;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 0 18px rgba(204, 255, 0, 0.35);
}

.hero h1 {
  max-width: 12ch;
  margin: 0 0 18px;
  font-size: 4.7rem;
  line-height: 0.94;
}

.hero-meta,
.modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #d7d7d7;
  font-size: 0.96rem;
  font-weight: 700;
}

.hero-meta span:first-child,
.modal-meta span:first-child {
  color: var(--match);
}

.rating {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 7px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: #fff;
  font-size: 0.82rem;
}

.hero-description {
  max-width: 610px;
  margin: 0 0 28px;
  color: #f1f1f1;
  font-size: 1.18rem;
  line-height: 1.42;
  text-wrap: pretty;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.hero-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contract-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: min(100%, 560px);
  min-height: 34px;
  margin-top: 18px;
  padding: 0 12px;
  border: 1px solid rgba(204, 255, 0, 0.32);
  border-radius: 5px;
  background: rgba(10, 10, 10, 0.46);
  color: #e9e9e9;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.22);
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.contract-pill:hover {
  border-color: rgba(204, 255, 0, 0.75);
  background: rgba(18, 18, 18, 0.72);
  color: #fff;
}

.contract-pill span {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 900;
}

.contract-pill code {
  overflow: hidden;
  color: #d8d8d8;
  font-family: "Arial", Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-pill svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--brand);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 8px;
  margin-top: 26px;
}

.hero-dots span {
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: background-color 220ms ease, width 220ms ease;
}

.hero-dots span.active {
  width: 38px;
  background: var(--brand);
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 4px;
  padding: 0 24px;
  font-size: 1.04rem;
  font-weight: 800;
  transition: background-color 150ms ease, transform 150ms ease;
}

.primary-action svg,
.secondary-action svg {
  width: 23px;
  height: 23px;
  margin-right: 10px;
}

.primary-action {
  background: #fff;
  color: #000;
}

.primary-action:hover {
  background: rgba(255, 255, 255, 0.78);
}

.secondary-action {
  background: rgba(109, 109, 110, 0.68);
  color: #fff;
  backdrop-filter: blur(12px);
}

.secondary-action:hover {
  background: rgba(109, 109, 110, 0.48);
}

.primary-action:active,
.secondary-action:active,
.round-action:active,
.icon-button:active,
.x-button:active,
.profile-button:active {
  transform: scale(0.98);
}

.maturity-ribbon {
  position: absolute;
  right: 0;
  bottom: 26%;
  display: flex;
  align-items: center;
  min-width: 92px;
  height: 38px;
  padding-left: 15px;
  border-left: 3px solid #dcdcdc;
  background: rgba(51, 51, 51, 0.65);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.catalog {
  position: relative;
  z-index: 2;
  margin-top: -88px;
  padding: 0 0 72px;
}

.row {
  position: relative;
  margin: 0 0 44px;
}

.row-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0 4% 10px;
}

.row-title {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.2;
}

.row-kicker {
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.row:hover .row-kicker {
  opacity: 1;
  transform: translateX(0);
}

.rail-wrap {
  position: relative;
}

.rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0 4% 22px;
  scroll-behavior: smooth;
  scroll-padding: 4%;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.title-card {
  position: relative;
  flex: 0 0 clamp(238px, 24%, 346px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: var(--panel-soft);
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.3);
  transform-origin: center;
  transition: transform 180ms ease, box-shadow 180ms ease, z-index 180ms ease;
}

.title-card:hover,
.title-card:focus-within {
  z-index: 8;
  transform: scale(1.075) translateY(-5px);
  box-shadow: var(--shadow);
}

.title-card button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.title-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 180ms ease, transform 300ms ease;
}

.title-card:hover img,
.title-card:focus-within img {
  filter: brightness(0.78);
  transform: scale(1.03);
}

.card-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, 0.88) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0) 45%);
  opacity: 0.95;
}

.card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 58px 13px 12px;
}

.card-copy h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  line-height: 1.08;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #e5e5e5;
  font-size: 0.74rem;
  font-weight: 700;
}

.card-match {
  color: var(--match);
}

.card-badge {
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 1px 4px;
  font-size: 0.68rem;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(5px);
  transition: max-height 180ms ease, margin-top 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.title-card:hover .card-actions,
.title-card:focus-within .card-actions {
  max-height: 34px;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
}

.mini-action {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: rgba(24, 24, 24, 0.76);
  color: #fff;
}

.mini-action.play {
  border-color: #fff;
  background: #fff;
  color: #111;
}

.mini-action svg {
  width: 14px;
  height: 14px;
}

.continue-progress {
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.28);
  opacity: 0;
  transition: opacity 160ms ease;
}

.continue-progress::after {
  content: "";
  display: block;
  width: var(--progress, 52%);
  height: 100%;
  background: var(--brand);
}

.is-continue .continue-progress {
  opacity: 1;
}

.rail-button {
  position: absolute;
  z-index: 10;
  top: 0;
  bottom: 22px;
  width: 4%;
  min-width: 44px;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 160ms ease, background-color 160ms ease;
}

.rail-wrap:hover .rail-button,
.rail-button:focus-visible {
  opacity: 1;
}

.rail-button:hover {
  background: rgba(0, 0, 0, 0.68);
}

.rail-button.prev {
  left: 0;
}

.rail-button.next {
  right: 0;
}

.rail-button svg {
  width: 30px;
  height: 30px;
}

.top-ten .title-card {
  flex-basis: clamp(284px, 29%, 410px);
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.top-ten .title-card button {
  display: grid;
  grid-template-columns: 35% 65%;
  align-items: center;
}

.rank {
  position: relative;
  z-index: 0;
  color: #070707;
  font-size: 11rem;
  font-weight: 900;
  line-height: 0.8;
  text-align: right;
  text-shadow:
    -2px -2px 0 #646464,
    2px -2px 0 #646464,
    -2px 2px 0 #646464,
    2px 2px 0 #646464,
    0 0 18px rgba(0, 0, 0, 0.7);
}

.top-ten .card-art {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: var(--panel-soft);
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.3);
}

.top-ten .title-card img,
.top-ten .card-scrim,
.top-ten .card-copy {
  position: absolute;
}

.top-ten .title-card img {
  inset: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.modal-panel {
  position: relative;
  width: min(900px, 100%);
  max-height: min(860px, 92vh);
  overflow: auto;
  border-radius: 7px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 50%;
  background: rgba(16, 16, 16, 0.84);
}

.modal-image {
  min-height: 390px;
  background-position: center;
  background-size: cover;
}

.modal-image::after {
  content: "";
  display: block;
  min-height: 390px;
  background: linear-gradient(180deg, rgba(24, 24, 24, 0) 42%, var(--panel) 100%);
}

.modal-content {
  margin-top: -108px;
  padding: 0 42px 42px;
}

.modal-content h2 {
  max-width: 16ch;
  margin: 0 0 12px;
  font-size: 3rem;
  line-height: 0.98;
  text-shadow: 0 2px 18px #000;
}

.modal-description {
  max-width: 660px;
  margin: 0 0 24px;
  color: #e4e4e4;
  font-size: 1.02rem;
  line-height: 1.5;
}

.round-action {
  width: 43px;
  height: 43px;
  padding: 10px;
  border: 2px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  background: rgba(42, 42, 42, 0.78);
}

.round-action:hover {
  border-color: #fff;
  background: rgba(58, 58, 58, 0.92);
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .hero {
    min-height: 690px;
    height: 76vh;
  }

  .hero-copy {
    width: min(620px, 78%);
    padding-top: 172px;
  }

  .hero h1 {
    font-size: 3.55rem;
  }

  .title-card {
    flex-basis: clamp(224px, 42%, 330px);
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 58px;
    padding: 0 18px;
  }

  .brand {
    margin-right: 12px;
    font-size: 1.28rem;
  }

  .top-actions {
    gap: 5px;
  }

  .icon-button:nth-child(2) {
    display: none;
  }

  .profile-button svg {
    display: none;
  }

  .hero {
    min-height: 640px;
    height: 72vh;
  }

  .hero-bg {
    background-position: 62% top;
  }

  .hero::before {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.34)),
      linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(20, 20, 20, 0.98) 93%);
  }

  .hero-copy {
    width: auto;
    padding: 154px 22px 0;
  }

  .hero-video-stack video {
    transform: scale(1.08);
  }

  .eyebrow {
    font-size: 0.78rem;
  }

  .series-mark {
    width: 20px;
    height: 20px;
    font-size: 0.86rem;
  }

  .hero h1 {
    max-width: 11ch;
    font-size: 2.52rem;
  }

  .hero-description {
    max-width: 36ch;
    font-size: 0.98rem;
  }

  .hero-actions {
    align-items: stretch;
    gap: 8px;
  }

  .contract-pill {
    width: 100%;
    margin-top: 14px;
  }

  .contract-pill code {
    font-size: 0.75rem;
  }

  .hero-dots {
    margin-top: 18px;
  }

  .hero-dots span {
    width: 20px;
  }

  .hero-dots span.active {
    width: 30px;
  }

  .primary-action,
  .secondary-action {
    min-height: 42px;
    padding: 0 15px;
    font-size: 0.92rem;
  }

  .catalog {
    margin-top: -70px;
  }

  .maturity-ribbon {
    display: none;
  }

  .row {
    margin-bottom: 34px;
  }

  .row-header {
    padding: 0 18px 9px;
  }

  .row-title {
    font-size: 1.08rem;
  }

  .row-kicker,
  .rail-button {
    display: none;
  }

  .rail {
    gap: 7px;
    padding: 0 18px 18px;
    scroll-padding: 18px;
  }

  .title-card {
    flex-basis: 236px;
  }

  .title-card:hover,
  .title-card:focus-within {
    transform: scale(1.02);
  }

  .card-copy h3 {
    font-size: 0.94rem;
  }

  .card-actions {
    display: none;
  }

  .top-ten .title-card {
    flex-basis: 286px;
  }

  .rank {
    font-size: 7rem;
  }

  .modal {
    padding: 0;
    align-items: stretch;
  }

  .modal-panel {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-image,
  .modal-image::after {
    min-height: 280px;
  }

  .modal-content {
    margin-top: -72px;
    padding: 0 22px 28px;
  }

  .modal-content h2 {
    font-size: 2.08rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
