:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-strong: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --muted-light: #cbd5e1;
  --text: #f8fafc;
  --red: #ef4444;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --amber: #f59e0b;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.18), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #020617 42%, #0f172a 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.image-fallback {
  opacity: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 32px rgba(239, 68, 68, 0.35);
  font-size: 15px;
}

.brand-text {
  font-size: clamp(20px, 2vw, 28px);
  background: linear-gradient(90deg, #fb7185, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link {
  height: 72px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--red);
  border-color: var(--red);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 99px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 14px 24px 20px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-link {
  display: block;
  padding: 12px 0;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slides,
.hero-slide {
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 860px;
}

.hero-badges,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges span,
.detail-meta span,
.tag-row span,
.footer-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fee2e2;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.24);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 920px;
  margin: 20px 0 10px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.08em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 44px);
  color: #fecaca;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2.1vw, 24px);
}

.hero-actions,
.detail-copy .btn {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.34);
}

.btn.ghost {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

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

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

.hero-dot.active {
  width: 30px;
  background: #f97316;
}

.hero-thumbs {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 34px;
  display: grid;
  grid-template-columns: repeat(5, 124px);
  gap: 12px;
}

.hero-thumb {
  min-height: 80px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.hero-thumb img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  opacity: 0.82;
}

.hero-thumb span {
  display: block;
  overflow: hidden;
  padding: 8px 10px 10px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.slate-band,
.rank-band {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.66), rgba(30, 41, 59, 0.56));
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.section-kicker {
  color: #fb7185;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 900;
}

.section-head h2,
.page-hero h1,
.detail-copy h1,
.article-panel h2,
.side-panel h2 {
  margin: 4px 0 0;
  letter-spacing: -0.05em;
  line-height: 1.12;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-head p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more {
  color: #fb7185;
  font-weight: 800;
}

.section-more:hover {
  color: #fdba74;
}

.movie-grid,
.small-grid,
.category-grid,
.overview-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

.movie-card,
.category-tile,
.overview-card,
.rank-item,
.article-panel,
.side-panel,
.player-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.movie-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-tile:hover,
.overview-card:hover,
.rank-item:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 113, 113, 0.45);
  box-shadow: var(--shadow);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-poster {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.movie-card-compact .movie-poster {
  height: 150px;
}

.movie-poster img,
.category-tile img,
.overview-covers img,
.rank-link img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.movie-card:hover .movie-poster img,
.category-tile:hover img,
.overview-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 62%);
}

.poster-badge,
.poster-year {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  left: 12px;
  background: rgba(220, 38, 38, 0.88);
}

.poster-year {
  right: 12px;
  background: rgba(2, 6, 23, 0.72);
}

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

.card-meta {
  overflow: hidden;
  color: #fda4af;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card h2 {
  overflow: hidden;
  margin: 6px 0 8px;
  color: white;
  font-size: 20px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-tile,
.overview-card {
  position: relative;
  min-height: 230px;
  display: flex;
  align-items: end;
  padding: 20px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.88), rgba(15, 23, 42, 0.92));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.34;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent);
}

.category-tile div {
  position: relative;
  z-index: 2;
}

.category-tile h2,
.overview-card h2 {
  margin: 0 0 8px;
  font-size: 25px;
}

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

.overview-card {
  min-height: auto;
  display: block;
  padding: 0;
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  height: 190px;
  overflow: hidden;
}

.overview-covers img {
  min-width: 0;
}

.overview-copy {
  padding: 22px;
}

.overview-copy span {
  color: #fb7185;
  font-size: 12px;
  font-weight: 900;
}

.search-panel {
  position: sticky;
  top: 88px;
  z-index: 8;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  padding: 0 54px 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  color: white;
  outline: none;
  background: rgba(2, 6, 23, 0.68);
}

.search-box input:focus {
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.14);
}

.search-box span {
  position: absolute;
  right: 18px;
  top: 50%;
  color: #fb7185;
  font-size: 24px;
  transform: translateY(-50%);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
}

.filter-chip.active,
.filter-chip:hover {
  color: white;
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(239, 68, 68, 0.28);
}

.empty-state {
  margin: 16px 0 0;
  color: #fecaca;
  font-weight: 700;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.25), transparent 32rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.68));
}

.page-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
}

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

.page-hero h1 {
  max-width: 820px;
  margin-top: 10px;
  font-size: clamp(38px, 6vw, 64px);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.detail-hero {
  background-size: cover;
  background-position: center;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 42px;
  align-items: center;
  padding: 54px 0;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: linear-gradient(135deg, #111827, #7f1d1d);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-copy h1 {
  max-width: 840px;
  margin: 16px 0;
  font-size: clamp(38px, 5vw, 68px);
}

.detail-one-line {
  max-width: 850px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.detail-meta {
  margin-bottom: 14px;
}

.detail-tags {
  margin-bottom: 26px;
}

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

.main-detail {
  display: grid;
  gap: 28px;
}

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

.player-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: white;
  text-align: center;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.18), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 4px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 16px 42px rgba(239, 68, 68, 0.45);
  font-size: 30px;
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  z-index: 3;
  margin: 0;
  color: #fecaca;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.article-panel,
.side-panel {
  padding: 28px;
}

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

.article-panel p {
  margin: 0 0 24px;
  color: var(--muted-light);
  font-size: 17px;
  line-height: 1.9;
}

.article-panel p:last-child {
  margin-bottom: 0;
}

.side-panel {
  position: sticky;
  top: 102px;
}

.side-panel dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.side-panel div {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.side-panel dt {
  color: var(--muted);
  font-size: 13px;
}

.side-panel dd {
  margin: 4px 0 0;
  color: white;
  font-weight: 800;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

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

.rank-link {
  display: grid;
  grid-template-columns: 64px 86px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  color: #fb7185;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.rank-link img {
  width: 86px;
  height: 68px;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.rank-copy h2 {
  overflow: hidden;
  margin: 0 0 6px;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy p {
  display: -webkit-box;
  margin: 0 0 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.rank-copy span {
  color: #fca5a5;
  font-size: 12px;
  font-weight: 800;
}

.text-page .article-panel {
  max-width: 860px;
  margin: 0 auto;
}

.site-footer {
  margin-top: 36px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.98));
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

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

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

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

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

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .listing-grid,
  .small-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-thumbs {
    grid-template-columns: repeat(3, 124px);
  }

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

  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  body.menu-open .mobile-nav {
    display: block;
  }

  .nav-shell {
    height: 64px;
  }

  .hero-carousel,
  .hero-slides,
  .hero-slide,
  .hero-copy {
    min-height: 580px;
  }

  .hero-thumbs {
    display: none;
  }

  .hero-dots {
    bottom: 32px;
  }

  .movie-grid,
  .featured-grid,
  .listing-grid,
  .small-grid,
  .category-grid,
  .overview-grid,
  .home-ranking,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .section-head {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 14px;
  }

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

  .detail-cover {
    width: min(280px, 72vw);
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 20px;
  }

  .content-section,
  .slate-band,
  .rank-band {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .movie-grid,
  .featured-grid,
  .listing-grid,
  .small-grid,
  .category-grid,
  .overview-grid,
  .home-ranking,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .movie-poster {
    height: 245px;
  }

  .rank-link {
    grid-template-columns: 44px 72px 1fr;
    gap: 12px;
  }

  .rank-number {
    font-size: 24px;
  }

  .rank-link img {
    width: 72px;
    height: 58px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-copy h2 {
    font-size: 28px;
  }

  .page-hero {
    min-height: 280px;
  }
}
