:root {
  color-scheme: dark;
  --bg: #05060f;
  --panel: rgba(12, 14, 28, 0.78);
  --panel-strong: rgba(20, 23, 44, 0.92);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #a8b1c2;
  --soft: #d7def0;
  --primary: #ff3d71;
  --primary-2: #7c3aed;
  --accent: #22d3ee;
  --gold: #fbbf24;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 61, 113, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(124, 58, 237, 0.22), transparent 30rem),
    linear-gradient(180deg, #080914 0%, #05060f 42%, #070816 100%);
  line-height: 1.6;
}

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

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

img.is-hidden {
  opacity: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(5, 6, 15, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 32px rgba(255, 61, 113, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

main {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 620px;
  margin: 22px auto 54px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #070816;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.62fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(28px, 6vw, 72px);
  opacity: 0;
  transform: translateX(28px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 6, 15, 0.92), rgba(5, 6, 15, 0.48) 48%, rgba(5, 6, 15, 0.96)),
    var(--hero-image),
    radial-gradient(circle at 75% 25%, rgba(255, 61, 113, 0.34), transparent 30rem),
    radial-gradient(circle at 15% 75%, rgba(34, 211, 238, 0.18), transparent 24rem);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 8% -30% 8%;
  height: 44%;
  background: linear-gradient(90deg, rgba(255, 61, 113, 0.28), rgba(124, 58, 237, 0.22), rgba(34, 211, 238, 0.16));
  filter: blur(72px);
}

.hero-copy,
.hero-poster-wrap {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  font-size: 13px;
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transition: 0.2s ease;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 42px rgba(255, 61, 113, 0.28);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.26);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 61, 113, 0.38), rgba(124, 58, 237, 0.2)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.56);
}

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

.hero-dots {
  position: absolute;
  z-index: 4;
  left: clamp(28px, 6vw, 72px);
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fff;
}

.section {
  margin: 48px 0;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--panel-strong);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.05;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.18), transparent 10rem),
    linear-gradient(135deg, rgba(255, 61, 113, 0.38), rgba(124, 58, 237, 0.28), rgba(34, 211, 238, 0.16));
}

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

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

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.66));
}

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

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.28;
}

.movie-card p {
  min-height: 48px;
  margin: 8px 0 11px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

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

.category-card {
  min-height: 156px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(255, 61, 113, 0.18), transparent 12rem),
    rgba(255, 255, 255, 0.06);
  transition: 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

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

.rank-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
  gap: 22px;
  align-items: start;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-no {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 13px;
  margin: 24px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  color: var(--text);
  background: rgba(3, 5, 14, 0.72);
  padding: 0 13px;
  outline: none;
}

.page-title,
.detail-title {
  margin: 36px 0 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at right, rgba(124, 58, 237, 0.24), transparent 28rem),
    rgba(255, 255, 255, 0.06);
}

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

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

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

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 61, 113, 0.28), transparent 20rem),
    rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 42px rgba(255, 61, 113, 0.34);
  font-size: 30px;
}

.detail-panel,
.text-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  padding: 22px;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4.05;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 61, 113, 0.38), rgba(124, 58, 237, 0.24));
}

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

.meta-table {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.meta-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.meta-row strong {
  color: var(--soft);
}

.text-panel {
  margin-top: 22px;
}

.text-panel h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.text-panel p {
  margin: 0 0 15px;
  color: var(--soft);
}

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

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

.footer-brand {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

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

.empty-state {
  display: none;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

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

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

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

@media (max-width: 860px) {
  .site-header {
    flex-wrap: wrap;
  }

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

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-wrap: wrap;
    overflow: visible;
  }

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero-poster-wrap {
    max-width: 260px;
  }

  .rank-panel,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 520px) {
  main,
  .site-footer {
    width: min(100% - 22px, 1320px);
  }

  .hero {
    min-height: 720px;
    margin-top: 12px;
  }

  .hero-slide {
    padding: 24px;
  }

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

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

  .rank-item span:last-child {
    grid-column: 2;
  }
}
