:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --red: #ef4444;
  --red-dark: #b91c1c;
  --red-soft: #fee2e2;
  --slate: #0f172a;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --content: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 50%, #f8fafc 100%);
  line-height: 1.65;
}

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

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

.header-inner {
  width: var(--content);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #111827;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.32);
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  color: #475569;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #b91c1c;
  background: #fee2e2;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  cursor: pointer;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(127, 29, 29, 0.78), rgba(15, 23, 42, 0.5)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  width: var(--content);
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  align-items: center;
  gap: 54px;
  padding: 78px 0 92px;
}

.hero-copy {
  color: #fff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fee2e2;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(254, 202, 202, 0.25);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

.hero-lead,
.page-hero p,
.detail-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 22px);
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  padding: 8px 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.primary-button,
.secondary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 14px 26px rgba(239, 68, 68, 0.25);
}

.secondary-button {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.secondary-button.dark,
.ghost-button {
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  min-height: 460px;
  border-radius: 32px;
  overflow: hidden;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.82)), var(--poster-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-play {
  position: absolute;
  left: 26px;
  bottom: 72px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 16px 32px rgba(239, 68, 68, 0.35);
}

.hero-poster-title {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

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

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

.hero-dots button.active {
  background: #ef4444;
}

.category-strip {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.strip-inner {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-pill {
  min-height: 100px;
  padding: 18px;
  border-radius: 22px;
  color: #111827;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-pill span {
  display: block;
  color: #ef4444;
  font-weight: 900;
  font-size: 13px;
}

.category-pill strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.content-section {
  width: var(--content);
  margin: 0 auto;
  padding: 72px 0 0;
}

.intro-section {
  padding-top: 70px;
}

.intro-card,
.feature-panel,
.detail-article,
.detail-side,
.filter-panel,
.category-card-large {
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.intro-card {
  padding: clamp(28px, 4vw, 48px);
  border-radius: 30px;
  background: radial-gradient(circle at top right, rgba(254, 226, 226, 0.92), transparent 40%), #fff;
}

.intro-card h2,
.section-heading h2,
.feature-panel h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.intro-card p,
.feature-panel p,
.detail-article p,
.category-card-large p {
  color: #475569;
  font-size: 17px;
}

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

.section-heading .section-kicker {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fecaca;
}

.text-link {
  color: #b91c1c;
}

.text-link:hover {
  color: #ef4444;
}

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

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

.horizontal-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(245px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-rail .movie-card {
  scroll-snap-align: start;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  min-height: 190px;
  overflow: hidden;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.7)), var(--poster-image);
  background-size: cover;
  background-position: center;
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(239, 68, 68, 0.18);
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.year-badge,
.rank-badge,
.play-chip,
.detail-score {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
  top: 12px;
  right: 12px;
  min-width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.play-chip {
  left: 14px;
  bottom: 14px;
  padding: 8px 12px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.movie-card-body {
  padding: 18px;
}

.movie-title {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.movie-title a:hover {
  color: #b91c1c;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.movie-card-body p {
  margin: 12px 0 14px;
  color: #475569;
  font-size: 14px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 10px;
  color: #991b1b;
  background: #fee2e2;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: stretch;
}

.feature-panel {
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(145deg, #111827, #7f1d1d);
  color: #fff;
}

.feature-panel h2,
.feature-panel p {
  color: #fff;
}

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

.rank-item {
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(5px);
  border-color: #fecaca;
}

.rank-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.rank-title {
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #b91c1c;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  color: #fff;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(127, 29, 29, 0.76), rgba(15, 23, 42, 0.62)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.page-hero {
  min-height: 360px;
  display: grid;
  align-items: center;
  padding: 76px calc((100vw - min(1180px, calc(100vw - 32px))) / 2);
}

.slim-hero {
  min-height: 300px;
  background-image: linear-gradient(135deg, #0f172a, #7f1d1d 55%, #111827);
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  padding: 20px;
  border-radius: 28px;
}

.category-cover-stack {
  position: relative;
  min-height: 170px;
  border-radius: 22px;
  overflow: hidden;
  background: #111827;
}

.category-cover-stack span {
  position: absolute;
  width: 58%;
  height: 76%;
  border-radius: 18px;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.68)), var(--poster-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.category-cover-stack span:nth-child(1) {
  left: 8%;
  top: 12%;
  z-index: 3;
}

.category-cover-stack span:nth-child(2) {
  left: 28%;
  top: 7%;
  z-index: 2;
}

.category-cover-stack span:nth-child(3) {
  left: 42%;
  top: 17%;
  z-index: 1;
}

.category-cover-stack span:nth-child(4) {
  left: 18%;
  top: 28%;
  z-index: 0;
  opacity: 0.72;
}

.filter-section {
  padding-top: 34px;
}

.sticky-filter {
  position: sticky;
  top: 74px;
  z-index: 10;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr auto auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  border-radius: 24px;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 800;
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.empty-message {
  padding: 34px;
  border-radius: 24px;
  text-align: center;
  background: #fff;
  color: #64748b;
  box-shadow: var(--shadow-soft);
}

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

.detail-hero {
  padding: 64px 0;
}

.detail-hero-inner {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 44px;
  align-items: center;
}

.detail-poster {
  position: relative;
  min-height: 460px;
  border-radius: 30px;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.7)), var(--poster-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.detail-score {
  right: 18px;
  top: 18px;
  width: 54px;
  height: 54px;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 18px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.24), rgba(2, 6, 23, 0.82));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover-button {
  width: 86px;
  height: 86px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 30px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 20px 42px rgba(239, 68, 68, 0.35);
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 36px);
}

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

.detail-article,
.detail-side {
  padding: clamp(24px, 3vw, 38px);
  border-radius: 28px;
}

.detail-article p {
  font-size: 17px;
  line-height: 1.9;
}

.detail-article h2 + p {
  margin-top: 14px;
}

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

.detail-side dt {
  color: #94a3b8;
  font-weight: 800;
}

.detail-side dd {
  margin: -8px 0 4px;
  color: #111827;
  font-weight: 800;
}

.detail-side a {
  color: #b91c1c;
}

.site-footer {
  margin-top: 82px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  width: var(--content);
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 42px;
}

.footer-logo {
  color: #fff;
}

.footer-brand p {
  max-width: 520px;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  gap: 9px;
  align-content: start;
}

.footer-links h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

  .hero-poster,
  .detail-poster {
    max-width: 420px;
    width: 100%;
    min-height: 520px;
    margin: 0 auto;
  }

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

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

  .category-card-grid,
  .full-rank-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  :root {
    --content: min(100vw - 24px, 1180px);
  }

  .header-inner {
    min-height: 66px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    padding: 12px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
  }

  body.nav-open .main-nav {
    display: grid;
  }

  .nav-link {
    border-radius: 14px;
  }

  .hero-carousel,
  .hero-content {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.active {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 48px 0 78px;
    gap: 30px;
  }

  .hero-poster,
  .detail-poster {
    min-height: 380px;
    transform: none;
  }

  .hero-dots {
    bottom: 18px;
  }

  .strip-inner,
  .movie-grid,
  .compact-grid,
  .footer-inner,
  .category-card-large,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .category-strip {
    margin-top: 18px;
  }

  .content-section {
    padding-top: 48px;
  }

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

  .page-hero {
    min-height: 260px;
    padding: 42px 12px;
  }

  .detail-hero {
    padding: 40px 0;
  }

  .poster-link {
    min-height: 220px;
  }

  .sticky-filter {
    position: static;
  }

  .footer-inner {
    gap: 28px;
  }
}
