:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --purple: #7c3aed;
  --purple-dark: #5b21b6;
  --pink: #db2777;
  --red: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.96), rgba(88, 28, 135, 0.96), rgba(157, 23, 77, 0.96));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.22);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.35);
  font-size: 14px;
}

.logo-text {
  font-size: 22px;
  background: linear-gradient(90deg, #ddd6fe, #fbcfe8);
  -webkit-background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 15px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  padding: 11px 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.07);
}

.mobile-nav-link.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: linear-gradient(135deg, #312e81, #581c87 48%, #831843);
  color: #ffffff;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(88, 28, 135, 0.5), rgba(15, 23, 42, 0.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  min-height: 78vh;
  margin: 0 auto;
  padding: 70px 20px 84px;
  display: flex;
  align-items: center;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #c084fc;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-pill {
  display: inline-block;
  padding: 7px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: #7c3aed;
  font-size: 14px;
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.35);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
}

.hero-desc {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 34px;
}

.hero-meta span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

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

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, #7c3aed, #db2777);
  box-shadow: 0 16px 34px rgba(219, 39, 119, 0.32);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-light {
  color: #5b21b6;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

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

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

.main-section,
.page-hero,
.detail-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 68px 20px;
}

.page-hero {
  padding-top: 58px;
  padding-bottom: 36px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  flex: 0 0 auto;
  color: var(--purple);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.poster-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(124, 58, 237, 0.92);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title {
  display: block;
  min-height: 48px;
  color: #111827;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.4;
}

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

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

.movie-line {
  min-height: 48px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.tag-list a,
.tag-list span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #6d28d9;
  background: #f3e8ff;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 210px;
  padding: 26px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #4c1d95, #7c3aed 50%, #db2777);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, #0f766e, #2563eb 55%, #7c3aed);
}

.category-card:nth-child(3n + 3) {
  background: linear-gradient(135deg, #9f1239, #ea580c 55%, #7c2d12);
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
}

.category-card span {
  display: inline-flex;
  font-weight: 850;
}

.filter-panel {
  max-width: 1180px;
  margin: 0 auto 28px;
  padding: 0 20px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(150px, 1fr));
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-row label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.filter-row input,
.filter-row select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #f9fafb;
  outline: none;
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 74px 112px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-number {
  color: var(--purple);
  font-size: 32px;
  font-weight: 900;
  text-align: center;
}

.ranking-poster {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1e1b4b, #831843);
}

.ranking-poster img {
  height: 100%;
  object-fit: cover;
}

.ranking-info h2,
.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-info p {
  margin: 0;
  color: var(--muted);
}

.ranking-heat {
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #ef4444, #db2777);
  font-weight: 850;
}

.breadcrumb {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px 0;
  color: var(--muted);
  font-size: 14px;
}

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

.player-wrap {
  background: #000000;
}

.player-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.18), rgba(0, 0, 0, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
}

.player-play {
  position: relative;
  z-index: 4;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  box-shadow: 0 22px 48px rgba(219, 39, 119, 0.38);
  font-size: 34px;
  cursor: pointer;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.detail-card {
  padding: 30px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4.5vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.detail-card h2,
.detail-side h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-card p {
  color: #374151;
  font-size: 16px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(135deg, #1e1b4b, #831843);
  box-shadow: var(--shadow-soft);
}

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

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

.side-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.side-link img {
  height: 104px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #1e1b4b, #831843);
}

.side-link strong {
  display: block;
  margin: 6px 0;
  line-height: 1.35;
}

.side-link span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: linear-gradient(135deg, #0f172a, #1e1b4b 55%, #111827);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 34px;
}

.footer-brand p {
  max-width: 420px;
  color: #9ca3af;
}

.footer-column h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

.footer-column ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.footer-column a:hover {
  color: #c084fc;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 20px;
  text-align: center;
  color: #9ca3af;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

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

  .nav-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 72vh;
  }

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

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

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

  .movie-title {
    min-height: auto;
    font-size: 15px;
  }

  .movie-line {
    min-height: auto;
    font-size: 13px;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

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

  .ranking-item {
    grid-template-columns: 46px 78px 1fr;
  }

  .ranking-heat {
    grid-column: 3;
    justify-self: start;
  }

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

  .detail-card {
    padding: 22px;
  }
}

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

  .hero-actions {
    display: grid;
  }

  .ranking-item {
    grid-template-columns: 40px 72px 1fr;
    gap: 12px;
  }
}
