:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #172554;
  --brand-2: #0e7490;
  --accent: #f59e0b;
  --danger: #e11d48;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.68);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(14, 116, 144, 0.28);
}

.brand-text {
  font-size: 1.1rem;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.mobile-link {
  padding: 12px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: var(--brand);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: #e2e8f0;
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #0f172a;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

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

.site-main {
  min-height: 70vh;
}

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

.section.tight {
  padding-top: 26px;
}

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

.eyebrow {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-2);
  font-weight: 900;
}

.hero-carousel {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  background: #020617;
  color: #fff;
}

.hero-slide {
  display: none;
  min-height: calc(100vh - 72px);
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.65fr);
  align-items: center;
  gap: 42px;
  padding: 60px 0;
}

.hero-slide.is-active {
  display: grid;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 20% 24%,
      rgba(14, 165, 233, 0.22),
      transparent 34%
    ),
    linear-gradient(
      110deg,
      rgba(2, 6, 23, 0.96),
      rgba(15, 23, 42, 0.82) 42%,
      rgba(15, 23, 42, 0.28)
    ),
    var(--cover-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  opacity: 0.92;
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-kicker {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e0f2fe;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-summary {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(1.02rem, 1.7vw, 1.28rem);
}

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

.hero-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: 0.2s ease;
}

.btn.primary {
  color: #111827;
  background: #fbbf24;
  box-shadow: 0 20px 45px rgba(251, 191, 36, 0.28);
}

.btn.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

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

.hero-poster {
  min-height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 34px;
  background-image:
    linear-gradient(to top, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.02)),
    var(--cover-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.45);
}

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

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

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

.quick-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 12px;
  position: relative;
  z-index: 5;
}

.quick-card {
  min-height: 104px;
  padding: 20px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: var(--shadow);
}

.quick-card strong {
  display: block;
  font-size: 1.08rem;
}

.quick-card span {
  color: #cffafe;
  font-size: 0.9rem;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.84);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  transition: 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 2.85;
  overflow: hidden;
  background-image:
    linear-gradient(to top, rgba(2, 6, 23, 0.78), rgba(15, 23, 42, 0.02)),
    var(--cover-image);
  background-size: cover;
  background-position: center;
}

.featured-card .card-cover {
  aspect-ratio: 16 / 10;
}

.card-cover::after,
.rank-cover::after,
.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 30%,
    transparent,
    rgba(2, 6, 23, 0.18)
  );
  pointer-events: none;
}

.card-badge,
.card-play {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 900;
}

.card-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.card-play {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: #111827;
  background: #fbbf24;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
}

.card-body h3,
.rank-copy h3 {
  margin: 8px 0 8px;
  color: #0f172a;
  font-size: 1.08rem;
  line-height: 1.3;
}

.card-body h3 a:hover,
.rank-copy h3 a:hover {
  color: var(--brand-2);
}

.card-body p,
.rank-copy p {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
}

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

.tag-row span {
  color: #334155;
  background: #f1f5f9;
}

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

.category-tile {
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 18px;
  border-radius: 26px;
  color: #fff;
  background-image:
    linear-gradient(to top, rgba(2, 6, 23, 0.88), rgba(14, 116, 144, 0.2)),
    var(--cover-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 1.1rem;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 5px;
  color: #dbeafe;
  font-size: 0.84rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

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

.rank-no.small {
  font-size: 0.82rem;
}

.rank-cover {
  position: relative;
  width: 92px;
  height: 116px;
  border-radius: 16px;
  background-image:
    linear-gradient(to top, rgba(2, 6, 23, 0.68), rgba(15, 23, 42, 0.02)),
    var(--cover-image);
  background-size: cover;
  background-position: center;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(
      circle at 14% 20%,
      rgba(14, 165, 233, 0.3),
      transparent 32%
    ),
    linear-gradient(135deg, #0f172a, #172554 55%, #0e7490);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-weight: 800;
}

.breadcrumbs a:hover {
  color: #fbbf24;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 1.06rem;
}

.search-panel {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin-bottom: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.search-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 12px 14px;
  color: #0f172a;
}

.search-panel span {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 16px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.page-number,
.page-step {
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
  color: #334155;
  font-weight: 900;
}

.page-number.active,
.page-step:hover,
.page-number:hover {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.page-step.muted {
  color: #94a3b8;
  background: #f1f5f9;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.96),
      rgba(15, 23, 42, 0.82) 46%,
      rgba(15, 23, 42, 0.26)
    ),
    var(--cover-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.detail-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 42px;
  align-items: center;
  padding: 74px 0;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.detail-copy p {
  color: #dbeafe;
}

.detail-poster {
  min-height: 480px;
  border-radius: 32px;
  background-image:
    linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.02)),
    var(--cover-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.45);
}

.detail-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.55fr);
  gap: 30px;
  padding: 48px 0;
}

.content-panel,
.side-panel {
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.content-panel {
  padding: 26px;
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.content-panel p {
  margin: 0 0 18px;
  color: #334155;
}

.meta-table {
  display: grid;
  gap: 10px;
}

.meta-table div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.meta-table span:first-child {
  color: #64748b;
  font-weight: 900;
}

.side-panel {
  padding: 20px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(15, 23, 42, 0.08),
    rgba(2, 6, 23, 0.42)
  );
  transition: 0.2s ease;
}

.video-shell.is-playing .player-overlay {
  opacity: 0;
}

.play-button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  background: #fbbf24;
  color: #111827;
  font-weight: 950;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 22px 50px rgba(251, 191, 36, 0.34);
}

.player-error {
  display: none;
  padding: 14px 16px;
  color: #fecdd3;
  background: rgba(190, 18, 60, 0.22);
}

.player-error.show {
  display: block;
}

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

.related-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
}

.related-thumb {
  width: 64px;
  height: 78px;
  border-radius: 12px;
  background-image:
    linear-gradient(to top, rgba(2, 6, 23, 0.64), rgba(15, 23, 42, 0.02)),
    var(--cover-image);
  background-size: cover;
  background-position: center;
}

.related-title {
  display: block;
  color: #0f172a;
  font-weight: 900;
}

.related-meta {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
}

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

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

.footer-inner strong {
  color: #fff;
}

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

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

.copyright {
  font-size: 0.85rem;
}

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

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

  .hero-poster,
  .detail-poster {
    min-height: 380px;
  }

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

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

  .menu-button {
    display: inline-block;
  }

  .nav-wrap {
    height: 64px;
  }

  .hero-carousel,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    padding: 42px 0 76px;
  }

  .hero-poster,
  .detail-poster {
    min-height: 300px;
  }

  .quick-bar,
  .movie-grid,
  .movie-grid.dense,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item .text-link {
    grid-column: 2 / -1;
  }

  .rank-cover {
    width: 72px;
    height: 92px;
  }

  .detail-inner,
  .page-hero-inner {
    padding: 46px 0;
  }

  .detail-grid {
    padding: 28px 0;
  }
}
