:root {
  color-scheme: dark;
  --bg: #07070b;
  --bg-soft: #11111a;
  --bg-card: rgba(255, 255, 255, 0.075);
  --bg-card-strong: rgba(255, 255, 255, 0.12);
  --text: #f7f7fb;
  --muted: #a8a8b6;
  --line: rgba(255, 255, 255, 0.12);
  --red: #e50914;
  --red-deep: #b00610;
  --orange: #ff8a00;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(229, 9, 20, 0.22), transparent 30%),
    radial-gradient(circle at 80% 12%, rgba(255, 138, 0, 0.14), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 11, 0.72);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 28px rgba(229, 9, 20, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 15px;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: #fff;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 17, 26, 0.95);
}

.mobile-nav a {
  display: block;
  padding: 12px;
  color: var(--muted);
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 560px;
  margin: 28px auto 0;
  border: 1px solid var(--line);
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, #1b0b10, #111827);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
}

.hero-slide.is-active {
  display: block;
  animation: fadeIn 0.6s ease both;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.58) 44%, rgba(0, 0, 0, 0.15) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 48%);
}

.hero-slide.image-missing::before,
.poster-wrap.image-missing::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.14), transparent 26%),
    linear-gradient(135deg, rgba(229, 9, 20, 0.72), rgba(12, 12, 18, 0.88) 52%, rgba(255, 138, 0, 0.42));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  bottom: clamp(42px, 9vw, 92px);
  width: min(680px, calc(100% - 48px));
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(229, 9, 20, 0.84);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions,
.player-toolbar,
.filter-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.ghost-button,
.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  cursor: pointer;
}

.ghost-button,
.section-more,
.text-link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

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

.hero-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  font-size: 28px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
}

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

.stats-strip,
.content-section,
.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card,
.category-tile,
.category-overview-card,
.player-card,
.detail-article,
.detail-side,
.movie-card {
  border: 1px solid var(--line);
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.stat-card {
  padding: 22px;
  border-radius: 22px;
}

.stat-card span,
.movie-meta-line,
.player-toolbar span,
.detail-side dt,
.category-tile small {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

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

.section-header h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

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

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.search-box input,
.filter-controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  outline: none;
}

.search-box input {
  padding: 0 14px;
}

.filter-controls select {
  padding: 0 36px 0 12px;
}

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

.movie-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 9, 20, 0.45);
  background: var(--bg-card-strong);
}

.movie-card.is-hidden {
  display: none;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #161620;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
}

.play-chip {
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.66);
  text-align: center;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 50px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

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

.category-tile {
  min-height: 180px;
  padding: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(229, 9, 20, 0.22), transparent 44%),
    var(--bg-card);
}

.category-tile span,
.category-tile strong,
.category-tile small {
  display: block;
}

.category-tile span {
  font-size: 19px;
  font-weight: 800;
}

.category-tile strong {
  margin: 10px 0;
  font-size: 32px;
}

.category-tile p {
  min-height: 68px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.ranking-list span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(229, 9, 20, 0.72);
  font-weight: 800;
}

.ranking-list em {
  color: var(--muted);
  font-style: normal;
}

.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 10% 10%, rgba(229, 9, 20, 0.26), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
}

.page-hero {
  padding: clamp(34px, 7vw, 72px);
}

.ranking-hero {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 138, 0, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(229, 9, 20, 0.24), rgba(255, 255, 255, 0.04));
}

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

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 24px;
}

.category-cover-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  min-height: 210px;
}

.category-cover-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.category-overview-card h2 {
  margin: 6px 0 10px;
  font-size: 26px;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(22px, 5vw, 54px);
  padding: clamp(22px, 4vw, 42px);
}

.detail-poster {
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-info {
  align-self: center;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.detail-stats span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.detail-stats strong {
  color: #fff;
}

.player-card {
  padding: 14px;
  border-radius: 28px;
}

.site-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: #000;
}

.player-toolbar {
  justify-content: space-between;
  padding: 14px 4px 2px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.detail-article,
.detail-side {
  border-radius: 24px;
  padding: 24px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-article p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.9;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  margin: 0;
}

.detail-side dd {
  margin: 0;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 54px auto 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-grid strong {
  color: #fff;
  font-size: 20px;
}

.footer-grid div:last-child {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.copyright {
  margin-bottom: 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1.01);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

  .nav-toggle {
    display: block;
  }

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

  .hero-carousel {
    height: 520px;
  }

  .stats-strip,
  .movie-grid,
  .category-grid,
  .ranking-list,
  .category-overview-grid,
  .detail-layout {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-overview-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-carousel {
    height: 620px;
    border-radius: 24px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.42) 100%);
  }

  .hero-controls {
    left: 18px;
    right: 18px;
    justify-content: space-between;
  }

  .stats-strip,
  .movie-grid,
  .category-grid,
  .ranking-list,
  .category-overview-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .section-header,
  .footer-grid {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

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