:root {
  --bg: #fbf7ff;
  --paper: #ffffff;
  --ink: #24172f;
  --muted: #76677f;
  --purple: #9333ea;
  --pink: #db2777;
  --rose: #fdf2f8;
  --line: rgba(147, 51, 234, 0.12);
  --shadow: 0 20px 50px rgba(78, 38, 114, 0.15);
  --soft-shadow: 0 12px 28px rgba(78, 38, 114, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(236, 72, 153, 0.16), transparent 32rem),
    radial-gradient(circle at 86% 0%, rgba(168, 85, 247, 0.18), transparent 34rem),
    linear-gradient(180deg, #fff7fd 0%, var(--bg) 48%, #fff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 10px 26px rgba(147, 51, 234, 0.34);
}

.logo-text {
  font-size: 1.1rem;
  background: linear-gradient(120deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #5c4a67;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 8px 20px rgba(147, 51, 234, 0.22);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--rose);
}

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

.search-shell {
  position: relative;
  width: min(280px, 26vw);
  flex: 0 1 280px;
}

.search-input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(147, 51, 234, 0.16);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--ink);
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.search-input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(147, 51, 234, 0.45);
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.12);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  max-height: 430px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: block;
}

.search-hit {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.search-hit:hover {
  background: var(--rose);
}

.search-hit img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.search-hit strong {
  display: block;
  font-size: 0.95rem;
}

.search-hit span {
  color: var(--muted);
  font-size: 0.82rem;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #1b1026;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(22, 9, 30, 0.92) 0%, rgba(43, 17, 57, 0.72) 42%, rgba(43, 17, 57, 0.32) 100%),
    radial-gradient(circle at 76% 20%, rgba(236, 72, 153, 0.28), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1160px, calc(100% - 32px));
  padding: 78px 0 96px;
  color: #fff;
}

.hero-kicker,
.section-heading span,
.rank-head span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  color: #7e22ce;
  border-radius: 999px;
  background: #faf5ff;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero-kicker {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(2.5rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}

.hero h3 {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  color: #fde68a;
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.hero-actions,
.detail-copy .btn {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: 0.25s ease;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 14px 30px rgba(147, 51, 234, 0.32);
}

.btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.btn.clear {
  color: #fde68a;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(147, 51, 234, 0.28);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 2.4rem;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

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

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

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

.section-heading h2,
.rank-head h2,
.page-hero h1,
.detail-text h2 {
  margin: 12px 0 8px;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.category-card p,
.movie-desc,
.detail-line,
.detail-text p,
.player-copy p {
  color: var(--muted);
}

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

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  isolation: isolate;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.45s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(40, 13, 55, 0.1), rgba(32, 12, 45, 0.88));
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card strong {
  display: block;
  color: #fff;
  font-size: 1.35rem;
}

.category-card p {
  min-height: 54px;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.78);
}

.category-card em {
  color: #fde68a;
  font-style: normal;
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(147, 51, 234, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(78, 38, 114, 0.08);
  transition: 0.28s ease;
}

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

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

.poster-link {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #f3e8ff, #fdf2f8);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.35s ease;
}

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

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-badge {
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 0.78rem;
  font-weight: 800;
}

.poster-play {
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 10px 24px rgba(147, 51, 234, 0.35);
}

.movie-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--purple);
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  margin: 8px 0;
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  color: #7c3aed;
  font-size: 0.8rem;
  font-weight: 800;
}

.movie-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f3e8ff;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #be185d;
  background: #fce7f3;
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 18px;
  transition: 0.2s ease;
}

.rank-item:hover {
  background: linear-gradient(135deg, #faf5ff, #fdf2f8);
}

.rank-num {
  color: var(--pink);
  font-size: 1.1rem;
  font-weight: 1000;
}

.rank-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.95rem;
}

.rank-copy em {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
}

.wide-link {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  padding: 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  width: min(1280px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: clamp(42px, 8vw, 86px);
  border-radius: 36px;
  background:
    radial-gradient(circle at 84% 12%, rgba(236, 72, 153, 0.25), transparent 28rem),
    linear-gradient(135deg, #fff, #faf5ff 48%, #fdf2f8);
  box-shadow: var(--shadow);
}

.page-hero.small-hero,
.page-hero.category-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
}

.page-hero.ranking-hero {
  min-height: 420px;
  color: #fff;
  background: #241035;
}

.page-hero.ranking-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
}

.page-hero.ranking-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 8, 30, 0.92), rgba(20, 8, 30, 0.35));
}

.page-hero.ranking-hero div {
  position: relative;
  z-index: 2;
}

.page-hero.ranking-hero p {
  color: rgba(255, 255, 255, 0.84);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  color: #7c3aed;
  font-weight: 800;
}

.breadcrumb strong {
  color: var(--ink);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  margin-bottom: 24px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #1c1026;
}

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(24px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.38;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 9, 32, 0.96), rgba(55, 19, 72, 0.78)),
    radial-gradient(circle at 84% 20%, rgba(236, 72, 153, 0.3), transparent 28rem);
}

.detail-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
  margin: 16px 0 12px;
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-line {
  max-width: 760px;
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.detail-copy .movie-meta span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.score-row strong {
  color: #fde68a;
  font-size: 2rem;
}

.score-row span {
  color: rgba(255, 255, 255, 0.76);
}

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

.player-card {
  overflow: hidden;
  border-radius: 34px;
  background: #12091c;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #06030a;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #06030a;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(6, 3, 10, 0.15), rgba(6, 3, 10, 0.7)),
    radial-gradient(circle, rgba(236, 72, 153, 0.22), transparent 24rem);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.play-ring {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.12), 0 20px 60px rgba(236, 72, 153, 0.34);
  font-size: 2rem;
}

.player-cover strong {
  font-size: 1.3rem;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.player-copy {
  padding: 24px;
  color: #fff;
}

.player-copy h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.player-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.detail-text {
  max-width: 980px;
}

.detail-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.detail-text p {
  margin: 0 0 26px;
  font-size: 1.04rem;
}

.site-footer {
  margin-top: 36px;
  padding: 42px 0 28px;
  color: #6b5875;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p,
.copyright {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #faf5ff;
  font-weight: 800;
}

.copyright {
  width: min(1280px, calc(100% - 32px));
  margin: 18px auto 0;
  font-size: 0.92rem;
}

@keyframes float-card {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.category-card:nth-child(3n + 1) {
  animation: float-card 6s ease-in-out infinite;
}

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

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: 68px;
    padding: 12px 0;
  }

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

  .site-nav {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding: 10px 0;
  }

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

  .nav-link {
    background: #fff;
  }

  .search-shell {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .hero {
    min-height: 620px;
  }

  .hero h1,
  .hero h2 {
    letter-spacing: -0.04em;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .detail-content {
    grid-template-columns: 1fr;
    padding: 48px 0;
  }

  .detail-poster {
    width: min(260px, 80vw);
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .section,
  .header-inner,
  .footer-inner,
  .copyright,
  .detail-content,
  .hero-content,
  .page-hero {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    min-height: 590px;
  }

  .hero-content {
    padding-top: 58px;
  }

  .hero-actions {
    display: grid;
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

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

  .poster-link {
    height: 100%;
    min-height: 180px;
  }

  .movie-title {
    min-height: 0;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 28px;
  }

  .rank-item {
    grid-template-columns: 36px 48px 1fr;
  }
}
