:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;
  --accent-50: #fffbeb;
  --accent-100: #fef3c7;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --shadow-sm: 0 4px 14px rgba(12, 74, 110, 0.08);
  --shadow-md: 0 12px 30px rgba(12, 74, 110, 0.12);
  --shadow-lg: 0 24px 60px rgba(12, 74, 110, 0.22);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--neutral-50);
  color: var(--neutral-900);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

main {
  min-height: 60vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
  box-shadow: 0 10px 28px rgba(12, 74, 110, 0.24);
}

.nav-shell {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-900);
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.brand-mark.small {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.brand-name {
  font-size: 21px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
}

.nav-links a,
.mobile-links a {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-links a:hover,
.mobile-links a.is-active {
  color: var(--accent-400);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 999px;
}

.mobile-links {
  display: none;
  padding: 8px 24px 18px;
  background: var(--primary-800);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-links.is-open {
  display: grid;
  gap: 6px;
}

.mobile-links a {
  padding: 10px 12px;
  border-radius: 10px;
}

.mobile-links a:hover,
.mobile-links a.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--neutral-900);
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.54) 46%, rgba(12, 74, 110, 0.32) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1280px, 100%);
  transform: translateX(-50%);
  padding: 54px 24px 72px;
  color: var(--white);
}

.hero-panel {
  width: min(720px, 100%);
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(12, 74, 110, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.hero-kicker,
.section-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 24px;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.btn,
.section-more,
.pager a,
.pager span,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn {
  padding: 12px 20px;
}

.btn-primary {
  color: var(--white);
  background: var(--accent-500);
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.34);
}

.btn-primary:hover {
  background: var(--accent-600);
  transform: translateY(-2px);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 32px;
  background: var(--accent-500);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
}

.content-section {
  margin-bottom: 64px;
}

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

.section-heading h2,
.page-hero h1 {
  margin: 6px 0 0;
  color: var(--neutral-900);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-more {
  min-height: 42px;
  padding: 0 16px;
  color: var(--primary-700);
  background: var(--primary-100);
}

.section-more:hover {
  color: var(--white);
  background: var(--primary-600);
}

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

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

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--neutral-200);
  box-shadow: var(--shadow-sm);
  transform: translateZ(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08) 55%, rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.movie-card:hover .movie-cover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

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

.movie-card:hover .movie-cover img {
  transform: scale(1.055);
}

.year-badge,
.rank-badge,
.category-chip-count {
  position: absolute;
  z-index: 3;
  color: var(--white);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  background: var(--accent-500);
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-600);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%) scale(0.85);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(245, 158, 11, 0.9);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.movie-info {
  margin-top: 12px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: var(--neutral-900);
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

.movie-meta,
.movie-desc {
  margin: 4px 0 0;
  color: var(--neutral-600);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag-row span,
.info-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-100);
  font-size: 12px;
  font-weight: 700;
}

.ribbon-section {
  padding: 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.08);
}

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

.horizontal-scroll .movie-card {
  flex: 0 0 190px;
  scroll-snap-align: start;
}

.list-stack {
  display: grid;
  gap: 18px;
}

.movie-card-list {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.movie-card-list .movie-cover {
  aspect-ratio: 16 / 10;
}

.movie-card-list .movie-title {
  min-height: auto;
  font-size: 18px;
}

.page-hero {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  color: var(--white);
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

.page-hero h1 {
  color: var(--white);
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 26px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
  box-shadow: var(--shadow-md);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, var(--accent-500), var(--primary-700));
}

.category-card h2 {
  position: relative;
  margin: 0 0 10px;
  font-size: 25px;
}

.category-card p {
  position: relative;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
}

.category-card a {
  position: relative;
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 200px));
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  outline: none;
  background: var(--neutral-50);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.search-count {
  margin: 0 0 18px;
  color: var(--neutral-600);
  font-weight: 700;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 42px;
}

.pager a,
.pager span {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  color: var(--neutral-700);
}

.pager a:hover,
.pager span.is-current {
  color: var(--white);
  border-color: var(--primary-600);
  background: var(--primary-600);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 30px;
}

.player-card,
.detail-card,
.related-card,
.sidebar-card {
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.player-card {
  overflow: hidden;
  background: #000000;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.12));
  cursor: pointer;
}

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

.player-button {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-500);
  box-shadow: 0 14px 40px rgba(245, 158, 11, 0.38);
  font-size: 30px;
}

.detail-card,
.sidebar-card,
.related-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 20px;
}

.info-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--neutral-100);
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 700;
}

.detail-block {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--neutral-200);
}

.detail-block h2,
.sidebar-card h2,
.related-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

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

.sidebar-card {
  position: sticky;
  top: 92px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.side-item img {
  width: 78px;
  height: 112px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--neutral-200);
}

.side-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--neutral-900);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.related-card {
  margin-top: 30px;
}

.site-footer {
  margin-top: 64px;
  color: var(--neutral-300);
  background: var(--neutral-900);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-inner h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.footer-inner p {
  margin: 12px 0 0;
  color: var(--neutral-300);
}

.footer-inner a {
  display: block;
  margin: 8px 0;
  color: var(--neutral-300);
}

.footer-inner a:hover {
  color: var(--accent-400);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--neutral-500);
}

.empty-state {
  padding: 50px 20px;
  text-align: center;
  color: var(--neutral-600);
}

@media (max-width: 1180px) {
  .card-grid,
  .card-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 520px;
  }

  .hero-panel {
    padding: 22px;
  }

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

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

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

  .sidebar-card {
    position: static;
  }

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

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

@media (max-width: 640px) {
  .nav-shell {
    padding: 0 16px;
  }

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

  .hero {
    min-height: 520px;
  }

  .hero-content {
    padding: 28px 16px 68px;
  }

  .hero-panel {
    border-radius: 18px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-dots {
    left: 16px;
    right: auto;
  }

  .container,
  .page-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .horizontal-scroll .movie-card {
    flex-basis: 160px;
  }

  .movie-card-list {
    grid-template-columns: 120px minmax(0, 1fr);
    padding: 12px;
  }

  .movie-card-list .movie-cover {
    aspect-ratio: 2 / 3;
  }

  .movie-desc,
  .tag-row {
    display: none;
  }

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

  .detail-card,
  .sidebar-card,
  .related-card {
    padding: 20px;
  }
}
