:root {
  color-scheme: dark;
  --bg: #050814;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(17, 24, 39, 0.96);
  --line: rgba(168, 85, 247, 0.22);
  --text: #f8fafc;
  --muted: #aeb8ca;
  --soft: #778299;
  --purple: #9333ea;
  --purple-light: #c084fc;
  --pink: #ec4899;
  --orange: #fb7185;
  --green: #34d399;
  --radius: 24px;
  --shadow: 0 26px 80px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(147, 51, 234, 0.24), transparent 35rem),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.20), transparent 28rem),
    linear-gradient(180deg, #060818 0%, #0b1020 45%, #050814 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--purple-light), #f0abfc, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand {
  font-size: 22px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  box-shadow: 0 14px 38px rgba(147, 51, 234, 0.48);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  padding: 9px 14px;
  border-radius: 14px;
  color: #d7dcea;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.local-filter input,
.filter-bar input,
.search-panel input {
  width: 220px;
  border: 1px solid rgba(192, 132, 252, 0.24);
  outline: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
}

.header-search input:focus,
.mobile-search input:focus,
.local-filter input:focus,
.filter-bar input:focus,
.search-panel input:focus {
  border-color: rgba(216, 180, 254, 0.78);
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.17);
}

.header-search button,
.mobile-search button,
.local-filter button,
.filter-buttons button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  cursor: pointer;
  transition: 0.22s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.local-filter button:hover,
.filter-buttons button:hover,
.search-panel button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(147, 51, 234, 0.28);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 42px;
  height: 42px;
}

.mobile-panel {
  display: none;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1.2s ease, visibility 0.8s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.52) 44%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, #050814 0%, rgba(5, 8, 20, 0.06) 45%, rgba(5, 8, 20, 0.15) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 76vh;
  padding: 112px 24px 96px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-content h1 {
  max-width: 820px;
  margin: 16px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  font-weight: 950;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.62);
}

.hero-content p {
  max-width: 760px;
  color: #dbe4f3;
  font-size: clamp(17px, 2vw, 22px);
  margin: 0 0 30px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  font-size: 13px;
}

.hero-tags span:first-child {
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-color: transparent;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  box-shadow: 0 18px 46px rgba(147, 51, 234, 0.34);
}

.primary-btn.small {
  padding: 10px 16px;
  font-size: 14px;
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  color: #fff;
  font-size: 42px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

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

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

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: 0.22s ease;
}

.hero-dots button.active {
  width: 32px;
  background: #fff;
}

.section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 62px 24px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.text-panel h2 {
  margin: 0;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--purple-light);
  letter-spacing: 0.18em;
}

.section-more {
  color: #f0abfc;
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  min-width: 0;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.82));
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.23);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(216, 180, 254, 0.42);
  box-shadow: 0 24px 58px rgba(88, 28, 135, 0.32);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.85), rgba(15, 23, 42, 0.95));
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.74) 100%);
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 12px 26px rgba(147, 51, 234, 0.45);
}

.rank-mark {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, var(--pink));
}

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

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.1em;
  color: #fff;
  font-weight: 900;
  line-height: 1.35;
}

.movie-meta {
  margin: 8px 0;
  color: var(--purple-light);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.8em;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.tag-row span {
  padding: 4px 8px;
  color: #cbd5e1;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.07);
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(2, 6, 23, 0.86));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 22px;
  font-weight: 950;
}

.category-tile small {
  margin-top: 8px;
  color: #cbd5e1;
}

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

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

.mini-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(168, 85, 247, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.22s ease;
}

.mini-card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 180, 254, 0.42);
}

.mini-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.85), rgba(15, 23, 42, 0.95));
}

.mini-card span {
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  line-height: 1.4;
}

.mini-card small {
  color: var(--soft);
}

.page-hero {
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  padding: 110px 24px 54px;
  background:
    radial-gradient(circle at 16% 22%, rgba(147, 51, 234, 0.45), transparent 26rem),
    radial-gradient(circle at 88% 18%, rgba(236, 72, 153, 0.28), transparent 24rem),
    linear-gradient(135deg, #0f172a, #3b0764 55%, #111827);
  border-bottom: 1px solid var(--line);
}

.page-hero > div {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 66px);
}

.page-hero p {
  max-width: 780px;
  color: #dbe4f3;
  font-size: 18px;
}

.category-overview {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 0.85fr 1.3fr;
  gap: 24px;
  padding: 24px;
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
}

.category-overview-text h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.category-overview-text p {
  color: var(--muted);
  margin: 0 0 20px;
}

.local-filter,
.filter-bar,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(168, 85, 247, 0.18);
}

.local-filter input,
.filter-bar input,
.search-panel input {
  width: min(460px, 100%);
}

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

.filter-buttons button {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  filter: blur(6px);
  transform: scale(1.05);
  background-size: cover;
  background-position: center;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.86)),
    linear-gradient(0deg, var(--bg), transparent 55%);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
  padding: 120px 24px 56px;
}

.detail-poster img {
  width: 280px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.85), rgba(15, 23, 42, 0.95));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #d8b4fe;
  font-weight: 800;
  margin-bottom: 16px;
}

.detail-info h1 {
  max-width: 920px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
}

.detail-line {
  max-width: 860px;
  color: #dbe4f3;
  font-size: 19px;
  margin: 18px 0;
}

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

.watch-section {
  padding-top: 28px;
}

.watch-box {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(168, 85, 247, 0.22);
}

.watch-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.50));
  cursor: pointer;
}

.play-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  font-size: 36px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 24px 56px rgba(147, 51, 234, 0.55);
}

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

.text-panel {
  padding: 30px;
  border-radius: 28px;
  border: 1px solid rgba(168, 85, 247, 0.18);
  background: rgba(15, 23, 42, 0.76);
}

.text-panel h2 {
  font-size: 28px;
  margin: 0 0 12px;
}

.text-panel p {
  color: #d4dbea;
  font-size: 17px;
  margin: 0 0 24px;
}

.next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.next-links a {
  padding: 10px 14px;
  border-radius: 16px;
  color: #f0abfc;
  background: rgba(255, 255, 255, 0.08);
}

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

.compact-card .movie-line {
  -webkit-line-clamp: 2;
  min-height: 3.2em;
}

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

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-inner p {
  max-width: 520px;
  color: var(--muted);
}

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  padding: 18px 24px 28px;
  color: var(--soft);
  text-align: center;
}

[data-filter-hidden="true"] {
  display: none;
}

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

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

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

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

  .header-search {
    display: none;
  }
}

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .hero,
  .hero-content {
    min-height: 68vh;
  }

  .hero-content {
    padding: 92px 18px 84px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 42px 16px;
  }

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

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

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

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

  .detail-wrap {
    grid-template-columns: 1fr;
    padding: 90px 16px 42px;
  }

  .detail-poster img {
    width: 190px;
  }

  .detail-hero {
    min-height: auto;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 34px 16px;
  }
}

@media (max-width: 520px) {
  .hero-content h1 {
    font-size: 38px;
  }

  .movie-grid,
  .rank-grid,
  .related-grid,
  .category-grid,
  .mini-grid,
  .mini-grid.four {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 118px 1fr;
  }

  .poster {
    min-height: 177px;
  }

  .movie-title {
    min-height: auto;
  }

  .movie-line {
    min-height: auto;
  }

  .play-overlay span {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
