:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --brand: #dc2626;
  --brand-dark: #991b1b;
  --brand-soft: #fee2e2;
  --gold: #f59e0b;
  --dark: #020617;
  --slate: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.35);
}

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

.main-nav a {
  color: rgba(255, 255, 255, 0.78);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  transition: 0.2s ease;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 72% 30%, rgba(239, 68, 68, 0.45), transparent 28%),
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.18), transparent 30%),
    linear-gradient(135deg, #020617 0%, #7f1d1d 50%, #0f172a 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: radial-gradient(circle, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 36px 36px;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 82px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy h1 span {
  color: #f87171;
}

.hero-copy p {
  max-width: 660px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--brand);
  box-shadow: 0 15px 32px rgba(220, 38, 38, 0.36);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  background: #b91c1c;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-panel {
  position: relative;
}

.hero-glow {
  position: absolute;
  inset: -26px;
  border-radius: 34px;
  background: rgba(239, 68, 68, 0.22);
  filter: blur(42px);
}

.hero-card {
  position: relative;
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
}

.hero-slide {
  display: none;
  grid-template-columns: 168px 1fr;
  gap: 20px;
  min-height: 260px;
  align-items: stretch;
}

.hero-slide.is-active {
  display: grid;
}

.hero-slide img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-slide-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kicker {
  display: inline-flex;
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.hero-slide h2 {
  margin: 14px 0 8px;
  font-size: 30px;
  line-height: 1.15;
}

.hero-slide p {
  margin: 0;
  color: #dbe4ef;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.hero-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.hero-mini a {
  padding: 12px 10px;
  color: #fff;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  transition: 0.2s ease;
}

.hero-mini a:hover {
  background: rgba(255, 255, 255, 0.18);
}

.slider-controls {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.slider-controls button {
  width: 38px;
  height: 38px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

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

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

.section-title h2,
.page-hero h1,
.filter-panel h2,
.detail-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.section-title p,
.page-hero p,
.filter-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.feature-card {
  padding: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  background: #fef2f2;
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 24px;
  margin-bottom: 14px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), transparent);
}

.year-badge,
.score-badge,
.rank-num {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.year-badge {
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.52);
}

.score-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(220, 38, 38, 0.86);
}

.rank-num {
  top: 10px;
  right: 10px;
  background: rgba(245, 158, 11, 0.94);
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--brand);
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-line {
  margin-top: 8px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-band {
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #ea580c);
}

.rank-band .section-title h2,
.rank-band .section-title p {
  color: #fff;
}

.rank-band .movie-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.rank-band .movie-info h3,
.rank-band .movie-meta,
.rank-band .movie-line {
  color: #fff;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 80% 0%, rgba(248, 113, 113, 0.35), transparent 32%),
    linear-gradient(135deg, #020617, #7f1d1d 52%, #0f172a);
}

.page-hero .section {
  padding-top: 74px;
  padding-bottom: 56px;
}

.page-hero h1 {
  color: #fff;
}

.page-hero p {
  max-width: 780px;
  color: #cbd5e1;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 20px;
}

.breadcrumb a:hover {
  color: #fff;
}

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

.category-card {
  display: block;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

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

.category-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 0.82fr);
  gap: 22px;
  align-items: center;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 0.7fr;
  gap: 10px;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.empty-state {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border-radius: 18px;
  background: #fff;
}

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

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

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.08)),
    rgba(0,0,0,0.24);
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 16px 44px rgba(220, 38, 38, 0.45);
  font-size: 34px;
  transform: translateX(2px);
}

.detail-copy {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.detail-cover {
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

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

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.meta-tags span,
.tag-list a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #991b1b;
  border-radius: 999px;
  background: #fee2e2;
  font-size: 13px;
  font-weight: 800;
}

.detail-copy p {
  color: #475569;
}

.story-block {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.story-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.story-block p {
  margin: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.site-footer {
  margin-top: 54px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.footer-inner p {
  max-width: 520px;
  margin: 16px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1024px) {
  .hero-inner,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero-inner {
    padding: 62px 0 56px;
  }

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

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

  .hero-slide img {
    height: 220px;
  }

  .hero-mini {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .filter-grid,
  .footer-inner,
  .footer-links {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 44px 0;
  }

  .detail-copy {
    padding: 20px;
  }
}
