:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 25px rgba(6, 182, 212, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 15px;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #22d3ee;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 20px;
  background: var(--slate-soft);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #22d3ee;
}

.mobile-nav.open {
  display: block;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--slate);
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.05));
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.95);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  max-width: 760px;
}

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

.hero-meta span,
.tag-row span,
.chip-list span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 13px;
  backdrop-filter: blur(10px);
}

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

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(6, 182, 212, 0.95);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dots button.active {
  width: 32px;
  background: #22d3ee;
}

main {
  min-height: 70vh;
}

.section,
.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

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

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.section-title p,
.page-lead {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 760px;
}

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

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

.movie-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.card-wide .poster-link {
  aspect-ratio: 21 / 9;
}

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

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 850;
}

.card-body h3 a:hover {
  color: var(--cyan-dark);
}

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

.tag-row,
.chip-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  background: #ecfeff;
  color: #0e7490;
  font-size: 12px;
}

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

.category-card {
  min-height: 210px;
  padding: 26px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #164e63 55%, #0369a1);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -70px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.26);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  margin: 0 0 22px;
  color: #cbd5e1;
}

.category-card span {
  position: relative;
  display: inline-flex;
  color: #67e8f9;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  margin-bottom: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.movie-filter {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-filter:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.filter-button {
  height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 64px minmax(0, 1fr) 52px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.rank-item:hover {
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: var(--shadow);
}

.rank-no {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #ecfeff;
  color: #0891b2;
  font-weight: 900;
}

.rank-item img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-text strong {
  font-size: 16px;
}

.rank-text em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  margin-top: 4px;
}

.rank-score {
  color: #f59e0b;
  font-weight: 900;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.breadcrumb a:hover {
  color: var(--cyan-dark);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 32px;
  border-radius: 30px;
  background: linear-gradient(135deg, #0f172a, #164e63);
  color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.detail-hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -90px;
  top: -90px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.18);
}

.detail-poster,
.detail-copy {
  position: relative;
  z-index: 1;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3);
  background: #020617;
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-copy .lead {
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 19px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.12);
}

.player-section,
.detail-content,
.related-section {
  margin-top: 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.player-section h2,
.detail-content h2,
.related-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
  color: var(--ink);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  font-size: 34px;
  padding-left: 5px;
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.45);
  transition: transform 0.2s ease;
}

.player-overlay:hover .play-circle {
  transform: scale(1.08);
}

.detail-content p {
  margin: 0 0 22px;
  color: #334155;
  font-size: 17px;
}

.detail-content p:last-child {
  margin-bottom: 0;
}

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

.empty-state {
  display: none;
  padding: 30px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  margin-top: 80px;
  background: var(--slate);
  color: #94a3b8;
  padding: 46px 24px 28px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  margin: 12px 0 0;
}

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

.footer-links a:hover {
  color: #22d3ee;
}

.copyright {
  max-width: 1280px;
  margin: 30px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 14px;
}

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

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

  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }
}

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

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

  .hero {
    height: 560px;
  }

  .hero-control {
    display: none;
  }

  .feature-grid,
  .rank-layout,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding: 24px;
  }

  .detail-poster {
    max-width: 300px;
  }

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

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

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

@media (max-width: 640px) {
  .nav-wrap,
  .hero-content,
  .section,
  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand {
    font-size: 19px;
  }

  .hero {
    height: 540px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(15, 23, 42, 0.9));
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 82px;
  }

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

  .hero p {
    font-size: 16px;
  }

  .section,
  .page-shell {
    padding-top: 48px;
  }

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

  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-score {
    display: none;
  }

  .rank-item img {
    width: 54px;
    height: 74px;
  }

  .player-section,
  .detail-content,
  .related-section {
    padding: 18px;
    border-radius: 22px;
  }
}
