:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --secondary: #db2777;
  --accent: #f472b6;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8f2ff;
  --line: rgba(124, 58, 237, 0.14);
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 24px 60px rgba(88, 28, 135, 0.14);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #fff7fb 0%, #f6f1ff 42%, #fff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.08);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(88, 28, 135, 0.1);
}

.nav-wrap {
  max-width: 1280px;
  height: 76px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.28);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background: rgba(124, 58, 237, 0.1);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary);
  border-radius: 4px;
}

main {
  overflow: hidden;
}

.hero,
.page-hero,
.detail-hero {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px;
}

.hero {
  min-height: 650px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.28;
  pointer-events: none;
}

.hero-glow-one {
  width: 340px;
  height: 340px;
  left: -90px;
  top: 70px;
  background: var(--primary);
}

.hero-glow-two {
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: 20px;
  background: var(--accent);
}

.hero-carousel {
  position: relative;
  z-index: 1;
  min-height: 520px;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 246, 252, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.78fr);
  gap: 42px;
  align-items: center;
  min-height: 520px;
  padding: 48px;
  animation: fadeUp 0.55s ease both;
}

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

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.1);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.hero h1 span,
.hero h2 span {
  display: block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p,
.page-hero p,
.detail-copy .lead-text {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.9;
}

.hero-badges,
.movie-card-tags,
.detail-badges,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span,
.movie-card-tags span,
.detail-badges span,
.detail-tags span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.1);
  font-size: 13px;
  font-weight: 700;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 850;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 32px rgba(124, 58, 237, 0.24);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(124, 58, 237, 0.18);
}

.btn-secondary {
  color: var(--primary);
  background: #fff;
  border: 1px solid rgba(124, 58, 237, 0.16);
}

.btn-ghost {
  color: #7c2d12;
  background: #fff7ed;
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(88, 28, 135, 0.24);
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.hero-poster img {
  transition: transform 0.6s ease;
}

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

.hero-controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.hero-nav,
.hero-dot {
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--primary);
  background: #fff;
  font-size: 30px;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.14);
}

.hero-nav:hover {
  transform: scale(1.08);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.28);
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
}

.wide-section {
  max-width: 1100px;
}

.highlight-section {
  padding-top: 24px;
}

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

.section-heading h2,
.detail-article h2,
.detail-side h2,
.rank-panel h2 {
  margin: 0;
  font-size: clamp(26px, 3.3vw, 40px);
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: var(--primary);
  background: #fff;
  border: 1px solid rgba(124, 58, 237, 0.12);
  white-space: nowrap;
}

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

.channel-card,
.category-overview-card {
  position: relative;
  min-height: 210px;
  padding: 22px;
  border-radius: 26px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 42px rgba(88, 28, 135, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.channel-card:hover,
.category-overview-card:hover,
.movie-card:hover,
.related-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(88, 28, 135, 0.16);
}

.channel-art {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.channel-copy,
.category-overview-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-copy strong,
.category-overview-copy strong {
  font-size: 24px;
  font-weight: 950;
}

.channel-copy em,
.category-overview-copy em,
.rank-info em,
.related-info em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

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

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

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 38px rgba(88, 28, 135, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card.is-hidden {
  display: none;
}

.movie-card-link,
.movie-card-body {
  display: flex;
  flex-direction: column;
}

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

.poster-frame img {
  transition: transform 0.45s ease;
}

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

.movie-card-body {
  min-height: 178px;
  padding: 15px;
  gap: 9px;
}

.movie-card-meta {
  color: var(--secondary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.movie-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 36px rgba(88, 28, 135, 0.08);
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  padding: 0 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(124, 58, 237, 0.14);
}

.search-box span {
  color: var(--primary);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-chip {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #6b21a8;
  background: rgba(124, 58, 237, 0.1);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transform: translateY(-1px);
}

.empty-state {
  display: none;
  padding: 26px;
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.empty-state.is-visible {
  display: block;
}

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

.rank-panel,
.detail-article,
.detail-side {
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(88, 28, 135, 0.1);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.rank-panel-head a {
  color: var(--primary);
  font-weight: 850;
}

.rank-list,
.ranking-board,
.related-list {
  display: grid;
  gap: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 64px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(124, 58, 237, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-weight: 950;
}

.rank-cover,
.related-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.rank-cover {
  aspect-ratio: 3 / 4;
}

.rank-info,
.related-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rank-info strong,
.related-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.rank-info em,
.related-info em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.rank-arrow {
  color: var(--primary);
  font-size: 26px;
}

.page-hero,
.detail-hero {
  padding-top: 76px;
}

.compact-hero > div {
  position: relative;
  padding: 46px;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 239, 249, 0.78));
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  margin-top: 16px;
}

.category-overview-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-thumbs {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  opacity: 0.28;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  padding: 34px;
  border-radius: 38px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 246, 252, 0.82));
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  box-shadow: 0 28px 62px rgba(88, 28, 135, 0.18);
}

.detail-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 68px);
}

.player-section {
  padding-top: 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: #0f0a1f;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.24);
  aspect-ratio: 16 / 9;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f0a1f;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.28), rgba(15, 10, 31, 0.72));
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: var(--primary);
  background: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  font-size: 34px;
  text-indent: 5px;
}

.play-overlay span:last-child {
  font-size: 20px;
  font-weight: 900;
}

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

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

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

.detail-article p {
  margin: 14px 0 28px;
  color: #374151;
  font-size: 17px;
  line-height: 2;
}

.related-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.related-cover {
  aspect-ratio: 3 / 4;
}

.site-footer {
  margin-top: 36px;
  color: #f5f3ff;
  background: linear-gradient(135deg, #581c87, #831843);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
}

.site-footer p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: flex-start;
  justify-content: flex-end;
}

.footer-links a {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.is-empty {
  opacity: 0;
}

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

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

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

  .split-section,
  .detail-body-section {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-wrap {
    height: 68px;
    padding: 0 16px;
  }

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(88, 28, 135, 0.18);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero,
  .page-hero,
  .detail-hero,
  .content-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px;
  }

  .hero-poster {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
  }

  .section-heading,
  .toolbar,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-row {
    justify-content: flex-start;
  }

  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .channel-grid,
  .category-overview-grid,
  .ranking-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .hero-carousel,
  .compact-hero > div,
  .detail-layout,
  .player-shell,
  .detail-article,
  .detail-side {
    border-radius: 24px;
  }

  .hero-slide {
    padding: 22px;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .channel-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .rank-arrow {
    display: none;
  }

  .play-symbol {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}
