:root {
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #ef4444;
  --brand-deep: #b91c1c;
  --gold: #fbbf24;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.24), transparent 36rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 34rem),
    var(--page-bg);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1240px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--brand), #f97316 58%, #facc15);
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.34);
}

.logo-text {
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 4px;
}

.nav-links a {
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--soft);
  font-size: 14px;
  transition: 0.22s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.16);
}

.header-search {
  display: flex;
  width: min(280px, 28vw);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 11px 12px 11px 16px;
  color: var(--text);
  background: transparent;
}

.header-search button {
  border: 0;
  padding: 0 15px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.75);
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.page-main {
  padding-bottom: 60px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
  filter: saturate(1.05);
}

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 43%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, var(--page-bg) 0%, rgba(2, 6, 23, 0.2) 54%, rgba(2, 6, 23, 0.86) 100%);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 48px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 92px;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(239, 68, 68, 0.38);
  border-radius: 999px;
  padding: 7px 12px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.36);
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  margin: 18px 0 14px;
  font-size: clamp(36px, 7vw, 78px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.hero-desc {
  max-width: 700px;
  color: #dbeafe;
  font-size: clamp(16px, 1.7vw, 20px);
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.56);
  font-size: 13px;
  white-space: nowrap;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.25);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: linear-gradient(145deg, #1e293b, #7f1d1d);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

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

.hero-poster::after,
.poster-frame::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent);
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: 0.25s ease;
}

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

.section {
  margin-top: 54px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 720px;
  margin-top: 8px;
  color: var(--muted);
}

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

.movie-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.56));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at top, rgba(248, 113, 113, 0.36), transparent 42%),
    linear-gradient(145deg, #111827, #450a0a);
}

.poster-frame.poster-missing::before,
.hero-poster.poster-missing::before,
.detail-poster.poster-missing::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  content: attr(data-title);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
}

.card-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.38;
  font-weight: 850;
}

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

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.44);
}

.rank-num {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-size: 20px;
  font-weight: 950;
}

.rank-title {
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

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

.category-card {
  min-height: 188px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.18), transparent 45%),
    rgba(15, 23, 42, 0.76);
  transition: 0.22s ease;
}

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

.category-name {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.category-count {
  display: inline-flex;
  margin: 14px 0 10px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.category-intro {
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: 64px 0 18px;
}

.page-kicker {
  color: #fecaca;
  font-size: 14px;
  font-weight: 800;
}

.page-title {
  max-width: 900px;
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.page-desc {
  max-width: 820px;
  color: var(--soft);
  font-size: 17px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px auto;
  gap: 12px;
  margin: 26px 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  padding: 12px 13px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.58);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0 12px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  font-weight: 850;
}

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

.detail-poster {
  position: sticky;
  top: 104px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #111827, #450a0a);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--panel-bg);
}

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

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

.detail-title {
  margin: 14px 0 8px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.detail-lead {
  color: #dbeafe;
  font-size: 18px;
}

.info-block {
  margin-top: 26px;
}

.info-block h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.info-block p {
  margin: 0;
  color: var(--soft);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.player-section {
  margin-top: 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, 0.38);
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(239, 68, 68, 0.28), transparent 26%),
    rgba(2, 6, 23, 0.42);
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.28);
  font-size: 18px;
  font-weight: 900;
}

.play-overlay.is-hidden {
  display: none;
}

.player-message {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.empty-state {
  display: none;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 1080px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 880px) {
  .header-inner {
    min-height: 68px;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.96);
  }

  .nav-links.is-open {
    display: flex;
  }

  .header-search {
    width: 42vw;
  }

  .hero-slider {
    min-height: 760px;
  }

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

  .hero-poster,
  .detail-poster {
    width: min(300px, 82vw);
    margin: 0 auto;
  }

  .detail-poster {
    position: relative;
    top: auto;
  }

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

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .container,
  .header-inner,
  .hero-content {
    width: min(100% - 24px, 1240px);
  }

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

  .hero-content {
    gap: 28px;
    padding-top: 96px;
  }

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

  .card-body {
    padding: 12px;
  }

  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .rank-item .pill {
    grid-column: 2;
    width: max-content;
  }

  .detail-panel {
    padding: 20px;
  }
}

@media (max-width: 420px) {
  .grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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