* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #64748b;
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.16);
  --orange: #fb923c;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(239, 68, 68, 0.16), transparent 34rem),
    radial-gradient(circle at 86% 12%, rgba(251, 146, 60, 0.12), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.nav-shell {
  max-width: 1280px;
  height: 76px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: white;
  box-shadow: 0 0 32px rgba(239, 68, 68, 0.38);
  font-size: 14px;
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-link,
.nav-dropdown button {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font: inherit;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 0;
}

.nav-link:hover,
.nav-link.is-active,
.nav-dropdown button:hover {
  color: white;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 34px;
  right: 0;
  width: 168px;
  padding: 10px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .dropdown-menu {
  display: grid;
}

.dropdown-menu a {
  padding: 10px 12px;
  color: #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: var(--red-soft);
  color: white;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.filter-input,
.filter-select {
  min-width: 220px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  outline: none;
  padding: 11px 15px;
}

.top-search button,
.hero-button,
.action-button,
.filter-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), #f97316);
  color: white;
  font-weight: 800;
  padding: 11px 18px;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.24);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  font-size: 20px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

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

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
}

.page-main {
  padding-top: 76px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.42) 100%),
    radial-gradient(circle at 72% 22%, rgba(239, 68, 68, 0.28), transparent 30rem);
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 680ms ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) brightness(0.8);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 640px;
  margin: 0 auto;
  padding: 84px 22px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: 44px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.28);
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.page-title h1 {
  margin: 18px 0 18px;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero p,
.page-title p {
  max-width: 780px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.action-button.is-ghost,
.hero-button.is-ghost {
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero-panel {
  padding: 18px;
  border: 1px solid rgba(248, 250, 252, 0.16);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.54);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-feature {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.hero-feature img {
  width: 130px;
  height: 170px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-feature h2 {
  margin: 8px 0 8px;
  font-size: 24px;
}

.hero-feature p {
  font-size: 14px;
  line-height: 1.7;
}

.hero-pills,
.tag-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-pills span,
.tag-row span,
.meta-row span {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 12px;
}

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

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

.hero-dots button.is-active {
  background: var(--red);
}

.section,
.page-title,
.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px;
}

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

.section-heading h2,
.page-title h1,
.detail-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.035em;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(15, 23, 42, 0.86);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.9), transparent 55%);
}

.play-badge {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: 50%;
  opacity: 0;
  background: rgba(239, 68, 68, 0.9);
  box-shadow: 0 18px 48px rgba(239, 68, 68, 0.38);
  transition: 220ms ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.corner-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.88);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  min-height: 2.7em;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #f87171;
}

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 164px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 0%, rgba(239, 68, 68, 0.24), transparent 55%),
    rgba(15, 23, 42, 0.64);
}

.category-tile strong {
  display: block;
  font-size: 22px;
  margin-bottom: 10px;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.7;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 90px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.rank-item:hover {
  border-color: rgba(239, 68, 68, 0.55);
}

.rank-num {
  font-size: 23px;
  font-weight: 900;
  color: #fca5a5;
}

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

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

.rank-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
}

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

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
}

.player-panel {
  overflow: hidden;
}

.player-box {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.12)),
    transparent;
  color: white;
  cursor: pointer;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), #f97316);
  box-shadow: 0 22px 60px rgba(239, 68, 68, 0.38);
  font-size: 28px;
  padding-left: 5px;
}

.player-box.is-playing .player-overlay {
  display: none;
}

.detail-content {
  padding: 28px;
}

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

.breadcrumb a:hover {
  color: white;
}

.detail-title {
  margin-bottom: 16px;
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 13px;
}

.prose {
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 16px;
}

.prose h2 {
  margin-top: 28px;
  color: white;
  font-size: 22px;
}

.side-card {
  padding: 18px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.related-item:hover {
  border-color: rgba(239, 68, 68, 0.48);
}

.related-item img {
  width: 94px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}

.related-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.76);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 22px;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.6fr;
  gap: 26px;
}

.footer-brand {
  font-size: 22px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 6px 0;
}

.site-footer a:hover {
  color: white;
}

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

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

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

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

  .detail-grid,
  .rank-layout,
  .hero-content {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .nav-shell {
    height: 68px;
  }

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

  .page-main {
    padding-top: 68px;
  }

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

  .hero-content {
    padding-top: 62px;
  }

  .hero-feature {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .hero-feature img {
    width: 92px;
    height: 124px;
    border-radius: 16px;
  }

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

  .section-heading,
  .footer-grid {
    display: block;
  }

  .rank-item {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .rank-item img {
    width: 72px;
    height: 54px;
  }
}
