:root {
  --night-950: #050711;
  --night-900: #080b18;
  --night-850: #0c1022;
  --night-800: #10162b;
  --silver-900: #111827;
  --silver-800: #1e293b;
  --silver-700: #334155;
  --silver-500: #64748b;
  --silver-400: #94a3b8;
  --silver-300: #cbd5e1;
  --silver-200: #e2e8f0;
  --moonlight-700: #3438c7;
  --moonlight-600: #4c51e8;
  --moonlight-500: #6172f3;
  --moonlight-400: #8da2fb;
  --moonlight-300: #a5bbfc;
  --rose: #f472b6;
  --gold: #facc15;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 18px 50px rgba(97, 114, 243, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(97, 114, 243, 0.24), transparent 34rem),
    radial-gradient(circle at 85% 12%, rgba(244, 114, 182, 0.16), transparent 30rem),
    linear-gradient(180deg, var(--night-950), var(--night-900) 42%, #060813);
  color: var(--silver-200);
  min-height: 100vh;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 7, 17, 0.78);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  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(--moonlight-500), var(--rose));
  box-shadow: var(--shadow-glow);
  font-size: 15px;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--silver-300);
  padding: 10px 15px;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(97, 114, 243, 0.18);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.7);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

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

.hero {
  width: min(1440px, calc(100% - 24px));
  margin: 22px auto 0;
  min-height: 650px;
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: #050711;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 92px min(7vw, 88px) 70px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 17, 0.96), rgba(5, 7, 17, 0.72) 42%, rgba(5, 7, 17, 0.25)),
    linear-gradient(0deg, rgba(5, 7, 17, 0.96), transparent 48%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(1.08);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--moonlight-300);
  background: rgba(97, 114, 243, 0.16);
  border: 1px solid rgba(141, 162, 251, 0.25);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  margin: 0 0 22px;
  max-width: 850px;
  font-weight: 900;
}

.hero p {
  color: var(--silver-200);
  font-size: clamp(17px, 2vw, 22px);
  max-width: 780px;
  margin: 0 0 24px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.08);
  color: var(--silver-200);
  border: 1px solid rgba(226, 232, 240, 0.10);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--moonlight-500), var(--moonlight-700));
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(226, 232, 240, 0.09);
  border: 1px solid rgba(226, 232, 240, 0.13);
}

.hero-search,
.search-panel {
  display: flex;
  gap: 10px;
  max-width: 620px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 8px;
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-panel input {
  flex: 1;
  min-width: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0 14px;
}

.hero-search input::placeholder,
.search-panel input::placeholder {
  color: var(--silver-400);
}

.hero-search button,
.search-panel button {
  color: #ffffff;
  background: var(--moonlight-600);
  border-radius: 999px;
  padding: 10px 18px;
}

.hero-poster {
  justify-self: end;
  width: min(360px, 34vw);
  transform: rotate(3deg);
  filter: drop-shadow(0 30px 55px rgba(0, 0, 0, 0.55));
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: min(7vw, 88px);
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  backdrop-filter: blur(16px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  padding: 0;
  opacity: 0.48;
}

.hero-dot.active {
  width: 32px;
  opacity: 1;
  background: var(--moonlight-500);
}

.section {
  padding: 64px 0;
}

.section.alt {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: rgba(17, 24, 39, 0.32);
}

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

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

.section-kicker {
  color: var(--moonlight-300);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-title,
.page-title {
  color: #ffffff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.035em;
}

.section-desc,
.page-desc {
  color: var(--silver-400);
  margin: 10px 0 0;
  max-width: 780px;
}

.more-link {
  color: var(--moonlight-300);
  font-weight: 700;
  white-space: nowrap;
}

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

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

.movie-card {
  display: block;
  background: rgba(30, 41, 59, 0.32);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  scroll-snap-align: start;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(141, 162, 251, 0.45);
  box-shadow: var(--shadow-glow);
  background: rgba(30, 41, 59, 0.48);
}

.poster-wrap {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(97, 114, 243, 0.28), rgba(15, 23, 42, 0.5));
}

.movie-card.square .poster-wrap {
  aspect-ratio: 1 / 1;
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent);
}

.duration-badge,
.play-badge {
  position: absolute;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(10px);
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 8px;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  padding: 16px;
}

.movie-title {
  color: #ffffff;
  display: block;
  font-weight: 800;
  line-height: 1.35;
  min-height: 2.7em;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
  color: var(--moonlight-300);
}

.movie-desc {
  color: var(--silver-400);
  font-size: 14px;
  margin: 8px 0 14px;
  min-height: 3.2em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--silver-500);
  font-size: 13px;
}

.movie-meta a {
  color: var(--moonlight-300);
}

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

.category-card {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(97, 114, 243, 0.16), rgba(15, 23, 42, 0.72));
  border: 1px solid rgba(141, 162, 251, 0.17);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(141, 162, 251, 0.55);
  box-shadow: var(--shadow-glow);
}

.category-card img {
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 125px;
  height: 125px;
  border-radius: 28px;
  object-fit: cover;
  opacity: 0.38;
  transform: rotate(8deg);
}

.category-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  font-weight: 900;
}

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

.category-body strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 6px;
}

.category-body em {
  display: block;
  color: var(--silver-400);
  font-style: normal;
  font-size: 14px;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.list-card {
  display: grid;
  grid-template-columns: 52px 88px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.list-card:hover {
  background: rgba(30, 41, 59, 0.48);
  transform: translateX(4px);
}

.rank-num {
  color: var(--gold);
  font-weight: 900;
  font-size: 20px;
  text-align: center;
}

.list-card img {
  width: 88px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(97, 114, 243, 0.16);
}

.list-content strong {
  display: block;
  color: #ffffff;
}

.list-content em {
  display: block;
  color: var(--silver-400);
  font-style: normal;
  font-size: 13px;
}

.list-tag {
  color: var(--moonlight-300);
  font-size: 13px;
}

.page-hero {
  padding: 70px 0 34px;
}

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

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

.filter-bar {
  display: grid;
  gap: 18px;
  margin: 26px 0 34px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.filter-chip {
  color: var(--silver-200);
  background: rgba(226, 232, 240, 0.07);
  border: 1px solid rgba(226, 232, 240, 0.11);
  border-radius: 999px;
  padding: 8px 13px;
}

.filter-chip.active {
  color: #ffffff;
  background: rgba(97, 114, 243, 0.34);
  border-color: rgba(141, 162, 251, 0.5);
}

.empty-state {
  display: none;
  color: var(--silver-400);
  text-align: center;
  padding: 48px 0;
}

.empty-state.show {
  display: block;
}

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

.player-card,
.detail-panel,
.content-panel {
  background: rgba(30, 41, 59, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
}

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

.video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  background:
    radial-gradient(circle, rgba(97, 114, 243, 0.2), transparent 30%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.12));
  z-index: 2;
}

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

.play-mark {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--moonlight-500), var(--rose));
  box-shadow: var(--shadow-glow);
  font-size: 32px;
  padding-left: 5px;
}

.player-caption {
  padding: 18px 20px;
}

.player-caption h1 {
  color: #ffffff;
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.info-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--silver-400);
  font-size: 14px;
}

.detail-panel {
  padding: 18px;
  position: sticky;
  top: 96px;
}

.detail-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(97, 114, 243, 0.14);
  margin-bottom: 16px;
}

.detail-list {
  display: grid;
  gap: 10px;
  color: var(--silver-300);
  font-size: 14px;
}

.detail-list span {
  color: var(--silver-500);
  margin-right: 8px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.content-panel {
  padding: 26px;
  margin-bottom: 28px;
}

.content-panel h2 {
  color: #ffffff;
  font-size: 24px;
  margin: 0 0 14px;
}

.content-panel p {
  margin: 0;
  color: var(--silver-300);
}

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

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.prev-next a {
  flex: 1;
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--silver-200);
  background: rgba(30, 41, 59, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.is-hidden {
  display: none !important;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid rgba(148, 163, 184, 0.13);
  background: rgba(5, 7, 17, 0.58);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  color: var(--silver-400);
  max-width: 680px;
  margin: 10px 0 0;
}

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

.footer-links a {
  color: var(--silver-300);
  background: rgba(226, 232, 240, 0.07);
  border-radius: 999px;
  padding: 8px 12px;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  color: var(--silver-500);
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  padding: 18px 0 28px;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .detail-panel {
    position: static;
  }
}

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

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    padding: 14px;
    border-radius: 18px;
    background: rgba(5, 7, 17, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.16);
  }

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

  .nav-link {
    width: 100%;
  }

  .hero {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 72px 24px 86px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-search,
  .search-panel {
    border-radius: 24px;
    flex-direction: column;
  }

  .hero-search button,
  .search-panel button {
    width: 100%;
  }

  .hero-controls {
    left: 24px;
    right: auto;
    bottom: 26px;
  }

  .section {
    padding: 46px 0;
  }

  .section-head {
    display: block;
  }

  .more-link {
    display: inline-flex;
    margin-top: 12px;
  }

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

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

  .list-card {
    grid-template-columns: 44px 74px 1fr;
  }

  .list-card img {
    width: 74px;
    height: 50px;
  }

  .list-tag {
    display: none;
  }

  .footer-inner {
    display: block;
  }

  .footer-links {
    margin-top: 20px;
  }

  .prev-next {
    display: block;
  }

  .prev-next a {
    display: block;
    margin-bottom: 10px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-row {
    grid-auto-columns: 82%;
  }

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

  .page,
  .section-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1240px);
  }
}
