:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --gold: #f59e0b;
  --gold-2: #fbbf24;
  --danger: #ef4444;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand__mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #111827;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.3);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__text strong {
  font-size: 19px;
}

.brand__text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.04) contrast(1.04);
}

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.44) 46%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1220px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  max-width: 780px;
  margin: 24px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 690px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #111827;
  box-shadow: 0 15px 34px rgba(245, 158, 11, 0.24);
}

.button--ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--gold);
}

.section {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.section--overlap {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.section--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: start;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section__head h2,
.page-hero h1,
.detail-info h1,
.content-card h2 {
  margin: 10px 0 0;
  line-height: 1.1;
}

.section__head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section__head--compact {
  align-items: flex-start;
}

.section-link {
  color: var(--gold-2);
  font-weight: 800;
}

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

.movie-grid--featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow);
}

.movie-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.movie-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .movie-card__cover img {
  transform: scale(1.08);
}

.movie-card__year,
.movie-card__type {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.movie-card__year {
  left: 12px;
}

.movie-card__type {
  right: 12px;
}

.movie-card__body {
  padding: 16px;
}

.movie-card__title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card__title:hover {
  color: var(--gold-2);
}

.movie-card__body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 4px 8px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.09);
  color: #f8d186;
  font-size: 12px;
  font-weight: 700;
}

.tag-row--hero span {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.45);
}

.rank-panel,
.content-card,
.filter-panel,
.category-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.58);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(245, 158, 11, 0.12);
  transform: translateX(3px);
}

.rank-row b {
  color: var(--gold-2);
  font-size: 18px;
}

.rank-row img {
  width: 72px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-row span {
  min-width: 0;
}

.rank-row strong,
.rank-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row small {
  color: var(--muted);
  font-size: 12px;
}

.rank-row i {
  grid-column: 2 / 4;
  color: var(--muted-2);
  font-size: 12px;
  font-style: normal;
}

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

.category-tile {
  min-height: 185px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(245, 158, 11, 0.14), transparent),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
}

.category-tile strong,
.category-tile span,
.category-tile em {
  display: block;
}

.category-tile strong {
  font-size: 22px;
}

.category-tile span {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.category-tile em {
  display: grid;
  gap: 5px;
  color: #f8d186;
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  min-height: 310px;
  display: grid;
  place-items: center;
  padding: 80px 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.22), transparent 36rem),
    linear-gradient(135deg, #020617 0%, #111827 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero > div {
  width: min(1220px, 100%);
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(40px, 6vw, 70px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.page-hero--category {
  place-items: end start;
}

.category-list {
  display: grid;
  gap: 22px;
}

.category-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card__main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 210px;
  padding: 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(30, 41, 59, 0.4));
}

.category-card__main span {
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 900;
}

.category-card__main h2 {
  margin: 10px 0;
  font-size: 34px;
}

.category-card__main p {
  margin: 0;
  color: var(--muted);
}

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

.mini-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.5);
}

.mini-card img {
  width: 96px;
  height: 66px;
  border-radius: 14px;
  object-fit: cover;
}

.mini-card strong,
.mini-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card small {
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 26px;
  padding: 18px;
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.filter-selects select {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.58);
  color: #fff;
}

.search-box input {
  width: 100%;
  padding: 0 16px;
}

.filter-selects {
  display: flex;
  gap: 12px;
}

.filter-selects select {
  min-width: 135px;
  padding: 0 12px;
}

.empty-state {
  margin-bottom: 24px;
  padding: 28px;
  border: 1px dashed rgba(245, 158, 11, 0.36);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.42);
}

.ranking-item__cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

.ranking-item__cover img {
  width: 170px;
  height: 112px;
  object-fit: cover;
}

.ranking-item__cover b {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: #111827;
}

.ranking-item__body a {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.ranking-item__body p {
  margin: 9px 0 12px;
  color: var(--muted);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.meta-line span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.detail-hero__bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
}

.detail-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px) saturate(1.05);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.86) 48%, rgba(2, 6, 23, 0.56) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.22) 100%);
}

.detail-hero__inner {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 64px 0;
}

.poster-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4.25;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--gold-2);
}

.detail-info h1 {
  max-width: 900px;
  font-size: clamp(42px, 7vw, 78px);
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  margin: 20px 0;
  color: #dbeafe;
  font-size: 19px;
}

.meta-line--large {
  margin: 0 0 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.2), rgba(2, 6, 23, 0.12)),
    rgba(2, 6, 23, 0.32);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-button span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #111827;
  font-size: 36px;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.36);
}

.play-button strong {
  font-size: 18px;
}

.play-button.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.content-card {
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.content-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.info-list div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
}

.info-list dt {
  color: var(--muted-2);
}

.info-list dd {
  margin: 0;
  color: #fff;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.72);
  color: #fff;
  font-weight: 800;
}

.side-links a:hover {
  background: rgba(245, 158, 11, 0.16);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.9);
}

.site-footer__inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.footer-brand {
  color: #fff;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--gold-2);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid--featured,
  .movie-grid--catalog,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section--split,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav.is-open {
    display: grid;
  }

  .hero {
    min-height: 660px;
  }

  .hero-slide__content {
    justify-content: flex-end;
    padding-bottom: 86px;
  }

  .section,
  .site-header__inner,
  .mobile-nav,
  .site-footer__inner {
    width: min(100% - 24px, 1220px);
  }

  .movie-grid,
  .movie-grid--featured,
  .movie-grid--catalog,
  .category-grid,
  .category-card__sample {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card,
  .detail-hero__inner,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-hero__inner {
    gap: 26px;
  }

  .poster-card {
    max-width: 260px;
  }

  .filter-selects {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .brand__text small {
    display: none;
  }

  .hero h1,
  .detail-info h1,
  .page-hero h1 {
    letter-spacing: -0.04em;
  }

  .movie-grid,
  .movie-grid--featured,
  .movie-grid--catalog,
  .category-grid,
  .category-card__sample {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 1fr;
  }

  .ranking-item__cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .mini-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .mini-card img {
    width: 82px;
    height: 58px;
  }
}
