:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #0891b2;
  --amber: #f59e0b;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 58%, #eef2ff 100%);
}

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

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

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

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

.nav-shell {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: 24px;
  color: var(--blue-dark);
}

.site-logo::before {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--blue-dark);
  background: #dbeafe;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #eff6ff;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--blue-dark);
  margin: 5px 0;
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.65) 46%, rgba(15, 23, 42, 0.28)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.86));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 56px;
  color: white;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #60a5fa;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  letter-spacing: -0.06em;
}

.hero-copy h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
}

.hero-copy h2 {
  margin-top: 18px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  color: #bfdbfe;
}

.hero-copy p:not(.eyebrow) {
  max-width: 720px;
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.8;
  color: #dbeafe;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

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

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

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.34);
}

.btn-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(37, 99, 235, 0.86);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.48);
}

.hero-bottom {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.hero-dots {
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: white;
}

.hero-category-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.hero-category-row a {
  padding: 9px 14px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.home-search {
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.filter-panel {
  margin: 0 0 30px;
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 20px;
  align-items: center;
}

.filter-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.filter-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 140px;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

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

.filter-empty {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border-radius: 16px;
  background: #eff6ff;
  color: var(--blue-dark) !important;
  font-weight: 800;
}

.section-block {
  padding: 58px 0;
}

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

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

.section-more {
  color: var(--blue-dark);
  font-weight: 900;
}

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

.movie-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 58px rgba(37, 99, 235, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-year,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  font-size: 12px;
}

.poster-year {
  right: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

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

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

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

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

.movie-meta,
.movie-one-line {
  color: var(--muted);
  line-height: 1.65;
}

.movie-meta {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.movie-one-line {
  margin: 10px 0 0;
  font-size: 14px;
}

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

.tag-row span {
  color: var(--blue-dark);
  background: #dbeafe;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  padding: 20px;
  border-radius: 26px;
  overflow: hidden;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.45s ease;
}

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

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

.category-tile span {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.category-tile em {
  margin-top: 8px;
  color: #dbeafe;
  font-style: normal;
  line-height: 1.55;
}

.split-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 34px;
  align-items: start;
}

.no-container {
  width: 100%;
}

.split-showcase .section-block {
  padding: 0;
}

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

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.rank-item a {
  display: grid;
  grid-template-columns: 44px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 950;
}

.rank-item img {
  width: 64px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
}

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

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.rank-copy em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  padding: 88px 0 54px;
  color: white;
  background:
    radial-gradient(circle at 20% 10%, rgba(96, 165, 250, 0.38), transparent 26rem),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 58%, #0e7490 100%);
}

.compact-hero h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.compact-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: #dbeafe;
  line-height: 1.8;
  font-size: 18px;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border-radius: 26px;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
}

.category-card-image img {
  width: 180px;
  height: 250px;
  border-radius: 20px;
  object-fit: cover;
}

.category-card-large h2 {
  margin: 4px 0 10px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.category-card-large p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card-large ul {
  margin: 0;
  padding-left: 18px;
  color: var(--blue-dark);
  line-height: 1.8;
  font-weight: 800;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.ranking-side {
  position: sticky;
  top: 96px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
}

.ranking-side h2 {
  margin: 0 0 18px;
}

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

.pagination a {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: white;
  border: 1px solid #dbeafe;
  color: var(--blue-dark);
  font-weight: 900;
}

.pagination a.active,
.pagination a:hover {
  color: white;
  background: var(--blue);
}

.detail-hero {
  padding: 54px 0;
  color: white;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.36), transparent 26rem),
    linear-gradient(135deg, #0f172a, #1e3a8a 58%, #075985);
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster img {
  width: 300px;
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  object-fit: cover;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb a:hover {
  color: white;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.lead-text {
  max-width: 850px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  margin-top: 24px;
}

.detail-tags span {
  color: white;
  background: rgba(255, 255, 255, 0.14);
}

.player-section {
  padding-bottom: 24px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.48));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.45);
  font-size: 28px;
}

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

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.article-main,
.article-side {
  padding: 28px;
  border-radius: 26px;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
}

.article-main h2,
.article-side h2 {
  margin: 0 0 16px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.article-main h2:not(:first-child) {
  margin-top: 30px;
}

.article-main p {
  margin: 0;
  color: #334155;
  line-height: 2;
  font-size: 16px;
}

.article-side dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
}

.article-side dt {
  color: var(--muted);
  font-weight: 800;
}

.article-side dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.site-footer {
  margin-top: 40px;
  padding: 46px 0;
  background: #0f172a;
  color: white;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer strong {
  font-size: 24px;
}

.site-footer p {
  margin: 10px 0 0;
  max-width: 620px;
  color: #cbd5e1;
  line-height: 1.7;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-weight: 800;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

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

  .split-grid,
  .ranking-layout,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .ranking-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    border-radius: 14px;
  }

  .hero-slider,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 48px;
    align-content: center;
  }

  .hero-poster {
    width: min(260px, 70vw);
    justify-self: center;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-category-row {
    justify-content: flex-start;
  }

  .filter-panel,
  .filter-controls,
  .detail-grid,
  .category-card-large {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .category-grid,
  .split-showcase .movie-grid,
  .category-large-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-poster img,
  .category-card-image img {
    width: min(300px, 100%);
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .nav-shell {
    height: 66px;
  }

  .site-logo {
    font-size: 20px;
  }

  .site-logo::before {
    width: 32px;
    height: 32px;
  }

  .site-nav {
    top: 66px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .movie-grid,
  .category-grid,
  .split-showcase .movie-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .section-block {
    padding: 38px 0;
  }

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

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

  .rank-item img {
    width: 56px;
    height: 78px;
  }
}
