* {
  box-sizing: border-box;
}

:root {
  --purple-900: #211044;
  --purple-800: #3b1678;
  --purple-700: #5b21b6;
  --purple-600: #7c3aed;
  --pink-600: #db2777;
  --pink-500: #ec4899;
  --rose-50: #fff1f8;
  --purple-50: #faf5ff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(124, 58, 237, 0.16);
  --shadow: 0 24px 60px rgba(88, 28, 135, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #faf5ff 0%, #fff1f8 48%, #ffffff 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #7c3aed 0%, #db2777 54%, #a855f7 100%);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.28);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand:hover {
  transform: scale(1.03);
}

.brand-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-text {
  background: linear-gradient(90deg, #ffffff, #ede9fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  width: 190px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 42px 0 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
  transition: width 0.25s ease, background 0.25s ease;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.header-search input:focus {
  width: 250px;
  background: rgba(255, 255, 255, 0.26);
}

.header-search button {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

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

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

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-search input {
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 12px;
}

.mobile-search button {
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  color: #7c3aed;
  background: #ffffff;
  font-weight: 700;
}

.mobile-nav {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  padding: 12px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(30, 11, 68, 0.55) 45%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(760px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  text-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  box-shadow: 0 16px 30px rgba(236, 72, 153, 0.32);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.ghost-button.dark {
  color: var(--purple-700);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-50%) scale(1.06);
}

.hero-control.prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-control.next {
  right: 24px;
  transform: translateY(-50%);
}

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

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

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

.section-block {
  padding: 54px 0;
}

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

.heading-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.heading-left h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  color: #1f2937;
}

.heading-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, #7c3aed, #ec4899);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.28);
}

.section-heading a {
  color: var(--purple-700);
  font-weight: 800;
}

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

.category-card,
.category-overview-card a {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f3e8ff 0%, #ffe4f3 100%);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.category-card:hover,
.category-overview-card a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #ede9fe 0%, #fbcfe8 100%);
}

.category-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
}

.category-card strong,
.category-overview-card span {
  font-size: 19px;
  color: #22223a;
}

.category-card em,
.category-overview-card strong {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.6;
}

.category-overview-card em {
  color: var(--purple-700);
  font-style: normal;
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

.three-cols {
  grid-template-columns: repeat(3, 1fr);
}

.five-cols {
  grid-template-columns: repeat(5, 1fr);
}

.six-cols {
  grid-template-columns: repeat(6, 1fr);
}

.wide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(88, 28, 135, 0.12);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #2e1065, #9d174d);
}

.poster-link img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0) 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--purple-50);
}

.card-body h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 19px;
  line-height: 1.32;
}

.card-body h2 a:hover {
  color: var(--purple-700);
}

.card-body p {
  min-height: 62px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #6d28d9;
  background: #f3e8ff;
  font-size: 12px;
  font-weight: 700;
}

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

.movie-card-wide .poster-link img {
  height: 100%;
  min-height: 190px;
}

.movie-card-small .poster-link img {
  height: 210px;
}

.movie-card-small .card-body {
  padding: 14px;
}

.movie-card-small .card-body h2 {
  font-size: 16px;
}

.movie-card-small .card-body p {
  min-height: 44px;
  -webkit-line-clamp: 2;
}

.page-main,
.detail-main {
  min-height: 60vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0;
  color: #ffffff;
  background: radial-gradient(circle at 20% 10%, rgba(236, 72, 153, 0.58), transparent 32%), linear-gradient(135deg, #2e1065, #7c3aed 48%, #ec4899);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -48% 30%;
  height: 220px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(32px);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.compact-actions {
  margin-top: 24px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 190px;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 32px rgba(88, 28, 135, 0.1);
  backdrop-filter: blur(14px);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
  width: 100%;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 14px;
  padding: 13px 14px;
  color: #1f2937;
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-page-form input:focus {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.search-page-form {
  display: flex;
  max-width: 780px;
  gap: 12px;
  margin-top: 28px;
}

.search-page-form button {
  border: 0;
  border-radius: 16px;
  padding: 0 28px;
  color: #7c3aed;
  background: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 34px 0 10px;
}

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

.breadcrumb a {
  color: var(--purple-700);
  font-weight: 800;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.24);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #7c3aed;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.08));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #7c3aed;
  background: rgba(255, 255, 255, 0.94);
  font-size: 40px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
  transform: translateX(3px);
}

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

.movie-detail-card,
.sidebar-card {
  margin-top: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 42px rgba(88, 28, 135, 0.12);
}

.movie-detail-card {
  padding: 26px;
}

.detail-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.detail-head img {
  width: 100%;
  min-height: 310px;
  object-fit: cover;
  border-radius: 20px;
  background: linear-gradient(135deg, #2e1065, #9d174d);
}

.detail-head h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.detail-head p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 10px 12px;
  border-radius: 14px;
  color: #4b5563;
  background: #faf5ff;
}

.detail-text {
  margin-top: 28px;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.detail-text h2 {
  margin: 28px 0 10px;
  color: #111827;
  font-size: 24px;
}

.detail-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}

.sidebar-card {
  padding: 22px;
}

.sidebar-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.sidebar-list {
  display: grid;
  gap: 10px;
}

.sidebar-list a {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: #faf5ff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar-list a:hover {
  transform: translateX(4px);
  background: #f3e8ff;
}

.sidebar-list span {
  color: #111827;
  font-weight: 800;
}

.sidebar-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.site-footer {
  margin-top: 30px;
  color: #ede9fe;
  background: linear-gradient(135deg, #160b2f, #3b0764 55%, #831843);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0;
}

.footer-brand {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: #c4b5fd;
  line-height: 1.7;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

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

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

.footer-bottom {
  padding: 18px 0;
  color: #c4b5fd;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 1080px) {
  .four-cols,
  .three-cols,
  .five-cols,
  .six-cols,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-links,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-inner {
    gap: 12px;
  }

  .brand-text {
    max-width: 68vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-control {
    display: none;
  }

  .category-grid,
  .overview-grid,
  .four-cols,
  .three-cols,
  .five-cols,
  .six-cols,
  .wide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

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

  .detail-head img {
    max-width: 260px;
    min-height: 360px;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-meta span {
    max-width: 100%;
  }

  .category-grid,
  .overview-grid,
  .four-cols,
  .three-cols,
  .five-cols,
  .six-cols,
  .wide-grid {
    grid-template-columns: 1fr;
  }

  .poster-link img,
  .movie-card-small .poster-link img {
    height: 300px;
  }

  .page-hero {
    padding: 54px 0;
  }

  .search-page-form {
    flex-direction: column;
  }

  .search-page-form button {
    min-height: 46px;
  }

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