:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --rose-600: #e11d48;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-800);
  background: var(--slate-50);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-700), var(--slate-900));
  box-shadow: var(--soft-shadow);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--emerald-400), #a7f3d0);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}

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

.brand-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  font-size: 12px;
  color: #cbd5e1;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #e2e8f0;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--emerald-400);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  gap: 8px;
  flex-direction: column;
}

.hero-section {
  min-height: 82vh;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--slate-950);
}

.hero-background,
.hero-panel,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-panel {
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: opacity 0.9s ease, transform 5s ease;
}

.hero-panel.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-shade {
  background:
    radial-gradient(circle at 72% 20%, rgba(16, 185, 129, 0.3), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.86));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 82vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: 44px;
  padding: 72px 0;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--emerald-400);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-line {
  max-width: 720px;
  margin: 22px 0 0;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.75;
  color: #e2e8f0;
}

.hero-actions,
.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  margin-top: 32px;
}

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 14px 28px;
  color: var(--white);
  background: var(--emerald-600);
  box-shadow: 0 16px 35px rgba(5, 150, 105, 0.32);
}

.primary-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
  background: var(--emerald-700);
}

.ghost-btn {
  padding: 12px 26px;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.ghost-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

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

.hero-tags a,
.tag-chip,
.chip,
.detail-meta span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #064e3b;
  background: #d1fae5;
}

.hero-tags a {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.14);
}

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

.hero-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: var(--slate-800);
}

.hero-card:first-child {
  grid-row: span 2;
}

.hero-card img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-card span,
.hero-card strong {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.hero-card span {
  top: 18px;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(5, 150, 105, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.hero-card strong {
  bottom: 18px;
  font-size: 18px;
  color: var(--white);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.88));
}

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

.soft-bg {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, #eef2f7, #ffffff);
}

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

.section-heading h2,
.ranking-panel h2,
.story-card h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--slate-600);
  line-height: 1.75;
}

.section-link {
  padding: 11px 18px;
  color: var(--white);
  background: var(--slate-800);
  white-space: nowrap;
}

.section-link.full {
  width: 100%;
  margin-top: 20px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
}

.movie-card.compact .poster-wrap {
  aspect-ratio: 3 / 4;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  background: rgba(5, 150, 105, 0.92);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  gap: 7px;
}

.tag-row.wide {
  margin: 24px 0;
}

.tag-chip {
  color: var(--emerald-700);
  background: #ecfdf5;
}

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

.category-card,
.category-overview-card {
  min-height: 170px;
  border-radius: 26px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(52, 211, 153, 0.24), transparent 38%),
    linear-gradient(135deg, var(--slate-900), var(--slate-700));
  color: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card span,
.category-title-link span {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.7;
}

.category-title-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-title-link strong {
  white-space: nowrap;
  color: var(--emerald-400);
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.sample-links a {
  border-radius: 999px;
  padding: 7px 11px;
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

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

.ranking-panel {
  position: sticky;
  top: 100px;
  border-radius: 28px;
  padding: 26px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.ranking-panel ol,
.ranking-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.ranking-panel li,
.ranking-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.rank-num,
.rank-large {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: var(--white);
  background: var(--emerald-600);
  font-weight: 900;
}

.rank-large {
  width: 54px;
  height: 54px;
  font-size: 18px;
}

.ranking-row {
  min-width: 0;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.ranking-row img {
  width: 82px;
  height: 82px;
  object-fit: cover;
}

.ranking-row h3 {
  margin: 0 0 6px;
  color: var(--slate-900);
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-row p {
  margin: 0 0 8px;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.28), transparent 35%),
    linear-gradient(135deg, var(--slate-950), var(--slate-700));
}

.compact-hero {
  min-height: 320px;
  display: grid;
  align-items: center;
  padding: 72px max(16px, calc((100% - 1180px) / 2));
}

.compact-hero h1 {
  font-size: clamp(34px, 6vw, 64px);
}

.filter-bar {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
  border-radius: 24px;
  padding: 18px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.filter-bar label {
  font-weight: 900;
  color: var(--slate-900);
}

.filter-bar input {
  width: 100%;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px 16px;
  outline: none;
  font-size: 16px;
}

.filter-bar input:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.detail-shell {
  color: var(--white);
  background:
    radial-gradient(circle at 82% 15%, rgba(16, 185, 129, 0.25), transparent 28%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
  padding: 36px max(16px, calc((100% - 1180px) / 2)) 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 34px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--emerald-400);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  background: var(--slate-800);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  color: var(--white);
}

.detail-meta span {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  padding-bottom: 38px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  font: inherit;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--slate-950);
  background: var(--emerald-400);
  font-size: 34px;
  box-shadow: 0 16px 38px rgba(16, 185, 129, 0.45);
}

.player-start strong {
  font-size: 22px;
}

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

.story-card {
  border-radius: 28px;
  padding: 30px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.story-card p {
  margin: 18px 0 0;
  color: var(--slate-600);
  line-height: 1.95;
  font-size: 16px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  line-height: 1.75;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

.site-footer a:hover {
  color: var(--emerald-400);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  text-align: center;
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

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

  .hero-content,
  .detail-hero,
  .split-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

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

  .header-inner {
    min-height: 66px;
  }

  .brand-title {
    font-size: 18px;
  }

  .hero-content {
    min-height: auto;
    padding: 54px 0;
  }

  .hero-showcase {
    grid-template-columns: 1fr;
  }

  .hero-card:first-child {
    grid-row: auto;
  }

  .movie-grid,
  .movie-grid.dense,
  .catalog-grid,
  .category-grid,
  .category-overview-grid,
  .story-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .section-heading,
  .filter-bar {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .footer-grid {
    gap: 26px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.dense,
  .catalog-grid,
  .category-grid,
  .category-overview-grid,
  .story-section {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .ranking-row a {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 70px;
    height: 80px;
  }
}
