:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --teal-500: #14b8a6;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 26px 70px rgba(15, 23, 42, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--slate-50);
  color: var(--slate-800);
  font-family: 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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  color: var(--white);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--slate-200);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(16, 185, 129, 0.18);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: center;
  gap: 56px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: translateX(32px);
}

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

.hero-backdrop {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.82), rgba(4, 120, 87, 0.78)), var(--hero-image) center / cover;
  filter: saturate(1.12);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding-top: 56px;
}

.hero-kicker,
.section-heading span,
.page-hero span,
.ranking-head span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald-100);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 26px;
  color: var(--slate-200);
  font-size: clamp(18px, 2.4vw, 24px);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
}

.tag-row span {
  background: var(--slate-100);
  color: var(--slate-600);
}

.hero-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;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
  color: var(--white);
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.3);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-strong);
  transform: rotate(1.5deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 32px;
  background: var(--emerald-500);
}

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

.intro-section {
  padding-bottom: 28px;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.page-hero h1 {
  margin: 8px 0 10px;
  color: var(--slate-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--slate-600);
  font-size: 17px;
}

.wide-heading {
  text-align: center;
}

.wide-heading p {
  margin-left: auto;
  margin-right: auto;
}

.with-link {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.with-link a,
.ranking-head a {
  color: var(--emerald-700);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--slate-100);
}

.search-box span {
  color: var(--slate-500);
  font-weight: 800;
}

.search-box input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--slate-800);
}

.filter-panel select {
  padding: 0 14px;
  border-radius: 16px;
  background: var(--slate-100);
  cursor: pointer;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

.compact-grid,
.preview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-200), var(--slate-100));
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), transparent 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--emerald-500);
  color: var(--white);
  font-size: 22px;
  transform: translate(-50%, -45%) scale(0.88);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .play-float {
  opacity: 1;
}

.movie-card:hover .play-float {
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

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

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

.card-meta {
  margin: auto 0 12px;
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 700;
}

.card-large .poster-frame img {
  aspect-ratio: 16 / 10;
}

.card-small .movie-card-body h3 {
  font-size: 16px;
}

.card-small .card-line {
  font-size: 13px;
}

.tinted-section {
  width: min(1220px, calc(100% - 32px));
  padding: 42px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(209, 250, 229, 0.78), rgba(240, 253, 250, 0.92));
}

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

.category-tile {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  position: relative;
  padding: 20px;
  border-radius: 24px;
  background: var(--slate-900);
  color: var(--white);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.tile-images {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  opacity: 0.5;
}

.tile-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.2));
}

.category-tile strong,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  color: var(--slate-200);
}

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

.ranking-card,
.side-meta,
.poster-card,
.content-card,
.category-block {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.ranking-card {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 22px;
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: var(--white);
}

.rank-row:hover {
  transform: translateY(-3px);
}

.rank-number {
  color: var(--emerald-600);
  font-size: 20px;
  font-weight: 900;
}

.rank-row img {
  width: 62px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-100);
}

.rank-info {
  min-width: 0;
}

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

.rank-info strong {
  color: var(--slate-800);
  font-weight: 900;
}

.rank-info small {
  color: var(--slate-500);
}

.rank-action {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--emerald-100);
  color: var(--emerald-700);
  font-size: 12px;
  font-weight: 900;
}

.page-hero {
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900) 55%, var(--emerald-700));
  color: var(--white);
  padding: 86px 0;
}

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

.page-hero h1 {
  color: var(--white);
}

.page-hero p {
  color: var(--slate-200);
}

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

.category-block {
  padding: 28px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 24px;
  color: var(--slate-500);
  font-size: 14px;
  font-weight: 700;
}

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

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

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.32)), var(--player-image) center / cover;
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
  color: var(--white);
  font-size: 34px;
  box-shadow: 0 22px 45px rgba(16, 185, 129, 0.36);
}

.player-title {
  max-width: 80%;
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--white);
  text-align: center;
}

.player-message.visible {
  display: block;
}

.detail-title-block {
  padding: 26px 0 10px;
}

.detail-title-block > span {
  color: var(--emerald-700);
  font-weight: 900;
}

.detail-title-block h1 {
  margin: 8px 0 12px;
  color: var(--slate-800);
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-title-block p {
  margin: 0 0 18px;
  color: var(--slate-600);
  font-size: 18px;
}

.content-card {
  margin-top: 18px;
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  color: var(--slate-800);
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--slate-600);
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.poster-card {
  overflow: hidden;
  padding-bottom: 20px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--slate-100);
}

.poster-card h2,
.poster-card p {
  margin-left: 18px;
  margin-right: 18px;
}

.poster-card h2 {
  margin-bottom: 6px;
  color: var(--slate-800);
  font-size: 22px;
}

.poster-card p {
  color: var(--slate-500);
  font-weight: 700;
}

.poster-card .primary-button {
  margin: 10px 18px 0;
}

.side-meta {
  padding: 20px;
}

.side-meta dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 16px;
  margin: 0;
}

.side-meta dt {
  color: var(--slate-500);
  font-weight: 900;
}

.side-meta dd {
  margin: 0;
  color: var(--slate-800);
}

.related-section {
  width: 100%;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 28px;
  border-radius: 20px;
  background: var(--white);
  color: var(--slate-500);
  text-align: center;
  font-weight: 800;
}

.empty-state.visible {
  display: block;
}

.site-footer {
  margin-top: 70px;
  background: var(--slate-900);
  color: var(--slate-300);
}

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

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

.footer-grid p {
  margin: 12px 0 0;
  color: var(--slate-400);
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--slate-300);
}

.footer-grid a:hover {
  color: var(--emerald-500);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--slate-500);
  text-align: center;
}

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

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

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

  .ranking-card,
  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.98);
  }

  .nav-links.open {
    display: flex;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 60px 0 88px;
  }

  .hero-poster {
    max-width: 280px;
    margin: 0 auto;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .catalog-grid,
  .feature-grid,
  .compact-grid,
  .preview-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .with-link {
    align-items: start;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .section,
  .detail-page,
  .page-hero > div,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-control {
    display: none;
  }

  .catalog-grid,
  .feature-grid,
  .compact-grid,
  .preview-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .tinted-section,
  .category-block {
    padding: 22px;
  }

  .rank-row {
    grid-template-columns: 34px 54px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }

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