:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --accent-300: #fcd34d;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  --white: #ffffff;
  --black: #020617;
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--neutral-900);
  background: var(--neutral-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--neutral-900);
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

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

.primary-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--neutral-700);
  transition: color 0.2s ease, background 0.2s ease;
}

.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--primary-700);
  background: var(--primary-50);
}

.header-search {
  width: 260px;
  position: relative;
}

.search-input {
  width: 100%;
  border: 1px solid var(--neutral-200);
  border-radius: 999px;
  padding: 11px 44px 11px 16px;
  color: var(--neutral-900);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.search-button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--primary-600);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: var(--white);
  color: var(--neutral-900);
}

.hero {
  padding: 32px 0 24px;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--neutral-900);
  box-shadow: var(--shadow-xl);
}

.hero-track {
  height: 600px;
  display: flex;
  transition: transform 0.5s ease;
}

.hero-slide {
  min-width: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.24) 100%);
  z-index: -2;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0));
  z-index: -1;
}

.hero-content {
  width: min(720px, calc(100% - 48px));
  padding: 56px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--accent-300);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 7vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero h2 {
  font-size: clamp(32px, 6vw, 58px);
}

.hero p {
  max-width: 640px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.button-primary {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26);
}

.button-primary:hover {
  background: var(--primary-700);
}

.button-light {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.button-soft {
  color: var(--primary-700);
  background: var(--primary-50);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(2, 6, 23, 0.54);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.hero-carousel:hover .hero-control {
  opacity: 1;
}

.hero-control:hover {
  background: rgba(2, 6, 23, 0.76);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--white);
}

.page-main {
  padding: 32px 0 64px;
}

.section {
  margin: 0 0 54px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--neutral-600);
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: var(--shadow-xl);
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--neutral-200);
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0) 40%, rgba(2, 6, 23, 0.72) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster::after {
  opacity: 1;
}

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--white);
  background: var(--accent-500);
  font-size: 12px;
  font-weight: 800;
}

.meta-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-title {
  min-height: 48px;
  margin: 0;
  color: var(--neutral-900);
  font-size: 17px;
  line-height: 1.42;
  font-weight: 800;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--primary-700);
}

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

.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--neutral-600);
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  font-size: 13px;
  font-weight: 700;
}

.chip.primary {
  color: var(--primary-700);
  background: var(--primary-50);
}

.category-panel,
.content-panel,
.filter-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.16);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  margin: 0 0 18px;
  color: var(--neutral-600);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: var(--neutral-200);
}

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

.rank-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.page-hero {
  padding: 54px 0 32px;
  color: var(--white);
  background:
    radial-gradient(circle at 12% 10%, rgba(59, 130, 246, 0.34), transparent 34%),
    radial-gradient(circle at 86% 22%, rgba(245, 158, 11, 0.28), transparent 30%),
    linear-gradient(135deg, #0f172a, #172554 52%, #0f172a);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--neutral-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-700);
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--neutral-900);
  background: var(--white);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

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

.player-card {
  overflow: hidden;
  border-radius: 26px;
  background: var(--neutral-900);
  box-shadow: var(--shadow-xl);
}

.player-shell {
  position: relative;
  background: var(--black);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--black);
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.34);
  font-size: 34px;
  transform: scale(1);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay:hover .play-circle {
  transform: scale(1.08);
  background: var(--primary-700);
}

.detail-content {
  margin-top: 24px;
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.detail-content h2 {
  margin: 28px 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.detail-content p {
  margin: 0 0 14px;
  color: var(--neutral-700);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.side-card {
  overflow: hidden;
  padding: 18px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 900;
}

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

.side-link {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--neutral-50);
  transition: background 0.2s ease;
}

.side-link:hover {
  background: var(--primary-50);
}

.side-link img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.side-link strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.35;
}

.side-link span {
  color: var(--neutral-600);
  font-size: 12px;
}

.horizontal-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 0 18px;
  scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
  min-width: 280px;
  scroll-snap-align: start;
}

.no-results {
  display: none;
  padding: 30px;
  border-radius: 20px;
  color: var(--neutral-600);
  background: var(--white);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.site-footer {
  margin-top: 64px;
  padding: 42px 0;
  color: rgba(255, 255, 255, 0.72);
  background: var(--neutral-900);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--accent-300);
}

@media (max-width: 1080px) {
  .header-search {
    width: 220px;
  }

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

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

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 66px;
  }

  .primary-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .site-header.is-open .primary-nav,
  .site-header.is-open .header-search {
    display: flex;
  }

  .site-header.is-open .header-inner {
    flex-wrap: wrap;
    padding: 12px 0 16px;
  }

  .site-header.is-open .primary-nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .site-header.is-open .header-search {
    order: 4;
    width: 100%;
  }

  .hero-carousel,
  .hero-track {
    min-height: 520px;
    height: 520px;
  }

  .hero-content {
    width: 100%;
    padding: 30px;
  }

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

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

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

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

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

  .logo {
    font-size: 19px;
  }

  .hero {
    padding-top: 18px;
  }

  .hero-carousel,
  .hero-track {
    min-height: 500px;
    height: 500px;
    border-radius: 22px;
  }

  .hero-slide::before {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.5), rgba(2, 6, 23, 0.9));
  }

  .hero-content {
    padding: 24px;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .rank-cover {
    grid-column: 1 / -1;
    order: -1;
  }

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

  .side-link {
    grid-template-columns: 84px 1fr;
  }
}
