:root {
  --red-950: #3b0707;
  --red-900: #5f1111;
  --red-800: #7f1d1d;
  --red-700: #a41f1f;
  --red-600: #dc2626;
  --amber-900: #78350f;
  --amber-700: #b45309;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --paper: #fffaf0;
  --cream: #fff7ed;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: rgba(127, 29, 29, 0.16);
  --shadow: 0 20px 45px rgba(127, 29, 29, 0.16);
}

* {
  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(--ink);
  background: linear-gradient(180deg, #fff 0%, #fff7ed 46%, #fff 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  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-800);
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.12);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, var(--red-700), var(--amber-700));
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.26);
}

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

.brand-text strong {
  font-size: 24px;
  color: var(--red-800);
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--red-800);
  background: rgba(127, 29, 29, 0.08);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.08);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--red-800);
  margin: 5px 0;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.28), transparent 32%),
    radial-gradient(circle at 82% 8%, rgba(220, 38, 38, 0.26), transparent 30%),
    linear-gradient(120deg, var(--red-950), var(--red-800) 48%, var(--amber-900));
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 52px, rgba(255, 255, 255, 0.12) 53px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  min-height: 640px;
  margin: 0 auto;
  padding: 72px 22px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
  gap: 42px;
  align-items: center;
}

.hero-copy h1,
.page-hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fde68a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-search {
  margin: 28px 0 20px;
  max-width: 620px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.24);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
  padding: 14px 16px;
}

.hero-search input {
  border: 0;
  background: rgba(255, 255, 255, 0.96);
}

.hero-search button,
.primary-btn {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 14px 22px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red-600), var(--amber-700));
  box-shadow: 0 16px 34px rgba(220, 38, 38, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover,
.hero-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(220, 38, 38, 0.36);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 14px;
  padding: 13px 21px;
  color: #fff;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.1);
}

.hero-actions,
.hero-chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-chip-row {
  margin-top: 22px;
}

.hero-chip-row a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 800;
  font-size: 13px;
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 30px;
  opacity: 0;
  transform: translateX(18px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
  box-shadow: 0 34px 74px rgba(0, 0, 0, 0.38);
  background: #111827;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  z-index: 2;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.03);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.22) 55%, rgba(0, 0, 0, 0.02));
}

.hero-card-copy {
  position: absolute;
  z-index: 3;
  left: 30px;
  right: 30px;
  bottom: 30px;
}

.hero-card-copy h2 {
  margin: 10px 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
}

.hero-card-copy p {
  margin: 0 0 16px;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.82);
}

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

.hero-tags {
  margin-bottom: 18px;
}

.hero-tags span,
.detail-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff7ed;
  background: rgba(220, 38, 38, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: 22px;
  top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button {
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
}

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

.hero-dot {
  width: 9px !important;
  height: 9px !important;
  padding: 0;
  background: rgba(255, 255, 255, 0.38) !important;
}

.hero-dot.is-active {
  width: 24px !important;
  border-radius: 999px !important;
  background: #fff !important;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 66px 22px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  color: #111827;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex-shrink: 0;
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--red-800);
  font-weight: 900;
  background: rgba(127, 29, 29, 0.08);
}

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

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

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(220, 38, 38, 0.34);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.18), rgba(245, 158, 11, 0.14));
}

.movie-card.compact .poster {
  aspect-ratio: 16 / 10;
}

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

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(220, 38, 38, 0.88);
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(245, 158, 11, 0.92);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0 0 12px;
  min-height: 46px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 800;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--red-800);
  background: rgba(127, 29, 29, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.rank-section {
  background: linear-gradient(90deg, #fff7ed, #fef2f2, #fffbeb);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rank-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 62px 22px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 84px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red-600), var(--amber-700));
}

.rank-item img {
  width: 84px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  color: #111827;
  line-height: 1.28;
}

.rank-copy em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.22), transparent 28%),
    linear-gradient(120deg, var(--red-950), var(--red-800), var(--amber-900));
  padding: 74px 22px;
}

.page-hero > div {
  max-width: 1240px;
  margin: 0 auto;
}

.compact-hero,
.category-hero,
.rank-hero,
.search-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
}

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

.category-card {
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(127, 29, 29, 0.1);
}

.category-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 190px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px;
  background: linear-gradient(135deg, var(--red-900), var(--amber-900));
}

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

.category-copy {
  padding: 26px;
}

.category-copy h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 26px;
}

.category-copy p {
  color: var(--muted);
  margin: 0 0 18px;
}

.category-copy span {
  color: var(--red-800);
  font-weight: 900;
}

.filter-bar {
  margin-bottom: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 180px;
  gap: 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(127, 29, 29, 0.08);
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--red-800);
  font-weight: 900;
  font-size: 13px;
}

.detail-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 22px 20px;
}

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

.breadcrumb a {
  color: var(--red-800);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: stretch;
}

.player-panel,
.detail-side,
.detail-copy {
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(127, 29, 29, 0.1);
  overflow: hidden;
}

.movie-player {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  background: #000;
  overflow: hidden;
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.22));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--red-600), var(--amber-700));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.detail-side {
  padding: 16px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.full-btn {
  width: 100%;
}

.detail-copy {
  margin-top: 24px;
  padding: 32px;
}

.detail-copy h1 {
  margin: 10px 0 16px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  color: #111827;
}

.detail-copy h2 {
  margin: 28px 0 10px;
  color: #111827;
  font-size: 24px;
}

.detail-copy p {
  color: #4b5563;
  font-size: 17px;
}

.lead-text {
  padding: 18px 20px;
  border-left: 5px solid var(--red-700);
  border-radius: 16px;
  background: #fff7ed;
  color: #7f1d1d !important;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 18px;
}

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

.detail-meta-grid div {
  padding: 16px;
  border-radius: 16px;
  background: #fff7ed;
}

.detail-meta-grid strong,
.detail-meta-grid span {
  display: block;
}

.detail-meta-grid strong {
  color: var(--red-800);
  font-size: 13px;
  margin-bottom: 6px;
}

.detail-meta-grid span {
  color: #111827;
  font-weight: 800;
}

.related-section {
  padding-top: 36px;
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #030712);
  border-top: 4px solid var(--red-800);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 22px;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
  margin-bottom: 16px;
}

.site-footer p {
  color: #9ca3af;
  margin: 0;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 8px 0;
}

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

.footer-tags span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 22px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-filter-hidden {
  display: none !important;
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

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

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

  .hero-slide img {
    min-height: 460px;
  }

  .movie-grid,
  .small-grid,
  .wide-rank {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .detail-side {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    align-items: center;
  }

  .detail-poster {
    margin-bottom: 0;
  }

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

@media (max-width: 760px) {
  .brand-text strong {
    font-size: 19px;
  }

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

  .hero-inner {
    min-height: auto;
    padding: 46px 18px;
  }

  .hero-search,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
  }

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

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

  .hero-slide img {
    min-height: 420px;
  }

  .hero-card-copy {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .small-grid,
  .top-grid,
  .rank-list,
  .wide-rank,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card a {
    grid-template-columns: 1fr;
  }

  .category-covers {
    height: 210px;
  }

  .rank-item {
    grid-template-columns: 42px 76px 1fr;
  }

  .detail-copy {
    padding: 22px;
  }

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

  .movie-player {
    min-height: 220px;
  }

  .detail-side {
    grid-template-columns: 120px 1fr;
  }

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