:root {
  --blue-900: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --cyan-500: #06b6d4;
  --green-50: #f0fdf4;
  --blue-50: #eff6ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.navbar {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  transition: transform 0.25s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.08) rotate(-4deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a {
  opacity: 0.92;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: #dbeafe;
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 10px 24px 18px;
  background: rgba(30, 64, 175, 0.98);
}

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

.mobile-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700), var(--cyan-500));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(30, 64, 175, 0.46), rgba(6, 182, 212, 0.24)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  color: var(--white);
  padding: 88px 0 108px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #e0f2fe;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.hero h1,
.hero h2 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  font-size: clamp(18px, 2.4vw, 24px);
  color: #dbeafe;
}

.hero-actions,
.detail-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: var(--blue-700);
  background: var(--white);
  box-shadow: 0 14px 35px rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  background: #eff6ff;
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.btn-secondary:hover {
  color: var(--blue-700);
  background: var(--white);
}

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

.tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 700;
}

.hero .tag {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
}

.hero-panel {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 34px;
  z-index: 3;
  padding: 22px;
  border-radius: 18px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
}

.hero-panel strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 72px 0;
}

.section-white {
  background: var(--white);
}

.section-soft {
  background: linear-gradient(135deg, var(--green-50), var(--blue-50));
}

.section-gray {
  background: var(--gray-100);
}

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

.section-kicker {
  margin: 0 0 6px;
  color: var(--blue-600);
  font-size: 14px;
  font-weight: 800;
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 10px 0 0;
  color: var(--gray-600);
}

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

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

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

.movie-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x proximity;
}

.movie-row .movie-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
}

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
  position: relative;
  overflow: hidden;
  background-color: #0f172a;
  background-image:
    linear-gradient(160deg, rgba(37, 99, 235, 0.38), rgba(6, 182, 212, 0.22)),
    var(--poster-image);
  background-size: cover;
  background-position: center;
}

.poster-card {
  aspect-ratio: 2 / 3;
}

.poster-wide {
  height: 190px;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.52));
  opacity: 0.72;
}

.movie-card-link:hover .poster {
  filter: saturate(1.08);
}

.quality {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(239, 68, 68, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(37, 99, 235, 0.84);
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card-link:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card-link:hover h3 {
  color: var(--blue-600);
}

.card-body p {
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--gray-500);
  font-size: 12px;
  white-space: nowrap;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  padding: 18px;
  margin-bottom: 26px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--gray-800);
  background: var(--gray-50);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.empty-state {
  display: none;
  padding: 38px;
  border-radius: 20px;
  color: var(--gray-600);
  background: var(--white);
  text-align: center;
}

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

.category-card {
  min-height: 132px;
  padding: 22px;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card strong {
  font-size: 22px;
}

.category-card span {
  color: #dbeafe;
  font-size: 14px;
}

.page-hero,
.category-hero {
  padding: 72px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-900), var(--blue-600), var(--cyan-500));
}

.page-hero h1,
.category-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero p,
.category-hero p {
  width: min(760px, 100%);
  margin: 16px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.rank-item {
  counter-increment: ranking;
  display: grid;
  grid-template-columns: 74px 110px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.rank-number {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
  font-size: 18px;
  font-weight: 900;
}

.rank-poster {
  height: 74px;
  border-radius: 14px;
}

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

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

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.rank-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 12px;
  font-weight: 700;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.68), rgba(6, 182, 212, 0.28)),
    var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: center;
  min-height: 560px;
  padding: 72px 24px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 700;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
}

.detail-lead {
  width: min(760px, 100%);
  margin: 0;
  color: #dbeafe;
  font-size: 21px;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.meta-pills span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #e0f2fe;
  font-weight: 700;
  font-size: 13px;
}

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

.story-card,
.info-card,
.player-section,
.related-panel {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.story-card {
  padding: 30px;
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.story-card p {
  margin: 0 0 26px;
  color: var(--gray-700);
  font-size: 17px;
}

.info-card {
  padding: 24px;
}

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

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row span:first-child {
  color: var(--gray-500);
}

.info-row span:last-child {
  text-align: right;
  font-weight: 700;
}

.player-section {
  overflow: hidden;
}

.player-shell {
  position: relative;
  min-height: 480px;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.86)),
    var(--player-image);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.movie-video {
  width: 100%;
  height: 480px;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: rgba(15, 23, 42, 0.42);
  cursor: pointer;
}

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

.player-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.9);
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.38);
  font-size: 34px;
}

.player-title {
  font-size: 18px;
  font-weight: 900;
}

.player-copy {
  padding: 24px 28px;
}

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

.player-copy p {
  margin: 0;
  color: var(--gray-600);
}

.related-panel {
  padding: 28px;
}

.related-panel h2 {
  margin: 0 0 20px;
  font-size: 28px;
}

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 16px;
}

.footer-grid p,
.footer-grid a {
  color: var(--gray-400);
  font-size: 14px;
}

.footer-grid a:hover {
  color: #60a5fa;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px 24px;
  color: var(--gray-500);
  text-align: center;
  font-size: 13px;
}

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

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

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

  .detail-poster {
    width: min(280px, 100%);
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-panel {
    display: none;
  }

  .section {
    padding: 54px 0;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
  }

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

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

  .rank-item {
    grid-template-columns: 54px 78px 1fr;
  }

  .rank-action {
    grid-column: 1 / -1;
  }

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

@media (max-width: 560px) {
  .navbar,
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1,
  .hero h2 {
    font-size: 40px;
  }

  .hero-copy {
    padding-top: 72px;
  }

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

  .movie-row .movie-card {
    flex-basis: 270px;
  }

  .detail-hero-inner {
    padding: 48px 16px;
  }

  .movie-video,
  .player-shell {
    height: 300px;
    min-height: 300px;
  }

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