:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --soft: #e5e7eb;
  --line: #e2e8f0;
  --amber: #d97706;
  --amber-dark: #92400e;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --radius: 24px;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(
      circle at top left,
      rgba(37, 99, 235, 0.1),
      transparent 30rem
    ),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 32rem);
}

img {
  max-width: 100%;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 78px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.28);
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.desktop-nav a {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--amber);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search input,
.inline-filter input {
  width: 230px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  outline: none;
}

.site-search input:focus,
.inline-filter input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.site-search button,
.inline-filter button,
.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.site-search button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, var(--amber));
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.26);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.16);
}

.text-link {
  margin-top: 22px;
  color: var(--amber-dark);
  background: #fff7ed;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: #ffffff;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(15, 23, 42, 0.95),
      rgba(15, 23, 42, 0.6) 48%,
      rgba(15, 23, 42, 0.16)
    ),
    linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 45%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100% - 1180px) / 2));
  width: min(680px, calc(100% - 48px));
  transform: translateY(-50%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-size: 13px;
  font-weight: 800;
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
  z-index: 5;
}

.hero-controls > button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 32px;
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 32px;
  background: #fbbf24;
}

.quick-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -42px;
  position: relative;
  z-index: 10;
}

.category-card,
.category-overview-card,
.side-card,
.detail-copy,
.player-shell {
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.category-card {
  display: block;
  padding: 22px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.ranking-item:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.category-card span,
.category-overview-title {
  display: block;
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 20px;
  font-weight: 900;
}

.category-card strong {
  display: block;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.content-section,
.split-section,
.category-overview-grid {
  padding: 74px 0 0;
}

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

.section-heading span {
  color: var(--amber);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.movie-card {
  display: grid;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.movie-info strong {
  overflow: hidden;
  font-size: 17px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-meta,
.movie-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  padding-bottom: 80px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 44px 74px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.rank-number {
  color: var(--amber);
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

.ranking-item img {
  width: 74px;
  height: 100px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-item strong,
.ranking-item em {
  display: block;
}

.ranking-item strong {
  margin-bottom: 8px;
  font-size: 17px;
}

.ranking-item em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.65;
}

.page-main {
  padding: 42px 0 86px;
}

.page-hero {
  padding: 46px;
  border-radius: 32px;
  color: #ffffff;
  background:
    radial-gradient(
      circle at top right,
      rgba(251, 191, 36, 0.36),
      transparent 22rem
    ),
    linear-gradient(135deg, #111827, #1e3a8a 60%, #92400e);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.small-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.8;
}

.inline-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.inline-filter input {
  width: min(420px, 100%);
}

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

.category-overview-card {
  padding: 24px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

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

.category-overview-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.category-overview-card li a {
  color: #334155;
  font-weight: 700;
}

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

.breadcrumbs a {
  color: var(--amber-dark);
  font-weight: 800;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-shell {
  overflow: hidden;
  padding: 14px;
  background: #0f172a;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #020617;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.2),
    rgba(15, 23, 42, 0.72)
  );
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  box-shadow: 0 18px 44px rgba(220, 38, 38, 0.35);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 20px;
}

.detail-copy {
  padding: 30px;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-copy h2 {
  margin: 30px 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.detail-copy p,
.lead {
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.lead {
  color: #1e293b;
  font-size: 19px;
  font-weight: 700;
}

.detail-side {
  position: sticky;
  top: 100px;
}

.side-card {
  overflow: hidden;
}

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

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px;
}

.side-card div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.related-grid {
  grid-template-columns: repeat(4, 1fr);
}

.site-footer {
  padding: 42px 0;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 28px;
}

.site-footer strong {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 680px;
  line-height: 1.8;
}

.site-footer span,
.site-footer a {
  display: block;
}

.site-footer span {
  margin-bottom: 10px;
  color: #ffffff;
  font-weight: 900;
}

.site-footer a {
  margin: 8px 0;
  color: #e2e8f0;
}

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

@media (max-width: 1040px) {
  .desktop-nav,
  .nav-shell > .site-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .quick-categories,
  .movie-grid,
  .category-overview-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .detail-side {
    position: static;
  }
}

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

  .brand small {
    display: none;
  }

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

  .hero-content {
    top: 48%;
  }

  .quick-categories,
  .movie-grid,
  .compact-grid,
  .category-overview-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-copy {
    padding: 26px;
  }

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

  .ranking-item img {
    width: 58px;
    height: 82px;
  }
}
