:root {
  --purple-900: #2e1065;
  --purple-800: #4c1d95;
  --purple-700: #6d28d9;
  --purple-600: #7c3aed;
  --purple-100: #ede9fe;
  --pink-600: #db2777;
  --pink-500: #ec4899;
  --blue-600: #2563eb;
  --yellow-500: #f59e0b;
  --gray-950: #0f172a;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-card: 0 18px 45px rgba(88, 28, 135, 0.14);
  --shadow-hover: 0 24px 60px rgba(88, 28, 135, 0.24);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--gray-800);
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 38%, #fdf2f8 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    90deg,
    rgba(109, 40, 217, 0.98),
    rgba(147, 51, 234, 0.98),
    rgba(236, 72, 153, 0.98)
  );
  box-shadow: 0 14px 35px rgba(76, 29, 149, 0.24);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  width: min(var(--container), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--purple-700);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.24);
}

.brand-text {
  font-size: 22px;
  white-space: nowrap;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown:hover .nav-drop-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.nav-drop-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 190px;
  padding: 10px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-hover);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-drop-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-drop-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--gray-700);
}

.nav-drop-panel a:hover {
  color: var(--purple-700);
  background: var(--purple-100);
}

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

.top-search input,
.mobile-search input,
.hero-search input,
.filter-bar input {
  min-width: 0;
  border: 0;
  border-radius: 999px;
  outline: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--gray-800);
  padding: 12px 16px;
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.12);
}

.top-search input {
  width: 220px;
}

.top-search button,
.mobile-search button,
.hero-search button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--purple-700), var(--pink-500));
  padding: 12px 18px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(219, 39, 119, 0.28);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--white);
}

.mobile-panel {
  display: none;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.hero {
  position: relative;
  min-height: 680px;
  color: var(--white);
  overflow: hidden;
  background: var(--purple-900);
}

.hero-slide {
  display: none;
  min-height: 680px;
  position: relative;
}

.hero-slide.active {
  display: block;
}

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

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.08);
  transform: scale(1.05);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 70% 25%,
      rgba(236, 72, 153, 0.28),
      transparent 30%
    ),
    linear-gradient(
      90deg,
      rgba(46, 16, 101, 0.96),
      rgba(76, 29, 149, 0.82) 46%,
      rgba(15, 23, 42, 0.68)
    ),
    linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.82));
}

.hero-content {
  position: relative;
  width: min(var(--container), calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 80px 0 110px;
}

.eyebrow,
.section-heading p,
.page-hero > p:first-child {
  margin: 0 0 10px;
  color: #f0abfc;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 48px);
}

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

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

.hero-tags span,
.tag-row span,
.tag-cloud span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--purple-600), var(--pink-500));
  padding: 13px 22px;
  box-shadow: 0 16px 36px rgba(236, 72, 153, 0.34);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  padding: 13px 22px;
  backdrop-filter: blur(12px);
}

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

.full {
  width: 100%;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.54);
  padding: 10px 14px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: min(var(--container), calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  font-size: 30px;
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.quick-search-panel,
.content-section,
.page-main,
.detail-main {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -54px;
  position: relative;
  z-index: 3;
  padding: 28px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: linear-gradient(
    135deg,
    rgba(109, 40, 217, 0.96),
    rgba(219, 39, 119, 0.94)
  );
  box-shadow: var(--shadow-hover);
}

.quick-search-panel h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.quick-search-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.hero-search input {
  flex: 1;
}

.content-section {
  padding: 66px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-article h2,
.related-panel h2 {
  margin: 0;
  color: var(--gray-800);
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
}

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

.compact {
  margin-bottom: 18px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-100), #fce7f3);
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  background: rgba(17, 24, 39, 0.76);
  padding: 7px 10px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--yellow-500), var(--pink-500));
}

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

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--purple-700);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--gray-500);
  font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
}

.movie-card p {
  display: -webkit-box;
  margin: 0 0 12px;
  color: var(--gray-600);
  line-height: 1.65;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span,
.tag-cloud span,
.detail-tags span {
  color: var(--purple-700);
  background: var(--purple-100);
}

.movie-card-mini {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
}

.movie-card-mini .movie-poster img {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-mini .movie-card-body {
  padding: 12px;
}

.movie-card-mini p,
.movie-card-mini .tag-row {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 28px;
}

.ranking-panel,
.related-panel,
.detail-article,
.watch-info {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 28px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 8px;
  background: #faf5ff;
}

.ranking-row:hover {
  background: #f3e8ff;
}

.ranking-row span {
  color: var(--pink-600);
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-row strong,
.ranking-row em {
  display: block;
  grid-column: 3;
}

.ranking-row em {
  color: var(--gray-500);
  font-size: 12px;
  font-style: normal;
}

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

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

.category-tile {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.category-cover {
  overflow: hidden;
  border-radius: 18px;
}

.category-cover img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

.category-tile h2 {
  margin: 0 0 8px;
  color: var(--gray-800);
}

.category-tile p {
  margin: 0 0 12px;
  color: var(--gray-600);
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.category-samples a {
  border-radius: 999px;
  color: var(--purple-700);
  background: var(--purple-100);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.page-main,
.detail-main {
  padding: 36px 0 72px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: clamp(34px, 6vw, 72px);
  color: var(--white);
  background:
    radial-gradient(
      circle at 82% 0%,
      rgba(255, 255, 255, 0.28),
      transparent 32%
    ),
    linear-gradient(135deg, var(--purple-700), var(--pink-500));
  box-shadow: var(--shadow-hover);
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p:not(:first-child) {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.filter-bar input {
  min-width: 260px;
  flex: 1;
}

.filter-bar button {
  background: rgba(255, 255, 255, 0.17);
  box-shadow: none;
}

.filter-bar button.active,
.filter-bar button:hover {
  color: var(--purple-700);
  background: var(--white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--gray-600);
}

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

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: stretch;
}

.watch-player {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  border-radius: 30px;
  background: var(--gray-950);
  box-shadow: var(--shadow-hover);
}

.video-element {
  width: 100%;
  height: 100%;
  min-height: 460px;
  display: block;
  object-fit: cover;
  background: var(--gray-950);
}

.player-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(
    circle,
    rgba(15, 23, 42, 0.14),
    rgba(15, 23, 42, 0.54)
  );
  cursor: pointer;
}

.player-button span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple-600), var(--pink-500));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  font-size: 32px;
  padding-left: 5px;
}

.watch-player.is-playing .player-button,
.watch-player.is-ready .player-button {
  opacity: 0;
  pointer-events: none;
}

.watch-info {
  padding: 28px;
}

.watch-info h1 {
  margin: 0 0 16px;
  color: var(--gray-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

.detail-one-line {
  color: var(--gray-600);
  font-size: 17px;
  line-height: 1.8;
}

.detail-meta {
  margin: 18px 0;
}

.detail-meta span {
  color: var(--purple-700);
  background: var(--purple-100);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  margin-top: 24px;
}

.detail-article,
.related-panel {
  padding: 28px;
}

.detail-article h2,
.related-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 26px;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.95;
  white-space: pre-line;
}

.tag-cloud span {
  margin-bottom: 8px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.search-page-form {
  max-width: 760px;
}

.site-footer {
  margin-top: 84px;
  color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(135deg, var(--purple-900), var(--gray-950));
}

.footer-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-inner p {
  max-width: 480px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.8;
}

.footer-inner h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-inner a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner a:hover {
  color: var(--white);
}

.footer-bottom {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

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

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

  .hero-content,
  .split-section,
  .watch-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 320px;
    transform: none;
  }

  .ranking-panel,
  .related-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

  .site-header-inner {
    min-height: 64px;
  }

  .hero,
  .hero-slide,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 56px 0 96px;
  }

  .hero-poster {
    display: none;
  }

  .quick-search-panel {
    grid-template-columns: 1fr;
    margin-top: -34px;
  }

  .hero-search,
  .quick-search-panel {
    display: grid;
  }

  .category-grid,
  .overview-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .category-tile {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .category-cover img {
    height: 170px;
  }

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

  .watch-player,
  .video-element {
    min-height: 260px;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 18px;
  }

  .quick-search-panel,
  .page-hero,
  .watch-info,
  .detail-article,
  .related-panel {
    border-radius: 20px;
    padding: 20px;
  }

  .hero-copy p,
  .page-hero p:not(:first-child) {
    font-size: 16px;
  }

  .large-list,
  .movie-grid,
  .featured-grid {
    gap: 14px;
  }

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

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    -webkit-line-clamp: 2;
  }

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

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