:root {
  --bg: #f8fafc;
  --bg-soft: #eef2ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --gold: #facc15;
  --slate: #020617;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  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", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  backdrop-filter: blur(18px);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.has-hero .site-header:not(.is-scrolled) {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.10));
  border-bottom-color: transparent;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

.brand-copy {
  display: grid;
  min-width: 0;
}

.brand-name {
  font-weight: 800;
  font-size: 21px;
  line-height: 1.1;
  color: #0f172a;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.has-hero .site-header:not(.is-scrolled) .brand-name,
.has-hero .site-header:not(.is-scrolled) .nav-link {
  color: #fff;
}

.has-hero .site-header:not(.is-scrolled) .brand-subtitle {
  color: rgba(226, 232, 240, 0.92);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.10);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.08);
  cursor: pointer;
  padding: 10px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: currentColor;
}

.has-hero .site-header:not(.is-scrolled) .mobile-toggle {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

.page-main {
  padding-top: 108px;
}

.has-hero .page-main {
  padding-top: 0;
}

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

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

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

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.18));
}

.hero-slide::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 220px;
  background: linear-gradient(0deg, var(--bg), rgba(248, 250, 252, 0));
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  padding-top: 72px;
}

.hero-copy {
  width: min(760px, 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 680px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px);
  background: var(--blue-dark);
}

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.secondary-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.ghost-button {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.10);
}

.ghost-button:hover {
  background: rgba(37, 99, 235, 0.16);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-prev {
  left: max(20px, calc((100% - 1180px) / 2 - 70px));
}

.hero-next {
  right: max(20px, calc((100% - 1180px) / 2 - 70px));
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: #fff;
}

.section {
  padding: 46px 0;
}

.section:first-child {
  padding-top: 56px;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 5px;
  color: var(--blue);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.section-heading h2,
.page-title h1,
.detail-title {
  margin: 0;
  color: #0f172a;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.88);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link,
.poster-wrap {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

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

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: rgba(37, 99, 235, 0.86);
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.30);
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.year-chip {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #0f172a;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

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

.card-meta {
  display: flex;
  gap: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 8px 0 7px;
  font-size: 16px;
  line-height: 1.35;
}

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

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 3px 8px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: 24px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  box-shadow: var(--shadow-soft);
}

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

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #be123c, #7c3aed);
}

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

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

.category-card span {
  font-weight: 900;
}

.page-title {
  padding: 42px 0 26px;
}

.page-title h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.search-box span {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}

.filter-controls label {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.filter-controls label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-controls select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

.empty-state {
  margin: 24px 0 6px;
  padding: 18px;
  border-radius: 18px;
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.rank-panel {
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.88);
}

.rank-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 38px 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: #eef2ff;
  transform: translateX(4px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: #0f172a;
  font-weight: 900;
}

.rank-item:nth-child(1) .rank-number {
  background: #dc2626;
}

.rank-item:nth-child(2) .rank-number {
  background: #ea580c;
}

.rank-item:nth-child(3) .rank-number {
  background: #ca8a04;
}

.rank-poster {
  display: block;
  overflow: hidden;
  width: 72px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-info h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

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

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: start;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.28);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.72);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.22));
}

.play-button {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.36);
  cursor: pointer;
  font-size: 28px;
  transform: translateZ(0);
}

.play-button:hover {
  background: var(--blue-dark);
}

.detail-title {
  margin-top: 24px;
  font-size: clamp(30px, 4vw, 50px);
}

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

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.10);
  font-weight: 800;
}

.detail-summary,
.detail-review,
.side-card {
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.88);
}

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

.detail-summary p,
.detail-review p,
.side-card p {
  margin: 0;
  color: #475569;
}

.detail-main {
  display: grid;
  gap: 18px;
}

.side-card {
  position: sticky;
  top: 96px;
}

.side-poster {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
  margin-bottom: 18px;
}

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

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.site-footer {
  margin-top: 48px;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  gap: 16px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: #94a3b8;
}

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

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

.copyright {
  font-size: 13px;
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-control {
    display: none;
  }

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

  .side-card {
    position: static;
  }
}

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

  .brand-subtitle {
    display: none;
  }

  .page-main {
    padding-top: 90px;
  }

  .hero-slider,
  .hero-slide img {
    min-height: 560px;
  }

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

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

  .section-heading {
    display: grid;
  }

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

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

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

  .filter-controls label,
  .filter-controls button {
    width: 100%;
  }

  .rank-item {
    grid-template-columns: 34px 60px 1fr;
  }

  .rank-poster {
    width: 60px;
  }
}
