:root {
  --purple-950: #2e1065;
  --purple-900: #4c1d95;
  --purple-700: #7e22ce;
  --purple-600: #9333ea;
  --pink-600: #db2777;
  --pink-500: #ec4899;
  --rose-50: #fff1f2;
  --purple-50: #faf5ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 10px 30px rgba(88, 28, 135, 0.08);
  --shadow-md: 0 18px 45px rgba(88, 28, 135, 0.16);
  --shadow-xl: 0 28px 70px rgba(88, 28, 135, 0.24);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(229, 231, 235, 0.75);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--purple-600), var(--pink-600));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-icon,
.footer-logo span {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--purple-600);
  background: linear-gradient(135deg, #f3e8ff, #fce7f3);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(6deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--gray-700);
  font-weight: 700;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--purple-700);
  background: var(--purple-50);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--purple-50);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--purple-700);
  border-radius: 999px;
}

.section-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-50), var(--rose-50));
}

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.28;
}

.hero-section::before {
  top: 30px;
  left: 40px;
  background: var(--purple-600);
}

.hero-section::after {
  right: 60px;
  bottom: 40px;
  background: var(--pink-500);
}

.hero-slider {
  position: relative;
  min-height: 680px;
  z-index: 1;
}

.hero-slide {
  min-height: 680px;
  width: 100%;
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 56px;
  padding: 86px max(32px, calc((100vw - 1200px) / 2)) 76px;
  background-size: cover;
  background-position: center;
  color: var(--white);
  animation: fadeIn 0.7s ease both;
}

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

.hero-copy {
  max-width: 720px;
}

.hero-kicker,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-700);
}

.hero-kicker span,
.section-eyebrow,
.detail-channel {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.hero-copy h1 {
  margin: 24px 0 22px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.08em;
}

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

.hero-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--purple-600), var(--pink-600));
}

.btn-secondary,
.btn-ghost {
  color: var(--purple-700);
  background: #fff;
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(410px, 100%);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: rgba(255, 255, 255, 0.12);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-poster span,
.play-chip {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple-600), var(--pink-600));
  box-shadow: var(--shadow-md);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: #fff;
  background: transparent;
}

.hero-prev,
.hero-next {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.hero-prev:hover,
.hero-next:hover {
  background: rgba(255, 255, 255, 0.18);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

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

.section-block {
  padding: 78px 0;
  background: var(--gray-50);
}

.white-bg {
  background: #fff;
}

.soft-bg {
  background: linear-gradient(135deg, var(--purple-50), var(--rose-50));
}

.search-band {
  background: #fff;
  padding: 34px 0;
}

.search-panel,
.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.category-hero h1,
.player-card h2,
.story-card h2 {
  margin: 10px 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.05em;
}

.search-panel p,
.section-heading p,
.page-hero p,
.category-hero p {
  color: var(--gray-500);
  margin: 0;
}

.search-box {
  display: flex;
  gap: 12px;
}

.movie-search {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  outline: none;
  color: var(--gray-900);
  background: #fff;
  transition:
    border 0.25s ease,
    box-shadow 0.25s ease;
}

.movie-search:focus {
  border-color: var(--purple-600);
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.12);
}

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

.section-heading.centered {
  display: block;
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

.ranking-grid,
.compact-grid,
.all-movie-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

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

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-50), var(--rose-50));
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.play-chip {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--purple-600), var(--pink-600));
  box-shadow: var(--shadow-sm);
}

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

.movie-meta-line,
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-meta-line span:first-child {
  color: var(--purple-700);
  font-weight: 800;
}

.movie-card h3 {
  min-height: 56px;
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.card-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--purple-700);
  font-size: 12px;
  font-weight: 800;
  background: var(--purple-50);
}

.movie-card-featured {
  background: linear-gradient(135deg, #fff, var(--purple-50));
  border: 1px solid rgba(147, 51, 234, 0.12);
}

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

.movie-card-compact h3 {
  min-height: auto;
  font-size: 16px;
}

.movie-card-compact p,
.movie-card-compact .card-tags,
.movie-card-compact .card-foot {
  display: none;
}

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

.category-tile,
.category-card-large a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.category-tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.category-tile span,
.category-card-body h2 {
  display: block;
  margin: 18px 18px 8px;
  color: var(--gray-900);
  font-size: 22px;
  font-weight: 900;
}

.category-tile p,
.category-card-body p {
  margin: 0 18px 20px;
  color: var(--gray-500);
}

.page-hero,
.category-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--purple-900), var(--pink-600));
  padding: 88px 0 72px;
}

.ranking-hero {
  background: linear-gradient(
    135deg,
    var(--purple-950),
    var(--purple-700),
    var(--pink-600)
  );
}

.page-hero .section-eyebrow,
.category-hero .section-eyebrow {
  color: var(--purple-700);
}

.page-hero p,
.category-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.category-hero {
  background-size: cover;
  background-position: center;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

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

.filter-panel {
  grid-template-columns: 1fr;
  margin-bottom: 28px;
}

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

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--gray-700);
  font-weight: 800;
  background: var(--gray-100);
  transition:
    color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: #fff;
  background: linear-gradient(90deg, var(--purple-600), var(--pink-600));
  transform: translateY(-1px);
}

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

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  background: var(--purple-50);
}

.category-collage img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.category-card-body {
  padding: 4px 0 4px;
}

.category-card-body span {
  display: inline-flex;
  margin: 20px 18px 0;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--purple-700);
  font-weight: 800;
  font-size: 12px;
  background: var(--purple-50);
}

.detail-top {
  padding: 46px 0 72px;
  color: #fff;
  background:
    radial-gradient(
      circle at 10% 10%,
      rgba(236, 72, 153, 0.42),
      transparent 34%
    ),
    linear-gradient(135deg, var(--purple-950), var(--purple-900));
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.45fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.detail-poster-card,
.detail-info-card,
.player-card,
.story-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.detail-poster-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.detail-info-card {
  padding: 32px;
  color: var(--gray-900);
}

.detail-channel {
  display: inline-flex;
  color: var(--purple-700);
  font-size: 13px;
  font-weight: 900;
}

.detail-info-card h1 {
  margin: 16px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-lead {
  color: var(--gray-500);
  font-size: 18px;
}

.detail-score {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.star {
  color: var(--gray-200);
  font-size: 18px;
}

.star.filled {
  color: #f59e0b;
}

.detail-score strong {
  font-size: 22px;
}

.detail-score span {
  color: var(--gray-500);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.detail-meta div {
  padding: 14px;
  border-radius: 14px;
  background: var(--gray-50);
}

.detail-meta dt {
  color: var(--gray-500);
  font-size: 13px;
}

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

.detail-tags {
  margin-top: 22px;
}

.detail-watch {
  margin-top: 10px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr);
  gap: 28px;
}

.player-card,
.story-card {
  padding: 28px;
}

.player-card h2,
.story-card h2 {
  font-size: 28px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(
    circle,
    rgba(147, 51, 234, 0.28),
    rgba(0, 0, 0, 0.42)
  );
  cursor: pointer;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

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

.player-overlay span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 32px;
  background: linear-gradient(135deg, var(--purple-600), var(--pink-600));
  box-shadow: var(--shadow-xl);
}

.story-card p {
  color: var(--gray-700);
  font-size: 16px;
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--gray-500);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.site-footer {
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--purple-950),
    var(--purple-900),
    #831843
  );
}

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

.footer-logo {
  color: #fff;
  background: none;
  -webkit-background-clip: initial;
}

.footer-brand p,
.site-footer li,
.site-footer a,
.copyright {
  color: rgba(255, 255, 255, 0.72);
}

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

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

.site-footer li {
  margin: 8px 0;
}

.site-footer a:hover {
  color: #fff;
}

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .featured-grid,
  .ranking-grid,
  .compact-grid,
  .all-movie-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-slide,
  .detail-grid,
  .detail-content-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    justify-self: start;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-md);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 16px;
  }

  .brand {
    font-size: 21px;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
  }

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

  .hero-slide {
    padding: 58px 16px 82px;
    gap: 28px;
  }

  .hero-copy h1 {
    letter-spacing: -0.05em;
  }

  .hero-poster {
    width: 100%;
  }

  .hero-actions,
  .search-box,
  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }

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

  .featured-grid,
  .ranking-grid,
  .compact-grid,
  .all-movie-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

  .card-foot,
  .movie-card p {
    font-size: 12px;
  }

  .detail-info-card,
  .player-card,
  .story-card {
    padding: 20px;
  }

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

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

@media (max-width: 460px) {
  .featured-grid,
  .ranking-grid,
  .compact-grid,
  .all-movie-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }
}
