* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #f97316);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.36);
}

.brand-text {
  font-size: 18px;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  padding: 9px 14px;
  border-radius: 999px;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 20px;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(90deg, #0f172a, #334155);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.42), rgba(15, 23, 42, 0.52));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  right: 32px;
  bottom: 82px;
  max-width: 760px;
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 0 0 28px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.75;
}

.hero-actions,
.detail-meta,
.footer-links,
.filter-chips,
.tag-row,
.rank-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--orange));
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn.ghost.dark {
  color: var(--ink);
  background: #f1f5f9;
  border-color: var(--line);
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #ffffff;
}

.section {
  padding: 72px 0;
}

.section-white {
  background: #ffffff;
}

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

.section-head.compact {
  margin-bottom: 20px;
}

.section h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.section h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.more-link {
  color: var(--primary);
  font-weight: 800;
}

.split-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 32px;
  align-items: center;
}

.split-intro h2 {
  margin: 0 0 12px;
}

.split-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.quick-search,
.search-page-form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--line);
}

.quick-search input,
.search-page-form input,
.page-filter-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 14px;
  font-size: 15px;
}

.quick-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #ffffff;
  font-weight: 800;
  background: var(--primary);
  cursor: pointer;
}

.category-section,
.recommend-section,
.double-strip {
  background: linear-gradient(135deg, #fff7ed, #eff6ff);
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.tile-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.15));
  z-index: 1;
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
  color: #ffffff;
}

.category-tile strong {
  bottom: 54px;
  font-size: 22px;
}

.category-tile em {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.poster-link img,
.compact-card img,
.rank-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.poster-link img {
  transition: transform 0.45s ease;
}

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.card-meta,
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-desc {
  min-height: 40px;
  margin-top: 8px;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span,
.rank-tags span,
.detail-meta span,
.filter-chips button {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.ranking-panel {
  background: #0f172a;
  color: #ffffff;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 46px;
  align-items: center;
}

.ranking-text p:not(.section-kicker) {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-num {
  color: #93c5fd;
  font-weight: 900;
}

.rank-name {
  font-weight: 800;
}

.rank-meta {
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
}

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

.strip-card,
.category-overview-card,
.copy-card {
  padding: 28px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

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

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

.compact-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  border-radius: 16px;
  background: #0f172a;
}

.compact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 56%);
}

.compact-card span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  color: #ffffff;
  font-weight: 800;
  line-height: 1.35;
}

.site-footer {
  background: #020617;
  color: rgba(255, 255, 255, 0.72);
  padding: 38px 0;
}

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

.footer-brand {
  color: #ffffff;
  font-weight: 900;
}

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

.page-main {
  background: #ffffff;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 70px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.54), transparent 32%), linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero.slim {
  padding: 72px 0 54px;
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(36px, 5vw, 58px);
}

.page-hero p:not(.section-kicker) {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.75;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.category-overview-list {
  display: grid;
  gap: 24px;
  padding: 42px 0 72px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.category-overview-head h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.category-overview-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
}

.page-filter-input {
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.filter-chips button {
  border: 0;
  cursor: pointer;
}

.filter-chips button.is-active {
  color: #ffffff;
  background: var(--primary);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.rank-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: #0f172a;
}

.rank-card h2 {
  margin: 8px 0 8px;
  font-size: 24px;
}

.rank-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.big {
  color: var(--primary);
  font-size: 13px;
}

.search-page-form {
  max-width: 680px;
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.search-page-form input {
  color: #ffffff;
}

.search-page-form input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.detail-main {
  background: #ffffff;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 580px;
  color: #ffffff;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  filter: blur(1px);
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.36));
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  min-height: 580px;
  padding: 54px 0;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.detail-info h1 {
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta span,
.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
}

.player-container {
  max-width: 980px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.34));
  cursor: pointer;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--orange));
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.36);
  font-size: 28px;
  padding-left: 4px;
}

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

.copy-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.copy-card p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

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

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

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

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

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 4px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 74px;
  }

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

  .split-intro,
  .ranking-layout,
  .two-columns,
  .detail-layout,
  .copy-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    padding-top: 34px;
  }

  .detail-poster {
    width: min(260px, 74vw);
  }

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

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

  .rank-meta {
    grid-column: 2;
  }

  .rank-card {
    grid-template-columns: 86px 1fr;
  }

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

  .quick-search,
  .search-page-form {
    border-radius: 22px;
    flex-direction: column;
    padding: 10px;
  }

  .quick-search input,
  .search-page-form input {
    min-height: 42px;
  }

  .quick-search button,
  .search-page-form button {
    min-height: 42px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .compact-grid,
  .compact-grid.four,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .compact-card {
    min-height: 220px;
  }
}
