:root {
  color-scheme: dark;
  --bg: #090b10;
  --bg-deep: #030407;
  --surface: #131720;
  --surface-soft: #1b2230;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f6f7fb;
  --muted: #a8afbd;
  --brand: #e50914;
  --brand-2: #b20710;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(55, 196, 166, 0.12), transparent 28rem),
    linear-gradient(180deg, #0b0d12 0%, var(--bg) 28rem, var(--bg-deep) 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.site-main {
  min-height: 70vh;
}

.app-navbar {
  min-height: 74px;
  padding-block: 0.85rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
  transition: background-color 180ms ease, backdrop-filter 180ms ease, border-color 180ms ease;
  border-bottom: 1px solid transparent;
}

.app-navbar.navbar-solid,
.app-navbar:focus-within {
  background: rgba(3, 4, 7, 0.94);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}

.brand-mark {
  color: var(--brand);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-right: 1.7rem;
}

.brand-mark:hover,
.brand-mark:focus {
  color: #ffffff;
}

.navbar-nav {
  gap: 0.3rem;
}

.navbar-dark .navbar-nav .nav-link {
  color: #d5d5d5;
  font-size: 0.93rem;
  font-weight: 500;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: #fff;
}

.search-form .form-control {
  width: 0;
  min-width: 0;
  padding-inline: 0;
  opacity: 0;
  background: rgba(9, 11, 16, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  border-radius: 4px;
  transition: width 180ms ease, opacity 180ms ease, padding 180ms ease;
}

.search-form:focus-within .form-control,
.search-form:hover .form-control {
  width: min(34vw, 260px);
  padding-inline: 0.75rem;
  opacity: 1;
}

.search-form .form-control::placeholder {
  color: #8d95a3;
}

.nav-icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  border: 0;
  background: transparent;
  border-radius: 3px;
  font-size: 1.18rem;
}

.nav-icon-button:hover,
.nav-icon-button:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-notification {
  margin-left: 0.7rem;
}

.nav-profile {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: 1rem;
  border-radius: 4px;
  color: #07100d;
  background: linear-gradient(135deg, var(--brand), #ff5a5f);
  font-size: 0.72rem;
  font-weight: 900;
}

.nav-caret {
  margin-left: 0.45rem;
  color: #fff;
  font-size: 0.8rem;
}

.hero {
  position: relative;
  min-height: clamp(560px, 76vh, 700px);
  display: flex;
  align-items: center;
  padding: 5.8rem clamp(1.25rem, 3vw, 2.25rem) 5.5rem;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(3, 4, 7, 0.86) 0%, rgba(3, 4, 7, 0.58) 36%, rgba(3, 4, 7, 0.08) 72%),
    linear-gradient(0deg, var(--bg) 0%, rgba(9, 11, 16, 0) 24%),
    var(--hero-image, linear-gradient(135deg, #202838, #0e332d));
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 14rem;
  z-index: -1;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-content {
  width: min(560px, 100%);
  transform: translateY(1.5rem);
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.hero h1,
.page-top h1,
.detail-hero h1,
.video-detail-panel h1 {
  margin: 0.35rem 0 1rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(2rem, 3.25vw, 3.8rem);
  text-shadow: 0 12px 45px rgba(0, 0, 0, 0.75);
}

.hero p {
  max-width: 540px;
  color: #e4e8f0;
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  line-height: 1.5;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.65);
}

.hero-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  color: #d5dbe6;
  font-size: 0.95rem;
}

.hero-meta {
  margin: 0.75rem 0 1rem;
}

.hero-meta span,
.meta-line span,
.meta-line a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-hero-primary,
.btn-hero-secondary {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.72rem 1.35rem;
  border-radius: 3px;
  border: 0;
  font-weight: 800;
}

.btn-hero-primary {
  background: #fff;
  color: #090b10;
}

.btn-hero-primary .bi,
.btn-hero-secondary .bi {
  font-size: 1.25rem;
}

.btn-hero-primary:hover {
  background: #dfe3eb;
  color: #090b10;
}

.btn-hero-secondary {
  color: #fff;
  background: rgba(109, 118, 132, 0.72);
}

.btn-hero-secondary:hover {
  color: #fff;
  background: rgba(109, 118, 132, 0.45);
}

.content-shell {
  width: 100%;
  padding-inline: clamp(1rem, 3.6vw, 3.5rem);
}

.home-rails {
  position: relative;
  z-index: 2;
  margin-top: -2.7rem;
}

.page-top {
  padding-top: 8.5rem;
}

.catalog-page {
  padding-bottom: 2rem;
}

.catalog-page h1 {
  font-size: clamp(2.1rem, 5vw, 4.6rem);
}

.catalog-page .lead,
.detail-hero p,
.video-detail-panel .lead,
.description {
  max-width: 860px;
  color: #c6ccd7;
}

.content-section {
  margin-top: 2rem;
}

.rail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 800;
}

.rail-heading a {
  color: var(--brand);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.rail-heading a:hover,
.rail-heading a:focus {
  color: #ff4b55;
}

.video-row,
.simple-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 22vw);
  gap: 0.72rem;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0 0 1.4rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.simple-row {
  grid-auto-columns: minmax(250px, 19vw);
}

.video-row::-webkit-scrollbar,
.simple-row::-webkit-scrollbar {
  display: none;
}

.video-card {
  min-width: 0;
  scroll-snap-align: start;
}

.video-card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.video-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease, filter 260ms ease;
}

.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 34%);
  opacity: 0.24;
  transition: opacity 260ms ease;
}

.video-card:hover {
  position: relative;
  z-index: 5;
}

.video-card:hover .video-thumb img {
  transform: scale(1.08);
  filter: brightness(1.08);
}

.video-card:hover .video-thumb::after {
  opacity: 0.48;
}

.play-chip {
  position: absolute;
  left: 0.75rem;
  bottom: 0.7rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #050608;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}

.video-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.duration-chip {
  position: absolute;
  top: auto;
  left: auto;
  right: 0.42rem;
  bottom: 0.42rem;
  width: auto;
  height: auto;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.36rem;
  border-radius: 3px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
}

.video-thumb-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 2rem;
  color: var(--brand);
  background: linear-gradient(135deg, #151b26, #112c27);
}

.video-card-body {
  padding: 0.65rem 0.1rem 0;
}

.video-card h3 {
  margin: 0;
  color: #f6f7fb;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.24;
}

.video-card p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 1.35rem 0.85rem;
  align-items: start;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.collection-tile {
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.25rem;
  overflow: hidden;
  padding: 1rem;
  border-radius: 4px;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(229, 9, 20, 0.34), transparent 45%),
    linear-gradient(145deg, #1c2330, #0d2924);
  border: 1px solid var(--line);
  transition: transform 220ms ease, border-color 220ms ease;
}

.collection-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
}

.collection-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 4, 7, 0.9), rgba(3, 4, 7, 0.18));
}

.collection-tile span,
.collection-tile strong {
  position: relative;
  z-index: 1;
}

.collection-tile span {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.collection-tile strong {
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.12;
}

.collection-tile:hover {
  color: inherit;
  transform: scale(1.04);
  border-color: rgba(229, 9, 20, 0.62);
}

.collection-tile-large {
  min-height: 210px;
}

.category-tile {
  background:
    linear-gradient(135deg, rgba(55, 196, 166, 0.28), transparent 50%),
    linear-gradient(145deg, #171b26, #241920);
}

.watch-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #000;
}

.watch-page .app-navbar {
  display: none;
}

.watch-topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 1.3rem;
  padding: 1.2rem clamp(1.25rem, 3vw, 2.4rem);
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
  z-index: 2;
}

.watch-topbar h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
}

.watch-close {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  text-decoration: none;
  font-size: 1.55rem;
  border-radius: 50%;
}

.watch-close:hover,
.watch-close:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.watch-shell {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(0rem, 2vw, 2.4rem) 1.8rem;
}

.player-wrap {
  width: min(100%, calc((100vh - 120px) * 16 / 9));
  max-width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.player-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.detail-content {
  padding-top: 1.75rem;
}

.video-detail-panel {
  max-width: 980px;
  padding: 1.25rem 0 0.6rem;
}

.video-detail-panel h1 {
  font-size: clamp(2rem, 4.2vw, 4rem);
}

.meta-line {
  margin-bottom: 1rem;
}

.meta-line a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-list a,
.tag-list span {
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  text-decoration: none;
  color: #dce3ee;
  font-size: 0.9rem;
}

.detail-hero {
  min-height: 470px;
  display: flex;
  align-items: flex-end;
  padding: 8rem clamp(1rem, 3.6vw, 3.5rem) 3.5rem;
  background:
    linear-gradient(90deg, rgba(3, 4, 7, 0.95), rgba(3, 4, 7, 0.48)),
    linear-gradient(0deg, var(--bg), rgba(9, 11, 16, 0.1) 45%),
    var(--hero-image, linear-gradient(135deg, #1d2735, #12362f));
  background-size: cover;
  background-position: center;
}

.detail-hero-content {
  width: min(820px, 100%);
}

.detail-hero h1 {
  font-size: clamp(2.2rem, 5vw, 5rem);
}

.empty-row {
  color: var(--muted);
  margin: 0;
}

.app-footer {
  margin-top: 4rem;
  padding: 2.5rem clamp(1rem, 4vw, 3.5rem) 3rem;
  color: #8f97a5;
  background: #030407;
}

.footer-inner {
  width: min(920px, 100%);
  margin: 0 auto;
}

.footer-social {
  display: flex;
  gap: 1.1rem;
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 2rem;
  font-size: 0.9rem;
}

.footer-copy {
  margin: 1.4rem 0 0;
  font-size: 0.82rem;
}

@media (max-width: 991.98px) {
  .app-navbar {
    background: rgba(3, 4, 7, 0.96);
  }

  .navbar-collapse {
    padding: 1rem 0 0.5rem;
  }

  .search-form {
    margin-top: 0.75rem;
  }

  .search-form .form-control {
    width: 100%;
  }

  .hero {
    min-height: 590px;
    padding-top: 6rem;
    padding-bottom: 5rem;
  }

  .home-rails {
    margin-top: -2rem;
  }

  .video-row,
  .simple-row {
    grid-auto-columns: minmax(270px, 72vw);
  }
}

@media (max-width: 575.98px) {
  .brand-mark {
    font-size: 1.12rem;
  }

  .brand-symbol {
    width: 28px;
    height: 28px;
  }

  .hero {
    min-height: 560px;
    padding-inline: 1rem;
    padding-bottom: 4.5rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .page-top {
    padding-top: 7rem;
  }

  .poster-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
