
:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --red: #ef4444;
  --red-dark: #991b1b;
  --red-soft: rgba(239, 68, 68, 0.14);
  --amber: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(239, 68, 68, 0.22), transparent 34rem),
    radial-gradient(circle at 80% 8%, rgba(248, 113, 113, 0.15), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #020617 42%, #020617 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 72%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 21px;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626 50%, #7f1d1d);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.32);
  font-size: 13px;
}

.desktop-nav,
.desktop-categories {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-nav {
  margin-left: auto;
}

.desktop-nav a,
.desktop-categories a,
.mobile-nav a {
  color: var(--soft);
  padding: 9px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-categories a:hover,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.16);
  transform: translateY(-1px);
}

.desktop-categories {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 28px auto 0;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, 0.2);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(127, 29, 29, 0.42));
  box-shadow: var(--shadow);
}

.hero-glow {
  position: absolute;
  inset: auto -18% -32% 35%;
  height: 360px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.32), transparent 65%);
  pointer-events: none;
}

.hero-slides {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.72fr);
  gap: 32px;
  align-items: center;
  padding: 76px 70px 96px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-image-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.7), rgba(15, 23, 42, 0.24)),
    var(--hero-image),
    radial-gradient(circle at 74% 26%, rgba(248, 113, 113, 0.2), transparent 26rem),
    linear-gradient(135deg, #111827, #450a0a);
  background-size: cover, cover, cover, cover;
  background-position: center;
  filter: saturate(1.1);
  transform: scale(1.04);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

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

.hero h1,
.hero h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.hero-summary {
  max-width: 700px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-cloud span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 14px 34px rgba(239, 68, 68, 0.36);
}

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.ghost-button {
  color: #fecaca;
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

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

.hero-poster {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 15%, rgba(248, 113, 113, 0.32), transparent 15rem),
    linear-gradient(145deg, #1e293b, #450a0a);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.56);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-dots {
  position: absolute;
  left: 70px;
  bottom: 36px;
  z-index: 2;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.34);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: #ef4444;
}

.hero-category-strip {
  position: absolute;
  right: 36px;
  bottom: 28px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 520px;
}

.hero-category-strip a {
  color: #fecaca;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}

main,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-panel,
.page-hero,
.detail-hero,
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.section-panel {
  margin-top: 28px;
  padding: clamp(22px, 4vw, 36px);
}

.intro-panel {
  margin-top: 28px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.content-card h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p:not(.eyebrow),
.page-hero p:not(.eyebrow),
.content-card p {
  color: var(--muted);
  line-height: 1.85;
}

.row-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.text-link {
  color: #fca5a5;
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
  gap: 12px;
  margin-bottom: 24px;
}

.search-box,
.select-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.42);
}

.search-box span,
.select-box span {
  color: #fca5a5;
  font-weight: 800;
}

.search-box input,
.select-box select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.select-box select option {
  color: #0f172a;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 113, 113, 0.54);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.poster,
.detail-cover {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.72)),
    var(--cover-image),
    radial-gradient(circle at 50% 20%, rgba(239, 68, 68, 0.28), transparent 11rem),
    linear-gradient(145deg, #1e293b, #450a0a);
  background-size: cover, cover, cover, cover;
  background-position: center;
}

.poster {
  aspect-ratio: 3 / 4;
}

.poster img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.card-body {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.card-body h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.card-meta {
  gap: 6px;
}

.card-meta span {
  color: #fecaca;
  font-size: 12px;
}

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(69, 10, 10, 0.28));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 113, 113, 0.46);
}

.category-icon,
.category-title-link span {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #7f1d1d);
  font-weight: 900;
}

.category-card strong,
.category-title-link strong {
  font-size: 19px;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.category-card em {
  color: #fca5a5;
  font-style: normal;
  font-size: 13px;
}

.category-title-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-links {
  display: grid;
  gap: 8px;
}

.mini-links a {
  color: #fecaca;
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.32);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(239, 68, 68, 0.12);
  transform: translateX(4px);
}

.rank-number {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  font-weight: 900;
}

.rank-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-main,
.detail-main {
  padding-top: 24px;
}

.page-hero {
  padding: clamp(28px, 6vw, 56px);
  background:
    radial-gradient(circle at 82% 20%, rgba(239, 68, 68, 0.22), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(69, 10, 10, 0.36));
}

.page-hero p {
  max-width: 760px;
}

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

.breadcrumb a {
  color: #fca5a5;
}

.detail-hero {
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  gap: 24px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(69, 10, 10, 0.28));
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(248, 113, 113, 0.24);
  background:
    radial-gradient(circle at 50% 20%, rgba(239, 68, 68, 0.18), transparent 22rem),
    linear-gradient(135deg, #020617, #111827 55%, #450a0a);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-card.player-active .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 18px 38px rgba(239, 68, 68, 0.36);
  font-size: 25px;
  padding-left: 4px;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 2;
  margin: 0;
  color: #fecaca;
  font-size: 13px;
}

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

.detail-cover {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-one-line {
  color: #dbeafe;
  line-height: 1.85;
  font-size: 17px;
}

.detail-meta {
  margin: 18px 0;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

.content-card {
  padding: clamp(22px, 3vw, 32px);
}

.content-card p {
  margin-bottom: 0;
}

.related-section {
  margin-bottom: 30px;
}

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

.footer-grid,
.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 38px 0 26px;
}

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

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

.site-footer p {
  line-height: 1.8;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: auto;
    border-radius: 26px;
  }

  .hero-slides {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 48px 26px 112px;
  }

  .hero-poster {
    max-width: 240px;
    transform: none;
  }

  .hero-dots {
    left: 26px;
    bottom: 70px;
  }

  .hero-category-strip {
    left: 26px;
    right: 26px;
    bottom: 22px;
    justify-content: flex-start;
  }

  .row-heading,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

@media (max-width: 620px) {
  .nav-shell {
    width: min(100% - 22px, 1180px);
    height: 66px;
  }

  .brand {
    font-size: 18px;
  }

  main,
  .page-main,
  .detail-main,
  .hero,
  .footer-grid,
  .footer-bottom,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .section-panel,
  .page-hero {
    border-radius: 20px;
  }

  .section-panel {
    padding: 18px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 14px;
  }

  .card-body p {
    display: none;
  }

  .detail-cover {
    max-width: 190px;
  }
}
