:root {
  --bg: #09050f;
  --panel: rgba(255, 255, 255, .075);
  --panel-strong: rgba(255, 255, 255, .12);
  --line: rgba(255, 255, 255, .16);
  --text: #fff7fb;
  --muted: rgba(255, 247, 251, .72);
  --soft: rgba(255, 247, 251, .54);
  --pink: #ec4899;
  --pink-deep: #be185d;
  --purple: #8b5cf6;
  --violet: #581c87;
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(236, 72, 153, .28), transparent 36rem),
    radial-gradient(circle at 92% 8%, rgba(139, 92, 246, .24), transparent 35rem),
    linear-gradient(135deg, #050308 0%, #170a24 48%, #07030b 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 5, 15, .76);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 12px 30px rgba(236, 72, 153, .35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(236, 72, 153, .18);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: white;
}

.hero-slider {
  position: relative;
  padding-bottom: 24px;
}

.hero-shell {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  opacity: 0;
  pointer-events: none;
  transition: opacity .72s ease, transform .72s ease;
  transform: scale(1.025);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: saturate(1.12);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  z-index: -1;
  background: linear-gradient(to top, var(--bg), transparent);
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 54px;
  min-height: 620px;
  padding: 70px 0 120px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #fce7f3;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

.hero-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: .98;
  letter-spacing: -.06em;
}

.hero-copy p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

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

.hero-tags {
  margin: 22px 0 30px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #fce7f3;
  background: rgba(236, 72, 153, .16);
  border: 1px solid rgba(236, 72, 153, .22);
  font-size: 13px;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.site-search button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn.primary,
.site-search button,
.play-button {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 14px 34px rgba(236, 72, 153, .3);
}

.btn.ghost {
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--line);
}

.btn:hover,
.site-search button:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, .24);
  backdrop-filter: blur(12px);
  font-size: 32px;
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 28px;
  background: var(--pink);
}

.hero-search-card,
.list-toolbar,
.category-intro,
.rank-banner,
.detail-panel,
.copy-card,
.player-shell {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search-card {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 18px;
  margin-top: -70px;
  padding: 20px;
  border-radius: 28px;
}

.hero-search-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

.site-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  outline: 0;
  background: rgba(255, 255, 255, .08);
}

.chip-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
}

.main-content {
  padding: 44px 0 72px;
}

.content-section {
  margin-top: 44px;
}

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

.section-head h2,
.page-head h1,
.copy-card h2,
.detail-panel h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -.03em;
}

.section-head p,
.page-head p,
.copy-card p,
.detail-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: none;
  color: #f9a8d4;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .075);
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(236, 72, 153, .5);
  background: rgba(255, 255, 255, .105);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(236, 72, 153, .12), rgba(139, 92, 246, .12));
}

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #1f1302;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: white;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta,
.movie-line {
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  min-height: 57px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.list-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  margin: 22px 0;
}

.list-toolbar .site-search {
  grid-column: 1 / 2;
}

.category-intro,
.rank-banner {
  padding: 28px;
  border-radius: 30px;
  margin: 28px 0;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 82px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .065);
}

.rank-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
}

.rank-info h2 {
  margin: 0;
  font-size: 18px;
}

.rank-info p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-score {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
}

.detail-main {
  padding: 34px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--soft);
  font-size: 14px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 1fr minmax(360px, 520px);
  gap: 24px;
  align-items: stretch;
}

.detail-panel,
.copy-card {
  padding: 28px;
  border-radius: 30px;
}

.detail-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  border-radius: 30px;
  background: #050308;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
  background: #050308;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  min-width: 152px;
  transform: translate(-50%, -50%);
}

.play-button:hover {
  transform: translate(-50%, calc(-50% - 2px));
}

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

.copy-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 24px;
  margin-top: 24px;
}

.copy-card {
  background: rgba(255, 255, 255, .065);
}

.copy-card p {
  color: rgba(255, 247, 251, .78);
  font-size: 16px;
}

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

.related-link {
  display: block;
  padding: 13px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
}

.related-link strong {
  display: block;
  color: white;
}

.no-result {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: var(--panel);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 3, 8, .72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
  padding: 38px 0;
}

.footer-brand {
  margin-bottom: 10px;
}

.footer-grid p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

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

.footer-links a {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
}

.footer-bottom {
  padding: 15px 0 24px;
  color: var(--soft);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(9, 5, 15, .94);
    box-shadow: var(--shadow);
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 46px;
  }

  .hero-poster {
    width: min(260px, 68vw);
    margin: 0 auto;
  }

  .hero-search-card,
  .list-toolbar,
  .detail-hero,
  .copy-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 50px 70px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }
}

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

  .hero-shell,
  .hero-content {
    min-height: 720px;
  }

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

  .hero-search-card {
    margin-top: -92px;
  }

  .site-search {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .section-head,
  .page-head {
    display: block;
  }

  .hero-arrow {
    display: none;
  }

  .rank-item {
    grid-template-columns: 42px 58px 1fr;
    gap: 10px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
}
