:root {
  --bg: #060a12;
  --bg-elevated: #0d1323;
  --surface: rgba(15, 22, 39, 0.88);
  --surface-strong: #16203a;
  --surface-soft: rgba(255, 255, 255, 0.06);
  --surface-glass: rgba(10, 18, 32, 0.62);
  --glass-core: rgba(12, 20, 38, 0.62);
  --glass-elevated: rgba(15, 24, 46, 0.76);
  --glass-highlight: rgba(255, 255, 255, 0.2);
  --text: #ffffff;
  --text-muted: #c7cde0;
  --text-soft: #97a3c4;
  --line: rgba(183, 205, 255, 0.16);
  --line-strong: rgba(183, 205, 255, 0.28);
  --accent: #3f6bff;
  --accent-strong: #24c2ff;
  --accent-soft: rgba(36, 194, 255, 0.22);
  --shadow: 0 22px 68px rgba(2, 8, 24, 0.52);
  --shadow-soft: 0 16px 42px rgba(2, 8, 24, 0.42);
  --radius: 28px;
  --radius-sm: 18px;
  --shell: 1320px;
  --shell-gutter: clamp(28px, 4vw, 64px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  padding-top: 92px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at 14% -8%, rgba(36, 194, 255, 0.24), transparent 36%),
    radial-gradient(circle at 84% 0%, rgba(63, 107, 255, 0.22), transparent 34%),
    radial-gradient(circle at 50% 106%, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #05070d 0%, #070d18 32%, #101a2c 100%);
}

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

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(calc(100% - var(--shell-gutter)), var(--shell));
  margin: 0 auto;
}

.page-chrome {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  isolation: isolate;
}

.page-chrome::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 9, 16, 0.18), rgba(6, 9, 16, 0.86)),
    radial-gradient(circle at 22% 0%, rgba(36, 194, 255, 0.18), transparent 32%),
    radial-gradient(circle at 82% 0%, rgba(63, 107, 255, 0.14), transparent 34%);
  z-index: -1;
}

.skip-link {
  position: absolute;
  left: 18px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  color: #0b0b0f;
}

.skip-link:focus {
  top: 20px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(183, 205, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(12, 21, 42, 0.84), rgba(12, 18, 33, 0.78)),
    rgba(8, 12, 22, 0.76);
  backdrop-filter: blur(30px) saturate(150%);
  box-shadow: 0 14px 38px rgba(3, 8, 24, 0.34);
}

.site-header__inner,
.main-nav,
.hero__actions,
.hero__featured-meta,
.detail__badges,
.detail__actions,
.page-header__meta,
.search-form,
.pagination,
.section-heading,
.tag-list,
.media-card__meta,
.hero-spotlight__actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.site-header__inner {
  min-height: 92px;
  justify-content: space-between;
  gap: 24px;
}

.site-header__menu {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(183, 205, 255, 0.26);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
    rgba(10, 18, 33, 0.66);
  cursor: pointer;
  transition: border-color 220ms ease, background 220ms ease;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: #dbe6ff;
  transition: transform 220ms ease, opacity 220ms ease;
}

.site-header.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  flex: 0 0 auto;
  width: clamp(46px, 4.6vw, 56px);
}

.brand__mark img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(8, 12, 24, 0.28));
}

.eyebrow,
.hero__featured-label,
.media-card__overlay-label {
  margin: 0;
  color: #c6c9d5;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand__name {
  display: inline-flex;
  align-items: baseline;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  font-size: clamp(1.7rem, 2.4vw, 2.7rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
  font-weight: 900;
  text-rendering: geometricPrecision;
}

.brand__name-cine {
  color: #ffc72a;
}

.brand__name-filando {
  color: #f4f7ff;
}

.main-nav {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.main-nav a,
.site-footer a {
  position: relative;
  color: var(--text-muted);
  font-size: 0.96rem;
  font-weight: 600;
  transition: color 220ms ease;
}

.main-nav a::after,
.site-footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-strong) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--text);
}

.main-nav a:hover::after,
.site-footer a:hover::after {
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 460px;
  margin-left: auto;
}

.header-search__field {
  flex: 1;
}

.header-search__field input,
.search-form__field input {
  width: 100%;
  border: 1px solid rgba(183, 205, 255, 0.2);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(8, 14, 28, 0.62);
  color: var(--text);
  backdrop-filter: blur(18px) saturate(140%);
  outline: none;
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.header-search__field input {
  padding: 13px 18px;
  border-radius: 999px;
}

.header-search__field input::placeholder,
.search-form__field input::placeholder {
  color: #8a8e9f;
}

.header-search__field input:focus,
.search-form__field input:focus {
  border-color: rgba(36, 194, 255, 0.52);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(11, 19, 36, 0.72);
  box-shadow: 0 0 0 4px rgba(36, 194, 255, 0.14);
}

.header-search__button {
  border: 0;
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 14px 30px rgba(36, 194, 255, 0.26);
  cursor: pointer;
}

.hero,
.page-header,
.content-section,
.detail {
  padding: 28px 0;
}

#conteudo {
  flex: 1 0 auto;
  width: 100%;
  min-width: 0;
}

.hero__grid,
.page-header,
.detail__hero,
.detail__content {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    var(--glass-core);
  box-shadow: var(--shadow);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 34%);
  gap: 32px;
  min-height: 620px;
  padding: 40px;
  background-color: rgba(10, 17, 32, 0.72);
  backdrop-filter: blur(14px) saturate(130%);
}

.hero__grid::before,
.detail__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-backdrop-image, none);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  opacity: 0.48;
}

.detail__hero::before {
  background-image: var(--detail-backdrop-image, none);
}

.hero__grid::after,
.detail__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 11, 20, 0.9) 0%, rgba(7, 11, 20, 0.78) 42%, rgba(7, 11, 20, 0.42) 78%, rgba(7, 11, 20, 0.88) 100%),
    linear-gradient(180deg, rgba(7, 11, 20, 0.22) 0%, rgba(7, 11, 20, 0.3) 56%, rgba(7, 11, 20, 0.92) 100%);
}

.hero__copy,
.hero__panel,
.detail__poster-frame,
.detail__copy,
.detail__section,
.season-card {
  position: relative;
  z-index: 1;
}

.hero__copy {
  align-self: end;
  max-width: 740px;
}

.hero__copy h1,
.page-header h1,
.detail__copy h1 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.hero__copy h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 7vw, 5.8rem);
}

.page-header h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
}

.detail__copy h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  max-width: 11ch;
}

.hero__lead,
.page-header__lead,
.detail__overview,
.hero__featured-summary,
.hero-spotlight p,
.site-footer p,
.detail__section p,
.episode-list {
  color: var(--text-muted);
}

.hero__lead {
  max-width: 62ch;
  margin: 22px 0 0;
  font-size: 1.04rem;
}

.hero__featured {
  margin-top: 28px;
}

.hero__featured h2,
.hero-spotlight h2,
.section-heading h2,
.detail__section h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -0.03em;
}

.hero__featured-meta,
.detail__badges,
.tag-list,
.page-header__meta {
  flex-wrap: wrap;
}

.pill,
.badge,
.tag,
.media-card__floating-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(183, 205, 255, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(12, 19, 35, 0.46);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  backdrop-filter: blur(18px) saturate(145%);
}

.pill--accent,
.badge--accent {
  background: linear-gradient(135deg, rgba(63, 107, 255, 0.38) 0%, rgba(36, 194, 255, 0.3) 100%);
  border-color: rgba(36, 194, 255, 0.4);
}

.tag {
  color: #d8dbeb;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.tag:hover {
  transform: translateY(-1px);
  border-color: rgba(36, 194, 255, 0.42);
  background: rgba(36, 194, 255, 0.22);
}

.button,
.section-heading > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(183, 205, 255, 0.24);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 700;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
    rgba(10, 18, 33, 0.52);
  backdrop-filter: blur(20px) saturate(140%);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.button:hover,
.section-heading > a:hover {
  transform: translateY(-2px);
  border-color: rgba(36, 194, 255, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04)),
    rgba(11, 20, 38, 0.64);
  box-shadow: var(--shadow-soft);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 38px rgba(36, 194, 255, 0.32);
}

.button--ghost {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(9, 16, 31, 0.54);
}

.button--small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.88rem;
}

.hero__actions {
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 16px;
  margin: 32px 0 0;
}

.hero__stats div,
.facts-grid div {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(183, 205, 255, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
    rgba(11, 19, 36, 0.52);
  backdrop-filter: blur(20px) saturate(140%);
}

.hero__stats dt,
.facts-grid dt {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__stats dd,
.facts-grid dd {
  margin: 8px 0 0;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero__panel {
  align-self: stretch;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(183, 205, 255, 0.2);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
    rgba(8, 16, 32, 0.66);
  backdrop-filter: blur(24px) saturate(155%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-spotlight + .hero-toplist {
  margin-top: 28px;
}

.hero-toplist__list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.hero-toplist__list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-toplist__rank {
  font-size: 1.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
}

.hero-toplist__list a {
  display: inline-block;
  font-weight: 700;
}

.hero-toplist__list span:last-child {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.breadcrumbs li:not(:last-child)::after {
  content: "•";
  color: rgba(255, 255, 255, 0.24);
}

.breadcrumbs a,
.breadcrumbs span {
  color: #b7bbca;
  font-size: 0.88rem;
  font-weight: 600;
}

.page-header {
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(63, 107, 255, 0.22), rgba(36, 194, 255, 0.12)),
    rgba(11, 19, 36, 0.74);
  backdrop-filter: blur(24px) saturate(145%);
  margin-top: 15px;
}

.page-header__lead {
  max-width: 68ch;
  margin-top: 18px;
}

.page-header--movies {
  display: grid;
  gap: 20px;
}

.movie-categories {
  display: grid;
  gap: 12px;
}

.movie-categories h2 {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  letter-spacing: -0.02em;
}

.movie-category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.movie-category-tabs::-webkit-scrollbar {
  height: 6px;
}

.movie-category-tabs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.movie-category-tabs__chip {
  flex: 0 0 auto;
  border: 1px solid rgba(183, 205, 255, 0.22);
  border-radius: 999px;
  padding: 9px 14px;
  color: #d5dbef;
  font-size: 0.84rem;
  font-weight: 700;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(10, 18, 33, 0.52);
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, color 220ms ease;
}

.movie-category-tabs__chip:hover {
  /* transform: translateY(-1px); */
  border-color: rgba(36, 194, 255, 0.38);
}

.movie-category-tabs__chip.is-active {
  color: #fff;
  border-color: rgba(36, 194, 255, 0.48);
  background: linear-gradient(135deg, rgba(63, 107, 255, 0.46) 0%, rgba(36, 194, 255, 0.35) 100%);
  box-shadow: 0 12px 28px rgba(36, 194, 255, 0.26);
}

.page-header__meta--movies {
  margin-top: 0;
  justify-content: flex-start;
}

.search-form {
  flex-wrap: wrap;
  margin-top: 24px;
}

.search-form__field {
  display: grid;
  gap: 8px;
  min-width: min(100%, 360px);
  flex: 1;
}

.search-form__field span {
  color: #c2c6d6;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.search-form__field input {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
}

.page-header__meta {
  justify-content: space-between;
  margin-top: 24px;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 18px;
}

.section-heading h2 {
  font-size: clamp(1.5rem, 2vw, 2.1rem);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.listing-page-movie #catalog-grid.media-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-page .content-section .media-grid,
.detail-page .content-section .media-grid {
  display: grid;
  /* grid-auto-flow: column; */
  grid-auto-columns: minmax(220px, 17vw);
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.home-page .content-section .media-grid > *,
.detail-page .content-section .media-grid > * {
  scroll-snap-align: start;
}

.media-grid::-webkit-scrollbar {
  height: 8px;
}

.media-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.media-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
    rgba(10, 18, 34, 0.62);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px) saturate(145%);
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.media-card:hover {
  transform: translateY(-6px);
  border-color: rgba(36, 194, 255, 0.34);
  box-shadow: 0 22px 48px rgba(3, 10, 26, 0.46);
}

.media-card--loading-in {
  opacity: 0;
  transform: translateY(12px);
  animation: cardFadeIn 320ms ease forwards;
}

.media-card__link {
  display: grid;
  /* height: 100%; */
}

.media-card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(63, 107, 255, 0.2), rgba(36, 194, 255, 0.16));
}

.media-card__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 8, 12, 0.06), rgba(7, 8, 12, 0.72)),
    linear-gradient(90deg, rgba(7, 8, 12, 0), rgba(7, 8, 12, 0.08));
  opacity: 0.9;
}

.media-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.media-card:hover .media-card__poster img {
  transform: scale(1.08);
}

.media-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
}

.media-card__overlay-copy {
  display: grid;
  gap: 6px;
  padding-top: 60px;
  transform: translateY(12px);
  opacity: 0.86;
  transition: transform 240ms ease, opacity 240ms ease;
}

.media-card__overlay-copy strong {
  font-size: 1.04rem;
  line-height: 1.15;
}

.media-card:hover .media-card__overlay-copy {
  transform: translateY(0);
  opacity: 1;
}

.media-card__rank {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  border: 1px solid rgba(183, 205, 255, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04)),
    rgba(11, 19, 35, 0.5);
  backdrop-filter: blur(18px) saturate(145%);
}

.media-card__floating-rating {
  align-self: flex-end;
}

.media-card__placeholder {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
}

.media-card__body {
  display: grid;
  gap: 10px;
  padding: 16px 16px 18px;
}

.media-card__meta {
  flex-wrap: wrap;
  gap: 8px 10px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.media-card__meta a {
  color: #d6d8e4;
}

.media-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
}

.media-card__rating,
.media-card__summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.media-card__summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.category-chip {
  position: relative;
  display: grid;
  gap: 6px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(183, 205, 255, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(140deg, rgba(63, 107, 255, 0.24), rgba(36, 194, 255, 0.12)),
    rgba(11, 19, 36, 0.74);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px) saturate(145%);
  transition: transform 240ms ease, border-color 240ms ease;
}

.category-chip:hover {
  transform: translateY(-4px);
  border-color: rgba(36, 194, 255, 0.42);
}

.category-chip__glow {
  position: absolute;
  inset: auto auto -20px -20px;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(36, 194, 255, 0.4), transparent 70%);
  filter: blur(12px);
  opacity: 0.65;
}

.category-chip strong,
.category-chip span {
  position: relative;
  z-index: 1;
}

.category-chip strong {
  font-size: 1rem;
}

.category-chip span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.movie-detail,
.movie-trailer {
  padding-top: 18px;
}

.movie-hero-card,
.movie-trailer__hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(183, 205, 255, 0.24);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    rgba(9, 15, 30, 0.78);
  box-shadow: var(--shadow);
}

.movie-hero-card::before,
.movie-trailer__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--movie-hero-desktop-image, var(--movie-hero-image, none));
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  opacity: 0.4;
}

.movie-hero-card::after,
.movie-trailer__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(5, 9, 17, 0.95) 0%, rgba(5, 9, 17, 0.8) 42%, rgba(5, 9, 17, 0.88) 100%),
    linear-gradient(180deg, rgba(5, 9, 17, 0.24) 0%, rgba(5, 9, 17, 0.92) 100%);
}

.movie-hero-card__content,
.movie-trailer__copy,
.movie-hero-card__rating {
  position: relative;
  z-index: 1;
}

.movie-hero-card {
  padding: clamp(22px, 3vw, 38px);
  min-height: 440px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.movie-hero-card.has-poster {
  grid-template-columns: minmax(0, 1fr) clamp(250px, 28vw, 370px);
  align-items: stretch;
  min-height: 520px;
}

.movie-hero-card__poster-wrap {
  display: none;
  position: relative;
  z-index: 1;
}

.movie-hero-card.has-poster .movie-hero-card__poster-wrap {
  display: block;
  align-self: stretch;
  justify-self: end;
  width: 100%;
}

.movie-hero-card__poster-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(183, 205, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(8, 14, 27, 0.68);
  box-shadow:
    0 22px 44px rgba(2, 8, 24, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transform: translateY(0);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.movie-hero-card__poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.movie-hero-card__poster-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(183, 205, 255, 0.22);
  background: rgba(5, 10, 18, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
}

.movie-hero-card__poster-rating .movie-stars {
  gap: 2px;
}

.movie-hero-card__poster-rating .movie-stars__star {
  font-size: 0.72rem;
}

.movie-hero-card__poster-rating strong {
  font-size: 0.78rem;
  color: #e9edf9;
}

.movie-hero-card__content {
  align-self: start;
  max-width: 760px;
  margin-top: 0;
  display: grid;
  align-content: start;
  gap: 14px;
}

.movie-hero-card h1,
.movie-trailer__copy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.movie-hero-card__description,
.movie-trailer__copy p {
  margin: 18px 0 0;
  color: var(--text-muted);
  max-width: 70ch;
  line-height: 1.6;
}

.movie-hero-card__actions,
.movie-trailer__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 0;
}

.movie-hero-card .tag-list {
  margin-top: 0;
}

.movie-hero-card__rating {
  justify-self: end;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(183, 205, 255, 0.26);
  background: rgba(7, 12, 24, 0.58);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.movie-hero-card__rating strong {
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.movie-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.movie-stars__star {
  color: #80899f;
  font-size: 0.9rem;
}

.movie-stars__star.is-filled {
  color: #ffd050;
}

.movie-detail__section,
.movie-trailer__section {
  margin-top: 20px;
  padding: clamp(20px, 2.5vw, 28px);
  border-radius: var(--radius);
  border: 1px solid rgba(183, 205, 255, 0.2);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03)),
    rgba(11, 18, 34, 0.74);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px) saturate(140%);
}

.movie-detail__section h2,
.movie-trailer__section h2 {
  margin: 0;
  font-size: clamp(1.32rem, 2vw, 1.84rem);
  letter-spacing: -0.03em;
}

.movie-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.movie-facts-grid__item {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(183, 205, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(8, 14, 27, 0.65);
}

.movie-facts-grid__item h3 {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.movie-facts-grid__item p {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.movie-facts-grid__item--wide {
  grid-column: 1 / -1;
}

.detail-page .content-section .media-grid.media-grid--related {
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: unset;
  overflow: visible;
  padding-bottom: 0;
  scroll-snap-type: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-card__rating-stars {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.media-card__rating-stars strong {
  margin-left: 5px;
  font-size: 0.82rem;
  color: #e5e9f8;
}

.movie-trailer__hero {
  padding: clamp(22px, 3vw, 36px);
}

.movie-trailer__copy {
  max-width: 860px;
}

.movie-trailer__player {
  margin-top: 16px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(183, 205, 255, 0.22);
  box-shadow: 0 26px 54px rgba(2, 8, 24, 0.52);
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-trailer__player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.movie-trailer__empty {
  margin-top: 16px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(183, 205, 255, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(8, 14, 27, 0.65);
}

.movie-trailer__empty h3 {
  margin: 0;
  font-size: 1.15rem;
}

.movie-trailer__empty p {
  margin: 12px 0 18px;
  color: var(--text-muted);
}

.detail__hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  padding: 34px;
  min-height: 480px;
}

.detail__poster-frame {
  align-self: end;
}

.detail__poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}

.detail__poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail__copy {
  align-self: end;
  max-width: 820px;
}

.detail__overview {
  max-width: 64ch;
  margin-top: 18px;
}

.detail__actions {
  flex-wrap: wrap;
  margin-top: 24px;
}

.detail__content {
  margin-top: 22px;
  padding: 28px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(12, 20, 37, 0.76);
  backdrop-filter: blur(22px) saturate(140%);
}

.detail__section + .detail__section {
  margin-top: 28px;
}

.detail__section h2 {
  margin-bottom: 16px;
}

.facts-grid,
.season-list {
  display: grid;
  gap: 16px;
}

.facts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.season-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.season-card {
  padding: 22px;
  border: 1px solid rgba(183, 205, 255, 0.2);
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
    rgba(11, 19, 35, 0.6);
  backdrop-filter: blur(20px) saturate(140%);
}

.season-card h3 {
  margin: 0 0 10px;
}

.episode-list {
  margin: 16px 0 0;
  padding-left: 20px;
}

.pagination {
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

.pagination span {
  color: var(--text-muted);
  font-weight: 600;
}

.catalog-sentinel {
  width: 100%;
  height: 2px;
  margin-top: 10px;
}

.catalog-status {
  min-height: 1.25rem;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.catalog-noscript {
  margin: 18px 0 0;
  text-align: center;
}

.catalog-noscript a {
  color: #d8dbeb;
  text-decoration: underline;
}

.site-footer {
  padding: 28px 0 44px;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border: 1px solid rgba(183, 205, 255, 0.2);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(11, 19, 35, 0.72);
  backdrop-filter: blur(24px) saturate(145%);
}

.site-footer__title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .hero__grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__panel {
    max-width: 680px;
  }

  .media-grid,
  .category-grid,
  .season-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  body {
    padding-top: 108px;
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 86px;
    padding: 12px 0;
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
  }

  .site-header__menu {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    border: 1px solid rgba(183, 205, 255, 0.16);
    border-radius: 18px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03)),
      rgba(9, 16, 31, 0.62);
    backdrop-filter: blur(20px) saturate(135%);
    box-shadow: 0 18px 36px rgba(3, 8, 24, 0.36);
  }

  .site-header--js .site-header__menu {
    display: none;
  }

  .site-header--js.menu-open .site-header__menu {
    display: flex;
    animation: mobileMenuIn 230ms ease both;
  }

  .site-header--js .site-header__menu[hidden] {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: 0;
    justify-self: end;
    align-self: center;
  }

  .site-header.menu-open {
    border-bottom-color: rgba(183, 205, 255, 0.24);
    box-shadow: 0 20px 44px rgba(3, 8, 24, 0.4);
  }

  .header-search {
    width: min(100%, 560px);
    max-width: none;
    margin: 0 auto;
    gap: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .header-search__field {
    min-width: 0;
  }

  .header-search__button {
    min-width: 120px;
  }

  .main-nav {
    width: min(100%, 560px);
    margin: 2px auto 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
  }

  .main-nav a {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(183, 205, 255, 0.16);
    border-radius: 14px;
    background: rgba(10, 18, 33, 0.52);
    text-align: left;
    line-height: 1.2;
  }

  .detail__hero {
    grid-template-columns: minmax(132px, 34vw) minmax(0, 1fr);
    align-items: end;
    gap: 18px;
  }

  .detail__poster-frame {
    max-width: none;
  }

  .movie-hero-card,
  .movie-trailer__hero {
    min-height: auto;
  }

  .movie-hero-card.has-poster {
    grid-template-columns: 1fr;
    grid-template-areas:
      "poster"
      "content";
    gap: 14px;
  }

  .movie-hero-card::before {
    background-image: var(--movie-hero-mobile-image, none);
    background-position: center center;
    transform: scale(1.04);
    opacity: 0.5;
  }

  .movie-hero-card h1,
  .movie-trailer__copy h1 {
    font-size: clamp(2rem, 7vw, 3.1rem);
  }

  .movie-hero-card__rating {
    justify-self: start;
  }

  .movie-hero-card.has-poster .movie-hero-card__rating {
    display: none;
  }

  .movie-hero-card__poster-wrap {
    display: block;
    grid-area: poster;
    justify-self: center;
    margin-top: 0;
    width: 100%;
  }

  .movie-hero-card__content {
    grid-area: content;
    max-width: 100%;
  }

  .movie-hero-card__poster-card {
    width: min(78vw, 330px);
    aspect-ratio: 2 / 3;
    height: auto;
    min-height: auto;
    margin: 0 auto;
    border-radius: 18px;
    box-shadow:
      0 18px 40px rgba(2, 8, 24, 0.5),
      0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  }

  .movie-hero-card__poster-card img {
    width: 100%;
    height: 100%;
  }

  .movie-facts-grid {
    grid-template-columns: 1fr;
  }

  .detail-page .content-section .media-grid.media-grid--related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts-grid,
  .season-list,
  .media-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .listing-page-movie #catalog-grid.media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .home-page .content-section .media-grid,
  .detail-page .content-section .media-grid {
    grid-auto-columns: minmax(210px, 42vw);
  }
}

@media (max-width: 640px) {
  body {
    padding-top: 102px;
  }

  .site-header__inner,
  .site-footer__inner,
  .section-heading,
  .page-header__meta,
  .pagination,
  .search-form {
    align-items: flex-start;
  }

  .section-heading,
  .page-header__meta,
  .pagination,
  .hero__actions {
    flex-direction: column;
  }

  .hero__grid,
  .page-header,
  .detail__hero,
  .detail__content,
  .movie-hero-card,
  .movie-trailer__hero,
  .movie-detail__section,
  .movie-trailer__section {
    padding: 18px;
    border-radius: 20px;
  }

  .brand__name {
    font-size: clamp(1.3rem, 6vw, 1.95rem);
  }

  .header-search {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .header-search__field input {
    padding: 11px 14px;
  }

  .hero__copy h1 {
    font-size: 2.15rem;
  }

  .page-header h1,
  .detail__copy h1 {
    font-size: 1.92rem;
    max-width: 100%;
  }

  .hero__stats,
  .facts-grid,
  .season-list,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .detail__hero {
    grid-template-columns: minmax(118px, 42vw) minmax(0, 1fr);
    gap: 14px;
    align-items: end;
  }

  .detail__poster {
    border-radius: 16px;
  }

  .detail__overview {
    margin-top: 12px;
    font-size: 0.96rem;
  }

  .detail__badges {
    gap: 8px;
  }

  .movie-hero-card__actions,
  .movie-trailer__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-hero-card__rating {
    padding: 8px 12px;
    border-radius: 14px;
  }

  .movie-hero-card__poster-card {
    width: min(84vw, 360px);
  }

  .movie-hero-card__poster-rating {
    top: 8px;
    right: 8px;
    padding: 7px 9px;
    border-radius: 11px;
    gap: 6px;
  }

  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .home-page .content-section .media-grid,
  .detail-page .content-section .media-grid {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .listing-page-movie #catalog-grid.media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .detail-page .content-section .media-grid.media-grid--related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-grid::-webkit-scrollbar {
    display: none;
  }

  .media-card {
    border-radius: 14px;
  }

  .media-card__overlay {
    padding: 6px;
  }

  .media-card__rank,
  .media-card__overlay-label,
  .media-card__body {
    display: none;
  }

  .media-card__floating-rating {
    padding: 5px 7px;
    font-size: 0.66rem;
    gap: 4px;
  }

  .media-card__overlay-copy {
    margin-top: auto;
    padding: 6px 7px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(6, 10, 18, 0.18), rgba(6, 10, 18, 0.82));
    transform: none;
    opacity: 1;
  }

  .media-card__overlay-copy strong {
    font-size: 0.72rem;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .button,
  .section-heading > a,
  .header-search__button {
    width: 100%;
  }

  .header-search__field,
  .search-form__field {
    min-width: 100%;
  }

  .site-footer__inner {
    flex-direction: column;
  }
}

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mobileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
