:root {
  --mist-950: #020617;
  --mist-900: #0f172a;
  --mist-800: #1e293b;
  --mist-700: #334155;
  --mist-600: #475569;
  --mist-500: #64748b;
  --mist-400: #94a3b8;
  --mist-300: #cbd5e1;
  --mist-200: #e2e8f0;
  --mist-100: #f1f5f9;
  --mist-50: #f8fafc;
  --lake-700: #0369a1;
  --lake-600: #0284c7;
  --lake-500: #0ea5e9;
  --lake-400: #38bdf8;
  --lake-100: #e0f2fe;
  --lake-50: #f0f9ff;
  --sepia-100: #f5f1ea;
  --sepia-50: #faf8f5;
  --amber-600: #d97706;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-strong: 0 25px 60px rgba(15, 23, 42, 0.22);
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--mist-900);
  background: linear-gradient(180deg, var(--sepia-50), var(--white));
}

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(15, 23, 42, 0.96);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--mist-900);
  background: linear-gradient(135deg, var(--lake-400), var(--lake-100));
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.12);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand-text small {
  display: block;
  margin-top: 2px;
  color: var(--mist-400);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--mist-200);
  font-size: 14px;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--lake-400);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.3), transparent 30%), var(--mist-900);
}

.hero-track,
.hero-slide,
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.28)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 120px;
  max-width: 760px;
  animation: slideUp 0.65s ease both;
}

.hero-kicker {
  color: var(--lake-400);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 14px 0 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  font-weight: 800;
}

.hero h2 {
  margin: 16px 0 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.16;
}

.hero p,
.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--mist-200);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--lake-700);
  background: var(--lake-100);
}

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

.primary-btn,
.ghost-btn,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-form button {
  border: 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--lake-600), var(--lake-400));
  box-shadow: 0 18px 30px rgba(2, 132, 199, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form button:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.hero-search {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 78px;
  width: min(760px, calc(100% - 32px));
  transform: translateX(-50%);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(14px);
}

.search-form input {
  min-width: 0;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.search-form input::placeholder {
  color: var(--mist-300);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: min(60px, 6vw);
  bottom: 96px;
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 28px;
  background: var(--lake-400);
}

.content-section {
  padding: 72px 0;
}

.content-section.muted {
  background: var(--mist-50);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--mist-600);
}

.section-link {
  flex-shrink: 0;
  color: var(--lake-600);
  font-weight: 700;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--mist-900), var(--lake-700));
}

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

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

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--mist-900);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
}

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

.movie-card h3,
.ranking-info h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover {
  color: var(--lake-600);
}

.movie-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--mist-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--mist-500);
  font-size: 12px;
}

.movie-meta span {
  border-radius: 8px;
  padding: 4px 8px;
  background: var(--mist-100);
}

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

.movie-card.compact {
  display: grid;
  grid-template-columns: 92px 1fr;
}

.movie-card.compact .poster-link {
  aspect-ratio: auto;
  min-height: 142px;
}

.movie-card.compact .movie-card-body {
  padding: 14px;
}

.movie-card.compact .movie-line {
  min-height: 0;
  -webkit-line-clamp: 2;
}

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

.category-tile {
  min-height: 220px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--white), var(--lake-50));
  border: 1px solid rgba(14, 165, 233, 0.18);
  box-shadow: var(--shadow-soft);
}

.category-tile strong,
.category-tile span,
.category-tile small {
  display: block;
}

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

.category-tile span {
  margin-top: 10px;
  color: var(--mist-600);
  line-height: 1.7;
}

.category-tile small {
  margin-top: 12px;
  color: var(--lake-600);
  font-weight: 800;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mini-links a {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--mist-700);
  font-size: 12px;
  background: var(--white);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-card {
  position: sticky;
  top: 88px;
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--white);
  background: linear-gradient(160deg, var(--mist-900), var(--lake-700));
  box-shadow: var(--shadow-strong);
}

.ranking-card h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.rank-list a {
  font-weight: 700;
}

.rank-list em {
  display: block;
  grid-column: 2;
  color: var(--mist-300);
  font-size: 12px;
  font-style: normal;
}

.rank-num {
  color: var(--lake-400);
  font-weight: 900;
}

.primary-btn.full {
  width: 100%;
  margin-top: 20px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--mist-900), var(--mist-800) 55%, var(--lake-700));
}

.small-hero {
  padding: 72px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  color: var(--mist-300);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--lake-400);
}

.filter-panel {
  margin-bottom: 26px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 7px;
  color: var(--mist-600);
  font-size: 13px;
  font-weight: 700;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--mist-200);
  border-radius: 12px;
  outline: 0;
  padding: 0 12px;
  color: var(--mist-900);
  background: var(--white);
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--lake-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.result-count {
  margin: 12px 0 0;
  color: var(--mist-500);
  font-size: 14px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 62px 120px 1fr;
  gap: 18px;
  align-items: center;
  padding: 12px;
}

.rank-index {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--lake-600), var(--mist-900));
}

.ranking-poster {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  background: var(--mist-800);
}

.ranking-info p {
  margin: 8px 0 0;
  color: var(--mist-600);
  line-height: 1.6;
}

.detail-hero {
  min-height: 520px;
}

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

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

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--mist-950), rgba(15, 23, 42, 0.88));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 64px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: var(--mist-800);
  box-shadow: var(--shadow-strong);
}

.detail-info h1 {
  margin: 20px 0 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
}

.detail-line {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--mist-200);
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.detail-tags {
  margin-top: 20px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.player-wrap {
  overflow: hidden;
  border-radius: 24px;
  background: var(--mist-950);
  box-shadow: var(--shadow-strong);
}

.player-poster {
  position: relative;
  aspect-ratio: 16 / 9;
}

.player-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.15));
}

.player-button {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 170px;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--lake-600), var(--lake-400));
  box-shadow: 0 20px 40px rgba(2, 132, 199, 0.35);
}

.player-button:hover {
  transform: translate(-50%, -52%);
}

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

.video-player.is-active {
  display: block;
}

.player-poster.is-hidden {
  display: none;
}

.player-message {
  margin: 0;
  padding: 12px 18px;
  color: var(--mist-300);
  font-size: 14px;
}

.prose-card {
  border-radius: 24px;
  padding: clamp(22px, 4vw, 42px);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.prose-card h2 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.prose-card h2:first-child {
  margin-top: 0;
}

.prose-card p {
  margin: 0;
  color: var(--mist-700);
  font-size: 16px;
  line-height: 1.9;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--mist-100);
  padding: 10px 0;
}

.info-list dt {
  color: var(--mist-500);
  font-weight: 700;
}

.info-list dd {
  margin: 0;
}

.prose-tags {
  margin-top: 8px;
}

.site-footer {
  color: var(--mist-300);
  background: var(--mist-900);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 42px 0;
}

.footer-logo {
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
}

.site-footer p {
  max-width: 600px;
  margin: 10px 0 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: start;
}

.footer-links a:hover {
  color: var(--lake-400);
}

.is-hidden-by-filter {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .ranking-card {
    position: static;
  }

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

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

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

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

  .main-nav a {
    padding: 12px 0;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 96px;
  }

  .hero-search {
    bottom: 86px;
  }

  .search-form {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .search-form input,
  .search-form button {
    min-height: 48px;
  }

  .hero-dots {
    left: 50%;
    right: auto;
    bottom: 42px;
    transform: translateX(-50%);
  }

  .section-heading,
  .footer-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-heading {
    display: grid;
  }

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

  .movie-card.compact {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .ranking-row {
    grid-template-columns: 46px 92px 1fr;
    gap: 12px;
  }

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

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

  .ranking-row {
    grid-template-columns: 42px 78px 1fr;
  }

  .ranking-info p,
  .ranking-info .tag-list {
    display: none;
  }

  .content-section {
    padding: 48px 0;
  }
}
