:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --rose-600: #e11d48;
  --rose-500: #f43f5e;
  --rose-400: #fb7185;
  --orange-400: #fb923c;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.26);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose-500), var(--orange-400));
  box-shadow: 0 10px 26px rgba(244, 63, 94, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  background: linear-gradient(90deg, var(--rose-400), var(--orange-400));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  color: #e2e8f0;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--rose-400);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px 18px;
  background: var(--slate-950);
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-700));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(244, 63, 94, 0.45), transparent 32%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.28));
}

.hero-content {
  position: relative;
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 60px;
  color: var(--white);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--rose-400);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--rose-600);
}

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

.hero p,
.page-hero p,
.detail-line {
  margin: 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.14);
  color: #ffe4e6;
  border: 1px solid rgba(251, 113, 133, 0.32);
  padding: 7px 12px;
  font-size: 13px;
}

.tag-row span {
  color: var(--rose-600);
  background: #fff1f2;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-500), var(--orange-400));
  box-shadow: 0 16px 30px rgba(244, 63, 94, 0.34);
}

.btn.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.btn.link {
  color: #fecdd3;
  background: transparent;
}

.hero-poster {
  position: relative;
  transform: rotate(3deg);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.5);
}

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

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

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

.hero-dot.is-active {
  width: 32px;
  background: var(--rose-400);
}

.section {
  padding: 72px 0;
}

.alt-section {
  background: var(--white);
}

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

.section-title.centered {
  display: block;
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
}

.section-title.inline-title {
  align-items: center;
}

.section-title h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-title p:not(.eyebrow) {
  color: var(--slate-500);
  line-height: 1.8;
}

.section-title a {
  color: var(--rose-600);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  min-height: 46px;
  padding: 0 14px;
  background: #f8fafc;
  color: var(--slate-900);
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--rose-400);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14);
}

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

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

.movie-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

.card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent);
}

.poster-wrap figcaption,
.type-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.poster-wrap figcaption {
  left: 12px;
  background: var(--rose-500);
}

.type-badge {
  right: 12px;
  background: rgba(2, 6, 23, 0.74);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-meta,
.movie-line {
  margin: 0 0 12px;
  color: var(--slate-500);
  font-size: 14px;
  line-height: 1.65;
}

.movie-line {
  color: #475569;
}

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

.compact .movie-line {
  display: none;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 34px;
}

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

.category-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 24px;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--rose-600));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #7c2d12, #ea580c);
}

.category-card span {
  color: #fecdd3;
  font-weight: 900;
}

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

.category-card em {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  line-height: 1.7;
}

.rank-panel,
.content-card,
.side-card,
.category-overview {
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
}

.rank-panel {
  padding: 24px;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.rank-item a {
  display: grid;
  grid-template-columns: 42px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
  transform: translateX(4px);
  background: #fff1f2;
}

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

.rank-item img {
  width: 54px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-main {
  display: grid;
  gap: 6px;
}

.rank-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main em {
  color: var(--slate-500);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  padding: 92px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 22%, rgba(244, 63, 94, 0.35), transparent 30%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.small-hero {
  padding: 82px 0;
}

.page-hero .container {
  max-width: 850px;
}

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

.category-overview a {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.overview-covers img {
  height: 160px;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.category-overview h2 {
  margin: 8px 0;
}

.category-overview p {
  color: var(--slate-500);
  line-height: 1.8;
}

.category-overview span,
.side-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--rose-600);
  background: #fff1f2;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: blur(2px);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.22));
}

.detail-hero-inner {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: center;
  gap: 44px;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.44);
}

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

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fecdd3;
  font-weight: 800;
}

.detail-subtitle {
  margin: 0 0 18px;
  color: #cbd5e1;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  z-index: 3;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose-500), var(--orange-400));
  font-size: 28px;
  box-shadow: 0 18px 34px rgba(244, 63, 94, 0.34);
}

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

.content-card,
.side-card {
  padding: 26px;
  margin-top: 24px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
}

.content-card p {
  color: #334155;
  line-height: 1.95;
  font-size: 17px;
}

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

.info-list dt {
  color: var(--slate-500);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: var(--slate-900);
}

.rank-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 28px;
}

.large-rank {
  max-height: 980px;
  overflow: auto;
  padding-right: 6px;
}

.site-footer {
  padding: 48px 0;
  color: #cbd5e1;
  background: var(--slate-950);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.footer-grid p {
  margin: 0;
  max-width: 640px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  gap: 18px;
  font-weight: 800;
}

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

  .hero-content,
  .two-column,
  .detail-layout,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .detail-hero-inner {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    display: flex;
    align-items: center;
  }

  .hero p,
  .page-hero p,
  .detail-line {
    font-size: 16px;
  }

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

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

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

  .overview-covers {
    display: none;
  }

  .detail-poster {
    width: 190px;
    margin-top: 34px;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .section {
    padding: 48px 0;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

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

  .hero-actions {
    gap: 8px;
  }

  .btn {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }
}
