:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(239, 68, 68, 0.36);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --red: #ef4444;
  --red-dark: #dc2626;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 24px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(239, 68, 68, 0.12), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(14, 165, 233, 0.10), transparent 28%),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family:
    Inter,
    "PingFang SC",
    "Microsoft YaHei",
    "Hiragino Sans GB",
    Arial,
    sans-serif;
  line-height: 1.7;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(100% - 32px, var(--max));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 0 34px rgba(239, 68, 68, 0.42);
  font-size: 13px;
  padding-left: 2px;
}

.brand-text {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 22px;
}

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

.main-nav > a,
.nav-dropdown > button {
  color: var(--muted-strong);
  border: 0;
  padding: 8px 0;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.main-nav > a:hover,
.nav-dropdown > button:hover,
.mobile-panel a:hover {
  color: #ffffff;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  width: 220px;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
  transition: all 0.22s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-dropdown-panel a {
  color: var(--muted-strong);
  padding: 9px 12px;
  border-radius: 12px;
}

.nav-dropdown-panel a:hover {
  background: rgba(239, 68, 68, 0.14);
  color: #ffffff;
}

.site-search-form {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(340px, 35vw);
}

.site-search-form input,
.filter-bar input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.62);
  color: #ffffff;
  border-radius: 999px;
  outline: 0;
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search-form input:focus,
.filter-bar input:focus {
  border-color: rgba(239, 68, 68, 0.72);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.site-search-form button,
.primary-btn,
.secondary-btn,
.player-button {
  border: 0;
  color: #ffffff;
  background: var(--red);
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.site-search-form button:hover,
.primary-btn:hover,
.player-button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.secondary-btn {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.secondary-btn:hover {
  background: rgba(30, 41, 59, 0.88);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 999px;
}

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

.mobile-panel a {
  display: block;
  color: var(--muted-strong);
  padding: 10px 12px;
  border-radius: 12px;
}

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

.page-main {
  min-height: 70vh;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.32) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.10) 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--max));
  min-height: 600px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 0 0 78px;
}

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

.kicker,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.hero-copy p {
  margin: 0;
  max-width: 650px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2.1vw, 20px);
}

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

.hero-controls {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.hero-arrow {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 26px;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

.hero-dots {
  pointer-events: auto;
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

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

.hero-dot.is-active {
  width: 28px;
  background: #ffffff;
}

.section,
.page-section {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 64px 0;
}

.section + .section,
.page-section + .page-section {
  padding-top: 12px;
}

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

.section-title h2,
.page-head h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.05em;
  line-height: 1.15;
}

.section-title p,
.page-head p,
.category-intro,
.detail-lead {
  color: var(--muted);
  margin: 8px 0 0;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.54);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

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

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(239, 68, 68, 0.18), transparent 28%),
    linear-gradient(135deg, #0f172a, #020617);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.06);
  filter: brightness(1.07);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 60%);
}

.play-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.play-badge {
  left: 12px;
  bottom: 12px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.92);
}

.year-badge {
  right: 12px;
  top: 12px;
  color: var(--muted-strong);
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.20);
}

.card-body {
  display: block;
  padding: 18px;
}

.card-body strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
  min-height: 48px;
}

.card-desc {
  display: -webkit-box;
  min-height: 47px;
  margin-top: 9px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta em,
.rank-meta span,
.detail-chip,
.filter-chip {
  font-style: normal;
  color: var(--muted-strong);
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}

.compact .card-body strong {
  min-height: 0;
  font-size: 16px;
}

.compact .card-desc {
  display: none;
}

.category-card {
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(239, 68, 68, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.48));
  padding: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 68, 68, 0.52);
}

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

.category-card p {
  color: var(--muted);
  margin: 10px 0 20px;
  font-size: 14px;
}

.category-card span {
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 26px;
}

.panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
  padding: 26px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.20);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 132px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  align-items: center;
}

.rank-num {
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.08em;
  text-align: center;
}

.rank-cover {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-title {
  display: inline-block;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
}

.rank-info p {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted-strong);
}

.filter-chip.is-active {
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.50);
  background: rgba(239, 68, 68, 0.20);
}

.empty-state {
  display: none;
  color: var(--muted);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.54);
}

.empty-state.is-visible {
  display: block;
}

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

.breadcrumb a {
  color: var(--muted-strong);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  padding: 48px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 34px;
  background:
    radial-gradient(circle at 25% 15%, rgba(239, 68, 68, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.70));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #0f172a;
}

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

.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #000000;
  box-shadow: var(--shadow);
}

.player-panel video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(239, 68, 68, 0.18), transparent 28%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.30));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-button {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  font-size: 28px;
  padding-left: 23px;
  box-shadow: 0 0 42px rgba(239, 68, 68, 0.44);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.article-body {
  display: grid;
  gap: 22px;
  color: var(--muted-strong);
}

.article-body h2 {
  color: #ffffff;
  margin: 0;
  font-size: 25px;
}

.article-body p {
  margin: 0;
}

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

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

.footer-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1.2fr;
  gap: 28px;
}

.footer-brand p {
  color: var(--muted);
  max-width: 420px;
  margin: 14px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-content: start;
}

.footer-links a {
  color: var(--muted-strong);
  font-size: 14px;
}

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

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

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

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

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

  .split-layout,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .detail-hero {
    padding: 24px;
  }

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

@media (max-width: 620px) {
  .header-inner {
    height: 66px;
  }

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

  .mobile-panel.is-open {
    grid-template-columns: 1fr;
  }

  .hero-carousel,
  .hero-content {
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 74px;
  }

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

  .section,
  .page-section {
    padding: 42px 0;
  }

  .section-head,
  .page-head,
  .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 44px 88px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .rank-title {
    font-size: 16px;
  }

  .rank-info p {
    display: none;
  }

  .detail-copy h1 {
    font-size: 34px;
  }

  .player-button {
    width: 72px;
    height: 72px;
    font-size: 23px;
    padding-left: 19px;
  }
}
