:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --pink: #d946ef;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(217, 70, 239, 0.12), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 88%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  width: min(1240px, calc(100% - 28px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.36);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.site-nav a,
.footer-links a {
  color: #cbd5e1;
  padding: 10px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.footer-links a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.13);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
}

.nav-search input,
.filter-input,
.filter-select {
  color: var(--text);
  border: 1px solid var(--line);
  outline: none;
  background: rgba(2, 6, 23, 0.58);
}

.nav-search input {
  width: 190px;
  border: 0;
  background: transparent;
  padding: 8px 10px;
}

.nav-search button,
.primary-button,
.secondary-button,
.hero-arrow,
.player-overlay,
.filter-button {
  border: 0;
  cursor: pointer;
}

.nav-search button,
.primary-button,
.filter-button {
  color: #031018;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.22);
}

.nav-search button {
  padding: 8px 14px;
}

.nav-toggle {
  display: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
  padding: 8px 11px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero-carousel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 220px;
  background: linear-gradient(to top, #020617, transparent);
  z-index: 4;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.hero-bg.is-missing,
.poster-link img.is-missing,
.detail-poster img.is-missing,
.review-cover img.is-missing {
  display: none;
}

.hero-gradient-a,
.hero-gradient-b,
.detail-bg-overlay {
  position: absolute;
  inset: 0;
}

.hero-gradient-a {
  background: linear-gradient(to right, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
}

.hero-gradient-b {
  background: linear-gradient(to top, #020617 4%, rgba(15, 23, 42, 0.58) 48%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 5;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 380px;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  animation: slideUp 0.7s ease both;
}

.hero-eyebrow,
.section-eyebrow,
.rank-index,
.score-pill,
.poster-year {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.16);
}

.hero-eyebrow {
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 18px;
  font-size: 14px;
}

.hero-title {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  max-width: 820px;
}

.hero-title span,
.gradient-text {
  background: linear-gradient(135deg, #ffffff, #a5f3fc 45%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-summary {
  max-width: 740px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

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

.primary-button,
.secondary-button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
}

.secondary-button {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.hero-panel {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 30px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel .poster-link {
  aspect-ratio: 3 / 4;
  border-radius: 22px;
}

.hero-panel h3 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.hero-panel p {
  color: #cbd5e1;
  line-height: 1.7;
}

.hero-controls {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 30px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

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

.hero-dots button.is-active {
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.52);
}

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

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.section {
  padding: 76px 0 0;
}

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

.section-header h2,
.page-title,
.detail-title {
  margin: 0;
  letter-spacing: -0.04em;
}

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

.section-header p,
.page-lead {
  color: var(--muted);
  line-height: 1.8;
}

.section-eyebrow {
  padding: 6px 10px;
  margin-bottom: 12px;
  font-size: 13px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 24px 70px rgba(8, 145, 178, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.22), transparent 56%),
    linear-gradient(145deg, #0f172a, #111827 55%, #020617);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.86), transparent 45%);
}

.poster-year {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #031018;
  background: linear-gradient(135deg, var(--cyan), #f0abfc);
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

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

.movie-meta-line,
.breadcrumbs,
.detail-meta,
.tag-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-meta-line {
  color: var(--muted);
  font-size: 13px;
}

.movie-meta-line a {
  color: var(--cyan);
}

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

.movie-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list {
  margin-top: 12px;
}

.tag-list span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.08);
  font-size: 12px;
  padding: 5px 8px;
}

.score-pill {
  padding: 4px 7px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 52%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.94));
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.category-tile strong {
  display: block;
  font-size: 23px;
  margin-bottom: 12px;
}

.category-tile p {
  color: #cbd5e1;
  line-height: 1.7;
}

.category-count {
  display: inline-flex;
  margin-top: 18px;
  color: var(--cyan);
  font-weight: 800;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 56px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  max-width: 900px;
  font-size: clamp(38px, 6vw, 70px);
}

.page-lead {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 12px;
  margin: 28px 0 30px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 15px;
}

.results-note {
  color: var(--muted);
  margin-bottom: 18px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 78px 110px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.66);
}

.rank-index {
  width: 52px;
  height: 52px;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
}

.ranking-item .poster-link {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
}

.ranking-item h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.ranking-item p {
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0;
}

.detail-hero {
  min-height: 560px;
  display: flex;
  align-items: end;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.36;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px);
  transform: scale(1.05);
}

.detail-bg-overlay {
  background:
    linear-gradient(to top, #020617, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.52)),
    linear-gradient(to right, rgba(2, 6, 23, 0.95), transparent);
}

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: linear-gradient(145deg, #111827, #020617);
  box-shadow: var(--shadow);
}

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

.detail-title {
  margin-top: 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
}

.detail-summary {
  max-width: 860px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
  margin: 18px 0 0;
}

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

.watch-section {
  padding: 56px 0 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.72));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #031018;
  font-size: 32px;
  background: linear-gradient(135deg, var(--cyan), #f0abfc);
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.45);
}

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

.content-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.62);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.content-card p {
  color: #dbeafe;
  line-height: 2;
  margin: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  margin-top: 24px;
}

.review-cover {
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(145deg, #111827, #020617);
}

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

.no-results {
  display: none;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
}

.site-footer {
  margin-top: 86px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

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

.footer-shell p {
  color: var(--muted);
  margin: 10px 0 0;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
  }

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

  .nav-search {
    order: 4;
    width: 100%;
  }

  .nav-search input {
    width: 100%;
  }

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

  .hero-panel {
    display: none;
  }

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

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

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

  .ranking-item {
    grid-template-columns: 54px 90px 1fr;
  }

  .ranking-item .primary-button {
    grid-column: 2 / -1;
  }
}

@media (max-width: 720px) {
  .container,
  .footer-shell,
  .hero-controls {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-summary,
  .detail-summary,
  .page-lead {
    font-size: 16px;
  }

  .section {
    padding-top: 52px;
  }

  .section-header,
  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .movie-card h3 {
    font-size: 16px;
  }

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

  .content-card {
    padding: 22px;
  }

  .ranking-item {
    grid-template-columns: 48px 1fr;
  }

  .ranking-item .poster-link {
    display: none;
  }

  .ranking-item .primary-button {
    grid-column: 1 / -1;
  }
}
