:root {
  --bg: #f7f9fc;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --blue-soft: #dbeafe;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-logo-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  font-size: 20px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #eef2ff;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 16px;
  gap: 10px;
  overflow-x: auto;
}

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

.mobile-link {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  background-size: cover;
  background-position: center;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.06));
}

.hero-content {
  position: absolute;
  left: max(22px, calc((100% - 1280px) / 2 + 22px));
  right: max(22px, calc((100% - 1280px) / 2 + 22px));
  bottom: 78px;
  z-index: 3;
  max-width: 760px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.72);
  color: #dbeafe;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

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

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  font-weight: 700;
  font-size: 14px;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
}

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

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

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

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.11);
}

.hero-rail {
  position: absolute;
  right: max(22px, calc((100% - 1280px) / 2 + 22px));
  bottom: 66px;
  z-index: 4;
  width: min(390px, 34vw);
  display: grid;
  gap: 12px;
}

.hero-mini {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.hero-mini.is-active {
  background: rgba(37, 99, 235, 0.76);
}

.hero-mini img {
  width: 90px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-mini strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.hero-mini span {
  display: block;
  margin-top: 4px;
  color: #dbeafe;
  font-size: 12px;
}

.page-hero {
  padding: 70px 0 46px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.36), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #111827 55%, #1e3a8a 100%);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.section {
  padding: 58px 0;
}

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

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

.section-heading span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.section-heading p {
  margin: 9px 0 0;
  color: var(--muted);
}

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

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

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

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

.movie-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.cover-box {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

.movie-card.poster .cover-box {
  aspect-ratio: 3 / 4;
}

.movie-card.wide .cover-box {
  aspect-ratio: 16 / 9;
}

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

.movie-card-link:hover .cover-box img,
.category-card:hover img {
  transform: scale(1.08);
}

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 48%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card-link:hover .cover-gradient {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.88);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  opacity: 0;
  transition: 0.25s ease;
}

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

.duration-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

.movie-card-body strong {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-body span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-body em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  border-radius: 22px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--shadow-soft);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transition: transform 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.24));
}

.category-card-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 22px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.category-card p {
  margin: 0 0 14px;
  color: #dbeafe;
  font-size: 14px;
}

.category-card span {
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.82);
  font-weight: 800;
  font-size: 12px;
}

.feature-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.feature-cover {
  min-height: 430px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

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

.feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 10px;
}

.feature-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.feature-copy p {
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.filter-scope {
  display: block;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(130px, 0.5fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  font: inherit;
  outline: none;
}

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

.reset-filter {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.filter-count {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.rank-row {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 58px 94px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  font-weight: 900;
}

.rank-thumb {
  width: 94px;
  height: 58px;
  overflow: hidden;
  border-radius: 12px;
  background: #dbeafe;
}

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

.rank-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info span,
.rank-info em {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  font-size: 13px;
}

.rank-action {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--blue);
  background: #dbeafe;
  font-weight: 900;
}

.detail-hero {
  padding: 44px 0 36px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.82)),
    radial-gradient(circle at 70% 20%, rgba(37, 99, 235, 0.42), transparent 36%),
    #020617;
}

.breadcrumb {
  margin-bottom: 22px;
  color: #bfdbfe;
  font-size: 14px;
}

.breadcrumb a {
  color: #dbeafe;
  font-weight: 800;
}

.detail-intro {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 28px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-copy p {
  max-width: 900px;
  color: #e5e7eb;
  font-size: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.content-card,
.side-card {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.content-card {
  padding: 26px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.content-card p {
  color: #374151;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
  background: #f8fafc;
}

.info-table th,
.info-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  width: 96px;
  color: #64748b;
  font-weight: 900;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
  font-size: 34px;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.side-card {
  padding: 20px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
}

.side-item img {
  width: 82px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
  display: block;
}

.pagination-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

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

  .hero-rail {
    display: none;
  }

  .feature-panel,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .feature-cover {
    min-height: 340px;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  .header-inner {
    height: 68px;
  }

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

  .brand-subtitle {
    display: none;
  }

  .container {
    width: min(100% - 28px, 1280px);
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 44px;
  }

  .hero-meta span {
    font-size: 12px;
  }

  .section {
    padding: 42px 0;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 10px;
  }

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

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

  .rank-row a {
    grid-template-columns: 46px 72px 1fr;
  }

  .rank-action {
    display: none;
  }

  .rank-thumb {
    width: 72px;
    height: 50px;
  }

  .detail-intro {
    grid-template-columns: 116px 1fr;
    gap: 16px;
    align-items: center;
  }

  .detail-poster {
    border-radius: 16px;
  }

  .detail-copy p {
    font-size: 15px;
  }

  .content-card,
  .side-card {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.wide-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
