:root {
  color-scheme: dark;
  --bg: #070b14;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --line: rgba(255, 255, 255, 0.12);
  --muted: #94a3b8;
  --text: #f8fafc;
  --red: #dc2626;
  --red-dark: #991b1b;
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(220, 38, 38, 0.18), transparent 36%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.35);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #fecaca, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 14px;
  color: #cbd5e1;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(220, 38, 38, 0.9);
}

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

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

.mobile-nav {
  display: none;
  padding: 12px 22px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mobile-categories a,
.chip-link {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: 56px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 82px 22px 120px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-backdrop,
.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.12);
  transform: scale(1.08);
  opacity: 0.34;
}

.hero-carousel::before,
.detail-hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(248, 113, 113, 0.24), transparent 32%), linear-gradient(115deg, rgba(2, 6, 23, 0.95), rgba(127, 29, 29, 0.72), rgba(2, 6, 23, 0.9));
  z-index: -1;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #fca5a5;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 900;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 680px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fee2e2;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.22);
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 900;
  transition: 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.32);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  padding: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,.2), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  background: linear-gradient(135deg, #1f2937, #7f1d1d);
}

.hero-control-bar {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 44px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 4;
}

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

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.hero-dot.is-active {
  background: #fff;
}

.hero-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  min-width: 260px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  color: #fff;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.hero-search button {
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  color: #fff;
  font-weight: 900;
  background: var(--red);
}

.quick-panel {
  max-width: 1240px;
  margin: -48px auto 0;
  position: relative;
  z-index: 5;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-card {
  min-height: 122px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.quick-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}

.quick-card span,
.section-heading p,
.movie-card p,
.horizontal-card p,
.category-overview-card p,
.site-footer p,
.page-hero p,
.detail-one-line,
.article-panel p,
.side-links span {
  color: var(--muted);
}

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

.content-section.soft-bg {
  max-width: none;
  padding-left: max(22px, calc((100vw - 1240px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1240px) / 2 + 22px));
  background: rgba(255, 255, 255, 0.035);
}

.dark-section {
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(69, 10, 10, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.09);
  margin-bottom: 72px;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
  color: #fca5a5;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  transition: 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 113, 113, 0.42);
}

.poster-link {
  display: block;
  position: relative;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: 0.35s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
}

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

.score {
  right: 10px;
  bottom: 10px;
  min-width: 44px;
  height: 28px;
  color: #fff7ed;
  background: rgba(220, 38, 38, 0.92);
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  color: #111827;
  background: #fbbf24;
}

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

.movie-card h3,
.horizontal-card h3,
.category-overview-card h2 {
  margin: 0 0 8px;
  line-height: 1.35;
}

.movie-card h3 {
  font-size: 16px;
}

.movie-card h3 a:hover,
.horizontal-card h3 a:hover,
.side-links a:hover {
  color: #fca5a5;
}

.movie-meta {
  color: #cbd5e1;
  font-size: 13px;
  margin-bottom: 9px;
}

.movie-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

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

.tag-row span {
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-card {
  min-height: 210px;
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transition: 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.62;
}

.category-card span {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.88));
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 24px;
}

.category-card em {
  margin-top: 6px;
  color: #cbd5e1;
  font-style: normal;
}

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

.ranking-list.large {
  grid-template-columns: 1fr;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 48px 90px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.list-rank {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.horizontal-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

.horizontal-card p {
  margin: 0 0 8px;
  line-height: 1.65;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.page-hero {
  min-height: 420px;
  padding: 110px 22px 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.page-hero > * {
  max-width: 1080px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.page-hero.small-hero {
  min-height: 360px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(127, 29, 29, 0.72));
}

.page-hero p {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.8;
  margin-top: 18px;
}

.filter-bar {
  margin-bottom: 28px;
  justify-content: space-between;
}

.filter-bar input {
  flex: 1;
}

.filter-bar select {
  min-width: 160px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 20px;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.category-cover-stack img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.detail-hero {
  min-height: 600px;
  padding: 92px 22px 62px;
}

.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  margin-bottom: 18px;
}

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

.detail-one-line {
  font-size: 20px;
  line-height: 1.8;
  max-width: 840px;
}

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

.detail-meta-grid span {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-meta-grid b,
.detail-meta-grid em {
  display: block;
}

.detail-meta-grid b {
  font-size: 22px;
}

.detail-meta-grid em {
  color: #cbd5e1;
  font-style: normal;
  font-size: 12px;
  margin-top: 4px;
}

.player-section {
  max-width: 1240px;
  margin: -34px auto 0;
  padding: 0 22px;
  position: relative;
  z-index: 5;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.42));
  transition: 0.2s ease;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 36px;
  padding-left: 6px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 24px 70px rgba(220, 38, 38, 0.42);
}

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

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

.article-panel,
.side-panel {
  padding: 26px;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.article-panel p {
  font-size: 17px;
  line-height: 1.9;
  margin: 0 0 28px;
}

.side-links {
  display: grid;
  gap: 12px;
}

.side-links a {
  display: block;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.side-links span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.site-footer {
  margin-top: 42px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), #020617);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 22px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

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

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

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: none;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 22px;
  background: var(--red);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.back-top.is-visible {
  display: block;
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 70px;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-stage {
    min-height: 760px;
  }

  .hero-slide {
    padding-bottom: 170px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 40px;
  }

  .hero-control-bar,
  .hero-search,
  .filter-bar,
  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search input,
  .filter-bar input,
  .filter-bar select {
    min-width: 0;
    width: 100%;
  }

  .quick-panel,
  .movie-grid,
  .movie-grid.wide,
  .category-grid,
  .ranking-list,
  .detail-content,
  .footer-grid,
  .category-overview-card,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .movie-grid.wide {
    gap: 14px;
  }

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

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

  .horizontal-card {
    grid-template-columns: 38px 72px minmax(0, 1fr);
    gap: 12px;
  }

  .content-section {
    padding: 52px 16px;
  }
}
