:root {
  --bg: #090b10;
  --bg-2: #111827;
  --card: rgba(31, 41, 55, 0.54);
  --card-strong: rgba(31, 41, 55, 0.82);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #e5e7eb;
  --accent-dark: #111827;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(55, 65, 81, 0.35), transparent 36rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(9, 11, 16, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.logo-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #f8fafc, #9ca3af);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 0 38px rgba(229, 231, 235, 0.22);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.logo-text small {
  color: var(--muted-2);
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(31, 41, 55, 0.88);
  color: #fff;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.68);
  color: #fff;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 16px 18px;
  background: rgba(9, 11, 16, 0.94);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.55);
  color: #d1d5db;
}

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) brightness(0.58);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 11, 16, 0.96) 0%, rgba(9, 11, 16, 0.76) 42%, rgba(9, 11, 16, 0.38) 100%),
    linear-gradient(0deg, #090b10 0%, rgba(9, 11, 16, 0.25) 52%, rgba(9, 11, 16, 0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 650px;
  flex-direction: column;
  justify-content: center;
  padding-top: 72px;
  padding-bottom: 140px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.05;
  font-weight: 300;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 720px;
  margin: 24px 0 0;
  color: #d1d5db;
  font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
  border: 1px solid rgba(229, 231, 235, 0.14);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.58);
  color: #d1d5db;
  padding: 6px 11px;
  font-size: 12px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 700;
  transition: 0.25s ease;
}

.primary-button {
  background: #f8fafc;
  color: #0f172a;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(248, 250, 252, 0.16);
}

.primary-button.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

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

.ghost-button:hover {
  background: rgba(31, 41, 55, 0.9);
}

.hero-search {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.hero-search-box {
  display: flex;
  width: min(600px, 100%);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 0 16px;
}

.hero-search-box button {
  border: 0;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 800;
}

.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hero-category-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  z-index: 6;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 26px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #fff;
}

.section-block {
  padding: 68px 0;
}

.soft-section {
  background: rgba(17, 24, 39, 0.32);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 30px;
}

.inner-heading {
  margin-bottom: 22px;
}

.section-heading h2,
.related-panel h2,
.detail-article h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
  font-weight: 300;
}

.text-link {
  color: #cbd5e1;
  border-bottom: 1px solid rgba(203, 213, 225, 0.5);
}

.horizontal-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
  width: 270px;
  min-width: 270px;
  scroll-snap-align: start;
}

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

.catalog-grid {
  margin-top: 26px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(229, 231, 235, 0.34);
  background: var(--card-strong);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: brightness(0.9);
}

.year-badge,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  color: #111827;
  background: rgba(248, 250, 252, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  left: 12px;
  top: 12px;
  padding: 5px 9px;
}

.rank-badge {
  right: 12px;
  top: 12px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}

.movie-card-body {
  padding: 16px;
}

.movie-meta {
  margin: 0 0 7px;
  color: var(--muted-2);
  font-size: 12px;
}

.movie-card h3,
.horizontal-card h3 {
  margin: 0 0 9px;
  color: #fff;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 600;
}

.movie-line,
.horizontal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  margin-top: 14px;
}

.compact-card .movie-card-body {
  padding: 14px;
}

.compact-card h3 {
  font-size: 16px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 34px;
}

.vertical-list,
.ranking-list,
.related-list {
  display: grid;
  gap: 14px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: auto 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(31, 41, 55, 0.42);
  transition: 0.25s ease;
}

.horizontal-card:hover {
  background: rgba(31, 41, 55, 0.72);
}

.list-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: #e5e7eb;
  font-weight: 800;
}

.horizontal-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 13px;
  background: #111827;
}

.horizontal-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.4);
  padding: 24px;
  box-shadow: var(--shadow);
}

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

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

.category-tile,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(31, 41, 55, 0.74), rgba(15, 23, 42, 0.52));
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
}

.category-tile {
  min-height: 190px;
  padding: 28px;
  transition: 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(229, 231, 235, 0.34);
}

.category-tile span {
  display: block;
  margin-bottom: 14px;
  font-size: 26px;
  font-weight: 500;
}

.category-tile p,
.category-overview-body p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(31, 41, 55, 0.62), rgba(9, 11, 16, 0.92)),
    radial-gradient(circle at 80% 10%, rgba(229, 231, 235, 0.14), transparent 28rem);
}

.compact-page-hero {
  padding: 86px 0 62px;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

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

.category-overview-card {
  overflow: hidden;
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 210px;
  overflow: hidden;
  background: #111827;
}

.category-cover img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  filter: brightness(0.72);
}

.category-overview-body {
  padding: 26px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 400;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}

.mini-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: #cbd5e1;
  font-size: 12px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 220px;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.54);
}

.search-field,
.select-field {
  display: grid;
  gap: 7px;
}

.search-field span,
.select-field span {
  color: var(--muted-2);
  font-size: 12px;
}

.search-field input,
.select-field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: rgba(9, 11, 16, 0.68);
  color: #fff;
  padding: 0 12px;
}

.detail-hero {
  position: relative;
  padding: 70px 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 14%, rgba(229, 231, 235, 0.12), transparent 28rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.76), rgba(9, 11, 16, 0.96));
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted-2);
  font-size: 13px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-info h1 {
  font-size: clamp(36px, 5vw, 66px);
}

.detail-one-line {
  max-width: 830px;
  margin: 20px 0 0;
  color: #d1d5db;
  font-size: 18px;
}

.detail-tags {
  margin-top: 22px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.12);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
  cursor: pointer;
}

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-cover-button span {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.36);
  clip-path: polygon(35% 25%, 35% 75%, 76% 50%);
}

.player-shell.is-playing .player-cover-button {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.detail-article {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(31, 41, 55, 0.42);
  padding: 28px;
}

.detail-article h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #cbd5e1;
}

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

.detail-meta-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.42);
}

.detail-meta-grid span {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
}

.detail-meta-grid strong {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.related-panel {
  position: sticky;
  top: 98px;
}

.related-panel h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.related-list {
  grid-template-columns: 1fr;
}

.related-list .movie-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
}

.related-list .poster-link {
  aspect-ratio: 2 / 3;
}

.related-list .movie-card-body {
  padding: 12px;
}

.related-list .movie-line,
.related-list .tag-row {
  display: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 11, 0.96);
  padding: 52px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 500;
}

.footer-brand p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

.footer-col h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
}

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

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 13px;
}

[data-movie-card].hidden {
  display: none;
}

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

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

  .related-panel {
    position: static;
  }

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

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

  .mobile-menu-button {
    display: block;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    min-height: 560px;
    padding-bottom: 190px;
  }

  .hero-search {
    flex-direction: column;
    align-items: stretch;
    bottom: 38px;
  }

  .hero-category-links {
    justify-content: flex-start;
  }

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

  .detail-poster {
    max-width: 300px;
  }

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .logo-text strong {
    font-size: 18px;
  }

  .logo-text small {
    display: none;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-search-box {
    flex-direction: column;
    gap: 8px;
  }

  .hero-search-box input,
  .hero-search-box button {
    min-height: 44px;
  }

  .section-block {
    padding: 48px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .home-grid,
  .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .horizontal-scroll .movie-card {
    width: 230px;
    min-width: 230px;
  }

  .horizontal-card {
    grid-template-columns: auto 74px minmax(0, 1fr);
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .related-list .movie-card {
    display: block;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
