:root {
  --bg: #0f1020;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --accent: #ec4899;
  --orange: #f97316;
  --green: #16a34a;
  --shadow: 0 20px 45px rgba(15, 16, 32, 0.14);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 16, 32, 0.88);
  color: #fff;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 22px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.3);
}

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

.nav a {
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  font-size: 22px;
}

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

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.55), transparent 32%),
              radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.65), transparent 36%),
              linear-gradient(135deg, #312e81 0%, #581c87 48%, #831843 100%);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.15);
}

.hero::after,
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 16, 32, 0.82) 0%, rgba(15, 16, 32, 0.52) 45%, rgba(15, 16, 32, 0.78) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
  padding: 72px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(124, 58, 237, 0.86);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
}

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

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
}

.hero-card {
  position: relative;
  z-index: 3;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
}

.hero-card-title {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 800;
}

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

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

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

.section {
  padding: 54px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 20px;
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(124, 58, 237, 0.88);
  font-size: 12px;
  font-weight: 800;
}

.score {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.90);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
}

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

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

.movie-line {
  color: #4b5563;
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-link {
  margin-top: auto;
  padding-top: 12px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

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

.category-card {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #312e81, #7c3aed 52%, #ec4899);
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.24);
  overflow: hidden;
  position: relative;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -26px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-card strong {
  font-size: 22px;
  position: relative;
  z-index: 2;
}

.category-card span {
  color: rgba(255, 255, 255, 0.78);
  position: relative;
  z-index: 2;
}

.search-panel {
  margin: -44px auto 0;
  position: relative;
  z-index: 10;
  width: min(1180px, calc(100% - 32px));
  border-radius: 24px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 16, 32, 0.18);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

.input,
.select {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  font-size: 15px;
}

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

.page-hero {
  padding: 70px 0 46px;
  color: #fff;
  background: radial-gradient(circle at 18% 0%, rgba(236, 72, 153, 0.45), transparent 34%),
              linear-gradient(135deg, #111827, #312e81 48%, #831843);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 82px minmax(0, 1fr) 120px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
}

.rank-no {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.rank-poster {
  width: 82px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-title {
  margin: 0;
  font-weight: 850;
  font-size: 18px;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

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

.player-shell {
  overflow: hidden;
  border-radius: 28px;
  background: #050510;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.25);
}

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

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050510;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(5, 5, 16, 0.68), rgba(5, 5, 16, 0.18));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 20px 50px rgba(236, 72, 153, 0.38);
  font-size: 34px;
  cursor: pointer;
}

.detail-card {
  border-radius: 26px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

.detail-card h2,
.detail-card h3 {
  margin-top: 0;
}

.detail-poster {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.prose {
  color: #374151;
  font-size: 16px;
}

.prose p {
  margin: 0 0 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #ede9fe;
  font-size: 13px;
  font-weight: 700;
}

.footer {
  margin-top: 48px;
  padding: 36px 0;
  color: rgba(255, 255, 255, 0.72);
  background: #111827;
}

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

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.page-chip {
  display: inline-flex;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--primary);
  background: #ede9fe;
  font-weight: 800;
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

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

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

  .hero-card {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 20px;
    background: rgba(15, 16, 32, 0.96);
  }

  .nav.open {
    display: flex;
  }

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

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

  .section {
    padding: 38px 0;
  }

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

  .rank-item .btn {
    grid-column: 2 / 4;
    width: 100%;
  }
}
