:root {
  --red-950: #450a0a;
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  --amber-50: #fffbeb;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-soft: 0 18px 48px rgba(127, 29, 29, 0.16);
  --shadow-deep: 0 24px 70px rgba(69, 10, 10, 0.28);
  --radius-lg: 18px;
  --radius-xl: 28px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--amber-50), var(--white) 42%, #fff7ed);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(254, 242, 242, 0.96), rgba(255, 251, 235, 0.96));
  border-bottom: 4px solid var(--red-900);
  box-shadow: 0 10px 28px rgba(127, 29, 29, 0.12);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red-800), var(--amber-700));
  box-shadow: 0 12px 24px rgba(185, 28, 28, 0.28);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--red-900), var(--amber-800));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy em {
  color: var(--gray-600);
  font-size: 12px;
  font-style: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--gray-700);
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--red-900);
  background: rgba(254, 226, 226, 0.82);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(254, 226, 226, 0.7);
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--red-900);
  border-radius: 999px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 42px 0 60px;
  background:
    radial-gradient(circle at top left, rgba(220, 38, 38, 0.24), transparent 30%),
    radial-gradient(circle at bottom right, rgba(217, 119, 6, 0.26), transparent 34%),
    linear-gradient(135deg, var(--red-950), var(--red-800) 46%, var(--amber-800));
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.18;
}

.hero-shell {
  position: relative;
  z-index: 1;
}

.hero-stage {
  min-height: 570px;
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 44px;
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy {
  color: var(--white);
  max-width: 650px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--amber-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-copy .eyebrow,
.invert .eyebrow,
.bg-dark .eyebrow,
.detail-copy .eyebrow {
  color: #fbbf24;
}

.hero-copy h1 {
  margin: 18px 0;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  color: #fee2e2;
  font-size: 20px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-list span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--red-900);
  background: rgba(255, 251, 235, 0.9);
  font-size: 12px;
  font-weight: 700;
}

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

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

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

.button-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--red-700), var(--amber-700));
  box-shadow: 0 16px 30px rgba(185, 28, 28, 0.26);
}

.button-secondary {
  color: var(--red-900);
  background: var(--amber-100);
}

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

.hero-visual {
  position: relative;
  min-height: 460px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  transform: rotate(1deg);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(69, 10, 10, 0.72));
}

.hero-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  bottom: -70px;
  background: rgba(251, 191, 36, 0.42);
  filter: blur(22px);
  border-radius: 50%;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
  background: var(--amber-100);
}

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

.bg-soft {
  background: linear-gradient(180deg, #fff7ed, var(--white));
}

.bg-dark {
  color: var(--white);
  background:
    radial-gradient(circle at 20% 20%, rgba(220, 38, 38, 0.2), transparent 28%),
    linear-gradient(135deg, var(--gray-950), var(--red-950));
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 8px 0 0;
  color: var(--gray-950);
  font-size: clamp(30px, 4.8vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.invert h2,
.bg-dark h2,
.rank-hero h1,
.detail-copy h1 {
  color: var(--white);
}

.text-link {
  color: var(--red-800);
  font-weight: 800;
}

.invert .text-link,
.bg-dark .text-link {
  color: var(--amber-100);
}

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

.category-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid rgba(153, 27, 27, 0.12);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  border-color: rgba(220, 38, 38, 0.32);
  box-shadow: 0 24px 60px rgba(127, 29, 29, 0.18);
  transform: translateY(-6px);
}

.category-card span {
  color: var(--red-700);
  font-size: 13px;
  font-weight: 900;
}

.category-card strong {
  color: var(--gray-950);
  font-size: 24px;
}

.category-card em {
  color: var(--gray-600);
  font-size: 14px;
  font-style: normal;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(153, 27, 27, 0.1);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 62px rgba(127, 29, 29, 0.2);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red-900), var(--amber-800));
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(69, 10, 10, 0.5));
}

.poster-year,
.poster-score {
  position: absolute;
  z-index: 1;
  left: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 850;
  background: rgba(127, 29, 29, 0.82);
}

.poster-year {
  top: 12px;
}

.poster-score {
  bottom: 12px;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: var(--gray-950);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
  color: var(--gray-500);
  font-size: 12px;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 60px;
  margin: 10px 0 12px;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-tags {
  min-height: 28px;
}

.card-tags span {
  color: var(--red-800);
  background: #fee2e2;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 850;
}

.card-actions a:first-child {
  color: var(--red-800);
}

.card-actions a:last-child {
  color: var(--amber-800);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--red-900);
  border-radius: 14px;
  background: var(--amber-100);
  font-weight: 950;
}

.rank-thumb {
  width: 78px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: var(--red-900);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info a {
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  margin: 4px 0 6px;
  color: var(--gray-300);
  font-size: 14px;
}

.rank-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #fed7aa;
  font-size: 12px;
}

.rank-row strong {
  color: #fbbf24;
}

.page-hero {
  padding: 72px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 12% 18%, rgba(251, 191, 36, 0.22), transparent 28%),
    linear-gradient(135deg, var(--red-950), var(--red-800) 58%, var(--amber-800));
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #fee2e2;
  font-size: 18px;
}

.filter-panel {
  width: min(var(--shell), calc(100% - 32px));
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
  margin: 0 auto 26px;
  padding: 18px;
  border: 1px solid rgba(153, 27, 27, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.bg-dark .filter-panel {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 800;
}

.bg-dark .filter-panel label {
  color: var(--gray-200);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(153, 27, 27, 0.18);
  border-radius: 12px;
  color: var(--gray-900);
  background: var(--white);
  padding: 0 12px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--red-700);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.category-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: var(--red-900);
}

.category-overview-card h2 {
  margin: 8px 0 10px;
  color: var(--gray-950);
  font-size: 30px;
}

.category-overview-card p {
  margin: 0 0 18px;
  color: var(--gray-600);
}

.detail-hero {
  padding: 54px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 12% 20%, rgba(251, 191, 36, 0.22), transparent 24%),
    linear-gradient(135deg, var(--gray-950), var(--red-950));
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-deep);
  background: linear-gradient(135deg, var(--red-900), var(--amber-800));
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fecaca;
  font-size: 14px;
}

.breadcrumb em {
  color: #fed7aa;
  font-style: normal;
}

.detail-copy p {
  max-width: 830px;
  margin: 18px 0 20px;
  color: #fee2e2;
  font-size: 18px;
}

.detail-tags span {
  background: rgba(254, 243, 199, 0.92);
}

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

.detail-meta-grid span {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-meta-grid strong {
  color: #fed7aa;
  font-size: 12px;
}

.player-section {
  padding-top: 46px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow-deep);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: #000000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-poster.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.play-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.14), rgba(69, 10, 10, 0.56));
}

.play-button {
  position: relative;
  z-index: 2;
  min-width: 168px;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-700), var(--amber-700));
  box-shadow: 0 18px 44px rgba(220, 38, 38, 0.38);
  font-size: 18px;
  font-weight: 950;
}

.detail-content article {
  max-width: 900px;
  margin: 0 auto;
  padding: 34px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-content h2 {
  margin: 0 0 12px;
  color: var(--red-900);
  font-size: 28px;
}

.detail-content h2:not(:first-child) {
  margin-top: 26px;
}

.detail-content p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 2;
  text-align: justify;
}

.site-footer {
  color: var(--gray-300);
  background: var(--gray-950);
  padding: 46px 0 24px;
}

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

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer p {
  margin: 0;
  color: var(--gray-400);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-500);
  font-size: 14px;
}

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

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

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

  .hero-stage {
    min-height: 850px;
  }

  .hero-visual {
    min-height: 380px;
  }

  .hero-visual img {
    min-height: 380px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 251, 235, 0.98);
    box-shadow: var(--shadow-deep);
  }

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

  .nav-link {
    padding: 12px 14px;
  }

  .hero-stage {
    min-height: 820px;
  }

  .hero-copy h1 {
    font-size: 46px;
  }

  .hero-copy p {
    font-size: 17px;
  }

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

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

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

  .rank-row strong {
    grid-column: 3;
  }

  .category-overview-card,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .shell,
  .filter-panel {
    width: min(100% - 22px, var(--shell));
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy em {
    display: none;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .hero-section {
    padding: 28px 0 42px;
  }

  .hero-stage {
    min-height: 720px;
  }

  .hero-visual,
  .hero-visual img {
    min-height: 300px;
  }

  .hero-actions,
  .section-head,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

  .detail-content article {
    padding: 22px;
  }
}
