:root {
  --purple-950: #2e1065;
  --purple-900: #4c1d95;
  --purple-700: #7e22ce;
  --purple-600: #9333ea;
  --purple-500: #a855f7;
  --pink-500: #ec4899;
  --blue-500: #3b82f6;
  --amber-500: #f59e0b;
  --gray-950: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(88, 28, 135, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-800);
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 36%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--purple-700), var(--purple-500), var(--purple-700));
  box-shadow: 0 12px 30px rgba(88, 28, 135, 0.28);
}

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: radial-gradient(circle at 35% 25%, #f0abfc, #9333ea 45%, #581c87);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.65), 0 10px 18px rgba(76, 29, 149, 0.25);
}

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

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

.desktop-nav > a,
.nav-dropdown > a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: #f3e8ff;
}

.nav-dropdown {
  position: relative;
  padding: 22px 0;
}

.nav-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 190px;
  padding: 10px;
  display: grid;
  gap: 4px;
  color: var(--gray-700);
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

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

.nav-dropdown-panel a {
  padding: 8px 10px;
  border-radius: 12px;
}

.nav-dropdown-panel a:hover {
  color: var(--purple-700);
  background: #faf5ff;
}

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

.nav-search input {
  width: 220px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  outline: none;
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.92);
}

.nav-search button,
.search-page-form button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  color: var(--purple-700);
  background: var(--white);
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.search-page-form button:hover,
.filter-panel button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(88, 28, 135, 0.2);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  background: rgba(76, 29, 149, 0.98);
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: var(--white);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 10% 20%, #c084fc 0, rgba(192, 132, 252, 0) 28%), linear-gradient(135deg, #581c87 0%, #9333ea 48%, #db2777 100%);
}

.hero-bg-orb {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(6px);
}

.orb-one {
  width: 320px;
  height: 320px;
  right: 8%;
  top: 10%;
}

.orb-two {
  width: 180px;
  height: 180px;
  left: 12%;
  bottom: 12%;
}

.orb-three {
  width: 130px;
  height: 130px;
  right: 32%;
  bottom: 22%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-slider {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 48px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: #f5d0fe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.15;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #f3e8ff;
  font-size: 18px;
}

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-tags span,
.tag-cloud span,
.movie-category {
  padding: 7px 12px;
  border-radius: 999px;
  color: #6b21a8;
  background: #f3e8ff;
  font-size: 13px;
  font-weight: 700;
}

.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 22px;
  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));
  box-shadow: 0 14px 28px rgba(147, 51, 234, 0.35);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(88, 28, 135, 0.26);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 32px;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.36);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05));
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.45), transparent 55%);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

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

.hero-dots button.is-active {
  width: 32px;
  background: var(--white);
}

.hero-category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.hero-category-pills a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-category-pills a:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.page-stack {
  display: grid;
  gap: 44px;
  padding-bottom: 56px;
}

.page-top {
  padding-top: 42px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -34px;
}

.stats-strip div {
  padding: 22px;
  border-radius: 22px;
  color: var(--purple-900);
  background: var(--white);
  box-shadow: var(--shadow);
}

.stats-strip strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.stats-strip span {
  color: var(--gray-600);
  font-weight: 700;
}

.content-section,
.about-panel,
.text-panel,
.player-section,
.page-title-block,
.filter-panel {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.content-section,
.about-panel,
.page-title-block {
  padding: 28px;
}

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

.section-heading.compact {
  margin-bottom: 16px;
}

.section-heading h2,
.page-title-block h1,
.detail-info h1,
.text-panel h2,
.about-panel h2 {
  margin: 0;
  color: var(--gray-950);
  line-height: 1.16;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading p,
.page-title-block p,
.about-panel p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 45px rgba(88, 28, 135, 0.18);
}

.movie-card-large {
  grid-column: span 2;
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.65), transparent 48%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 999px;
  background: var(--purple-600);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.25s ease;
}

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

.poster-label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(147, 51, 234, 0.9);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  color: var(--gray-950);
  font-size: 18px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.movie-genre,
.movie-desc {
  margin: 0 0 8px;
  color: var(--gray-600);
  font-size: 14px;
}

.movie-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-category {
  display: inline-flex;
  margin-top: 4px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #faf5ff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: #f3e8ff;
}

.rank-num,
.ranking-number,
.category-index {
  color: var(--purple-700);
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--gray-600);
  font-size: 13px;
}

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

.category-mini-grid a,
.category-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #faf5ff, #fff7ed);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-mini-grid a:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-mini-grid strong,
.category-card strong {
  color: var(--gray-950);
}

.category-mini-grid span,
.category-card p,
.category-card em {
  color: var(--gray-600);
  font-style: normal;
}

.category-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.category-samples span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--purple-700);
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-600);
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr) auto;
  gap: 12px;
  padding: 18px;
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  outline: none;
  padding: 12px 14px;
  color: var(--gray-800);
  background: var(--white);
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-page-form input:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.14);
}

.filter-count,
.search-status {
  color: var(--gray-600);
  font-weight: 700;
}

.detail-hero-card {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 32px;
  padding: 28px;
  border-radius: 32px;
  color: var(--white);
  background: linear-gradient(135deg, var(--purple-950), var(--purple-700) 58%, var(--pink-500));
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 50px rgba(17, 24, 39, 0.3);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  color: var(--white);
  font-size: clamp(30px, 5vw, 56px);
  margin-bottom: 16px;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: #f3e8ff;
  font-size: 18px;
}

.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.detail-meta-list div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.detail-meta-list dt {
  margin-bottom: 4px;
  color: #e9d5ff;
  font-size: 12px;
}

.detail-meta-list dd {
  margin: 0;
  font-weight: 800;
}

.player-section {
  padding: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #050816;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #050816;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(5, 8, 22, 0.72), rgba(5, 8, 22, 0.34));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.player-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--purple-600);
  box-shadow: 0 18px 45px rgba(147, 51, 234, 0.4);
}

.player-overlay strong {
  font-size: 22px;
}

.player-overlay em {
  color: #e9d5ff;
  font-style: normal;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  margin: 0;
  color: #fef3c7;
  text-align: center;
  font-size: 14px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-panel {
  padding: 26px;
}

.text-panel h2,
.about-panel h2 {
  margin-bottom: 12px;
}

.text-panel p,
.about-panel p {
  margin: 0 0 18px;
  color: var(--gray-700);
}

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

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

.ranking-card {
  display: grid;
  grid-template-columns: 70px 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.ranking-card img {
  width: 92px;
  height: 122px;
  border-radius: 16px;
  object-fit: cover;
  background: #ede9fe;
}

.ranking-card h2 {
  margin: 0 0 6px;
  color: var(--gray-950);
  font-size: 20px;
}

.ranking-card p,
.ranking-card em {
  display: block;
  margin: 0 0 6px;
  color: var(--gray-600);
  font-style: normal;
}

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

.search-page-form button {
  color: var(--white);
  background: var(--purple-600);
  white-space: nowrap;
}

.site-footer {
  margin-top: 50px;
  color: var(--white);
  background: linear-gradient(180deg, var(--purple-900), var(--purple-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

.footer-grid h3 {
  margin: 0 0 12px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #d8b4fe;
}

.footer-grid ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-grid li {
  margin-bottom: 8px;
}

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

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

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

  .mobile-menu-button {
    display: block;
  }

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

  .hero-slide,
  .detail-hero-card,
  .split-section,
  .detail-text-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.is-active {
    display: grid;
  }

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

  .hero-inner {
    padding: 48px 0;
  }

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

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

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

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

  .brand-text {
    display: none;
  }

  .hero {
    min-height: auto;
  }

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

  .hero-poster,
  .hero-poster img {
    min-height: 320px;
  }

  .stats-strip,
  .movie-grid,
  .category-mini-grid,
  .category-grid,
  .related-grid,
  .filter-panel,
  .detail-meta-list {
    grid-template-columns: 1fr;
  }

  .movie-card-large {
    grid-column: span 1;
  }

  .content-section,
  .about-panel,
  .page-title-block,
  .player-section,
  .detail-hero-card {
    padding: 20px;
  }

  .ranking-card {
    grid-template-columns: 52px 78px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-card img {
    width: 78px;
    height: 104px;
  }

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

  .rank-meta {
    grid-column: 2;
  }

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