* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg-0: #14031f;
  --bg-1: #2e064f;
  --bg-2: #4a044e;
  --twilight: #9333ea;
  --twilight-soft: rgba(168, 85, 247, 0.34);
  --dusk: #c026d3;
  --sunset: #f97316;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --faint: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.1);
  --card-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(217, 70, 239, 0.24), transparent 34rem),
    radial-gradient(circle at 82% 16%, rgba(249, 115, 22, 0.18), transparent 30rem),
    linear-gradient(135deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  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 92%);
}

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

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

button,
input {
  font: inherit;
}

.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(59, 7, 100, 0.78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--twilight), var(--dusk));
  box-shadow: 0 0 26px rgba(168, 85, 247, 0.48);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.74);
  border-radius: 10px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.quick-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 34vw);
}

.quick-search input,
.mobile-search input,
.filter-bar input,
.search-strip input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  outline: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 14px;
}

.quick-search input::placeholder,
.mobile-search input::placeholder,
.filter-bar input::placeholder,
.search-strip input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.quick-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.search-strip input:focus {
  border-color: rgba(216, 180, 254, 0.7);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.16);
}

.quick-search button,
.mobile-search button {
  border: 0;
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.hero-carousel {
  position: relative;
  min-height: 78vh;
  margin-top: -72px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.4s ease;
}

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

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

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(20, 3, 31, 1), rgba(20, 3, 31, 0.74) 48%, rgba(20, 3, 31, 0.22)),
    linear-gradient(100deg, rgba(20, 3, 31, 0.85), rgba(20, 3, 31, 0.22) 54%, rgba(20, 3, 31, 0.72));
}

.hero-shade::after,
.detail-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.14), rgba(139, 92, 246, 0.12), transparent 70%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1280px) / 2));
  bottom: 82px;
  width: min(700px, calc(100% - 48px));
  z-index: 2;
}

.eyebrow,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.eyebrow span,
.detail-meta span,
.poster-badge,
.rating-pill,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.62);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.eyebrow span,
.detail-meta span {
  padding: 7px 13px;
  font-weight: 700;
}

.hero-content h1,
.detail-title h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-shadow: 0 0 30px rgba(167, 139, 250, 0.52);
}

.hero-content p,
.page-hero p,
.detail-title p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span,
.hero-tags span {
  padding: 5px 10px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.84rem;
}

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

.btn-primary,
.btn-ghost,
.section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  min-height: 44px;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--twilight), var(--dusk));
  box-shadow: 0 14px 34px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-action:hover {
  transform: translateY(-2px);
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.5);
}

.btn-ghost,
.section-action {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-side {
  position: absolute;
  right: max(24px, calc((100% - 1280px) / 2));
  bottom: 78px;
  z-index: 3;
  width: min(360px, 30vw);
  border-radius: 24px;
  padding: 22px;
}

.hero-side p,
.section-heading p,
.page-hero > div > p:first-child,
.detail-title > p {
  margin: 0 0 6px;
  color: #f0abfc;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-side h2 {
  margin: 0 0 18px;
  font-size: 1.45rem;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.compact-card img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  margin-bottom: 5px;
  line-height: 1.35;
}

.compact-card em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.3;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 4;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: 0.22s ease;
}

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

.search-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -36px auto 54px;
  position: relative;
  z-index: 8;
  border-radius: 24px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(260px, 1fr);
  gap: 22px;
  align-items: center;
}

.search-strip h2 {
  margin: 0 0 8px;
}

.search-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-strip form {
  display: flex;
  gap: 10px;
}

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

.page-shell.narrow {
  width: min(980px, calc(100% - 32px));
}

.content-section {
  margin-bottom: 74px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.4s ease;
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84), transparent 58%);
  opacity: 0.58;
  transition: opacity 0.32s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.08);
  filter: saturate(1.1);
}

.movie-card:hover .poster-link::after {
  opacity: 0.86;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.82);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: 0.25s ease;
}

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

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 700;
}

.rating-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  padding: 5px 8px;
  font-size: 0.74rem;
  background: rgba(0, 0, 0, 0.52);
}

.card-content h2 {
  margin: 13px 0 6px;
  font-size: 1rem;
  line-height: 1.35;
}

.card-content h2 a {
  transition: color 0.2s ease;
}

.movie-card:hover .card-content h2 a {
  color: #d8b4fe;
}

.meta-line,
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 6px;
}

.card-content .tag-list {
  margin-top: 10px;
}

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

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

.category-card {
  display: block;
  min-height: 156px;
  border-radius: 22px;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(249, 115, 22, 0.26), transparent 42%),
    linear-gradient(135deg, rgba(112, 26, 117, 0.58), rgba(107, 33, 168, 0.48));
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(216, 180, 254, 0.52);
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  color: #f0abfc;
  font-size: 1.45rem;
  font-weight: 900;
}

.category-card strong {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 500;
  line-height: 1.7;
}

.page-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: end;
  padding: 96px max(16px, calc((100% - 1280px) / 2)) 54px;
  margin-top: -72px;
  overflow: hidden;
}

.compact-hero {
  background:
    radial-gradient(circle at 20% 16%, rgba(217, 70, 239, 0.26), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(20, 3, 31, 0.58), rgba(74, 4, 78, 0.26));
}

.page-hero > div {
  width: min(840px, 100%);
}

.filter-bar {
  display: grid;
  gap: 14px;
  border-radius: 20px;
  padding: 18px;
  margin: -30px 0 38px;
  position: relative;
  z-index: 2;
}

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

.filter-chips button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  cursor: pointer;
}

.filter-count {
  color: var(--muted);
}

.rank-list {
  display: grid;
  gap: 14px;
  margin: -30px 0 72px;
  position: relative;
  z-index: 2;
}

.rank-row {
  display: grid;
  grid-template-columns: 56px 76px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
}

.rank-index {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--twilight), var(--dusk));
}

.rank-poster img {
  width: 76px;
  height: 104px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.rank-row p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-score {
  color: #fdba74;
  font-size: 1.1rem;
  font-weight: 900;
  white-space: nowrap;
}

.detail-hero {
  position: relative;
  height: 68vh;
  min-height: 460px;
  margin-top: -72px;
  overflow: hidden;
}

.detail-title {
  position: absolute;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  z-index: 3;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

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

.detail-shell {
  margin-top: -34px;
  position: relative;
  z-index: 4;
}

.player-card {
  border-radius: 24px;
  padding: 14px;
  margin-bottom: 34px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-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(147, 51, 234, 0.22), transparent 34%),
    rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--twilight), var(--dusk));
  box-shadow: 0 0 34px rgba(168, 85, 247, 0.52);
  font-size: 2rem;
  padding-left: 4px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
}

.detail-main,
.detail-aside {
  border-radius: 22px;
  padding: 28px;
}

.detail-main h2,
.detail-aside h2 {
  margin: 0 0 16px;
}

.detail-main p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.86;
  margin: 0 0 24px;
}

.detail-main .lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.12rem;
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-aside {
  align-self: start;
  position: sticky;
  top: 96px;
}

.detail-aside dl,
.detail-aside dd {
  margin: 0;
}

.detail-aside div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-aside dt {
  color: var(--muted);
}

.detail-aside dd {
  text-align: right;
  font-weight: 700;
}

.related-section {
  margin-top: 54px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(59, 7, 100, 0.42);
  margin-top: 80px;
  padding: 42px 0 0;
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.footer-grid p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.7;
}

.footer-brand {
  margin-bottom: 14px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 30px auto 0;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-filter-card].is-hidden {
  display: none;
}

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

  .hero-side {
    display: none;
  }

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

@media (max-width: 920px) {
  .desktop-nav,
  .quick-search {
    display: none;
  }

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

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

  .search-strip,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    position: static;
  }

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

@media (max-width: 640px) {
  .nav-shell {
    height: 64px;
  }

  .hero-carousel,
  .detail-hero {
    margin-top: -64px;
  }

  .hero-carousel {
    min-height: 84vh;
  }

  .hero-content {
    bottom: 70px;
  }

  .hero-actions,
  .search-strip form {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 66px 1fr;
  }

  .rank-score {
    grid-column: 2 / 4;
  }

  .detail-title h1,
  .page-hero h1,
  .hero-content h1 {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }

  .detail-main,
  .detail-aside,
  .category-card {
    padding: 20px;
  }
}
