: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-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-300: #d6d3d1;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.10), 0 4px 6px -4px rgb(0 0 0 / 0.10);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.12), 0 8px 10px -6px rgb(0 0 0 / 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
  box-shadow: var(--shadow-lg);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1280px);
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--accent-500);
  color: var(--white);
  box-shadow: 0 10px 24px rgb(245 158 11 / 0.28);
}

.brand-text {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: rgb(255 255 255 / 0.92);
  font-weight: 600;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.10);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--white);
}

.mobile-nav {
  display: none;
  padding: 8px 24px 18px;
  border-top: 1px solid rgb(255 255 255 / 0.10);
  background: var(--primary-800);
}

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.mobile-nav a:hover {
  background: rgb(255 255 255 / 0.08);
}

.site-header.menu-open .mobile-nav {
  display: block;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.88), rgb(0 0 0 / 0.54), rgb(0 0 0 / 0.14));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 58px;
  max-width: 760px;
  color: var(--white);
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--accent-400);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(2.1rem, 6vw, 4.5rem);
  line-height: 1.05;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgb(255 255 255 / 0.88);
  font-size: 1.1rem;
}

.hero-actions,
.detail-info .btn {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100% - 1280px) / 2 + 24px));
  bottom: 36px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.50);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active,
.hero-dot:hover {
  background: var(--accent-500);
  transform: scale(1.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-accent {
  background: var(--accent-500);
  color: var(--white);
  box-shadow: 0 14px 28px rgb(245 158 11 / 0.28);
}

.btn-accent:hover {
  background: var(--accent-600);
}

.btn-primary {
  background: var(--primary-600);
  color: var(--white);
}

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

.btn-ghost {
  border: 1px solid rgb(255 255 255 / 0.34);
  color: var(--white);
  background: rgb(255 255 255 / 0.10);
  backdrop-filter: blur(12px);
}

.search-entry {
  margin-top: -38px;
  position: relative;
  z-index: 2;
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-xl);
}

.quick-search label,
.search-box {
  display: grid;
  gap: 6px;
  color: var(--neutral-700);
  font-weight: 700;
}

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

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgb(14 165 233 / 0.12);
}

.home-sections {
  display: grid;
  gap: 64px;
  padding: 64px 0 0;
}

.page-shell {
  min-height: 60vh;
}

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

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

.page-hero > div {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgb(255 255 255 / 0.84);
  font-size: 1.05rem;
}

.section-block {
  display: grid;
  gap: 24px;
}

.section-heading,
.region-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2,
.region-heading h3 {
  margin: 0;
  color: var(--neutral-900);
}

.section-heading h2 {
  flex: 1;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.section-heading a,
.region-heading a {
  color: var(--primary-600);
  font-weight: 800;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: var(--white);
  background: var(--accent-500);
}

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

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

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

.movie-link {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--neutral-200);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.18), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-link:hover .poster-wrap {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

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

.movie-link:hover .poster-wrap::after,
.movie-link:hover .poster-caption {
  opacity: 1;
}

.year-badge,
.category-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 8px;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
}

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

.category-badge {
  left: 10px;
  background: rgb(12 74 110 / 0.82);
}

.poster-caption {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-caption span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.86rem;
}

.card-body {
  padding-top: 11px;
}

.card-body h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.8em;
  margin: 0 0 4px;
  color: var(--neutral-900);
  font-size: 1rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

.card-meta,
.card-desc {
  margin: 0;
  color: var(--neutral-600);
  font-size: 0.82rem;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.glow-block {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 180px;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 4px 18px;
  scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

.region-list {
  display: grid;
  gap: 38px;
}

.region-heading {
  margin-bottom: 18px;
}

.region-heading span {
  width: 5px;
  height: 28px;
  border-radius: 999px;
  background: var(--primary-500);
}

.region-heading h3 {
  flex: 1;
  font-size: 1.35rem;
}

.ranking-preview,
.ranking-page {
  padding: 32px;
  border-radius: 28px;
  background: var(--neutral-100);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 40px 74px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 900;
}

.rank-item img {
  width: 74px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--neutral-200);
}

.rank-content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rank-content strong {
  overflow: hidden;
  color: var(--neutral-900);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-content em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--neutral-600);
  font-size: 0.86rem;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.large-category-grid {
  margin-top: 36px;
}

.category-card {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 24px;
  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(-3px);
  box-shadow: var(--shadow-lg);
}

.category-card span {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-100);
  font-size: 0.86rem;
  font-weight: 800;
}

.category-card h2 {
  margin: 12px 0 0;
  color: var(--neutral-900);
  font-size: 1.35rem;
  line-height: 1.35;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
}

.category-samples a {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  font-size: 0.82rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-top: 36px;
  padding: 18px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.filter-selects {
  display: flex;
  gap: 12px;
}

.empty-state {
  padding: 36px;
  border-radius: 20px;
  background: var(--white);
  color: var(--neutral-600);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px 0 0;
  color: var(--neutral-600);
  font-size: 0.92rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: center;
  padding: 34px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  object-fit: cover;
  background: var(--neutral-200);
  box-shadow: var(--shadow-xl);
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 840px;
  margin: 0 0 20px;
  color: var(--neutral-700);
  font-size: 1.1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.tag-list span {
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-100);
  font-weight: 700;
  font-size: 0.9rem;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow-xl);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgb(0 0 0 / 0.76), rgb(0 0 0 / 0.32));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--accent-500);
  box-shadow: 0 14px 34px rgb(245 158 11 / 0.34);
  font-size: 2rem;
}

.play-overlay strong {
  font-size: 1.1rem;
}

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

.card-panel {
  padding: 28px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.card-panel h2 {
  margin: 0 0 14px;
  color: var(--neutral-900);
}

.card-panel p {
  margin: 0 0 24px;
  color: var(--neutral-700);
}

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

.info-grid div {
  padding: 14px;
  border-radius: 14px;
  background: var(--neutral-100);
}

.info-grid dt {
  color: var(--neutral-500);
  font-size: 0.86rem;
}

.info-grid dd {
  margin: 4px 0 0;
  color: var(--neutral-900);
  font-weight: 800;
}

.detail-side {
  position: sticky;
  top: 86px;
}

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

.movie-card-list .movie-link {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: start;
}

.movie-card-list .poster-wrap {
  border-radius: 12px;
}

.movie-card-list .category-badge,
.movie-card-list .poster-caption,
.movie-card-list .card-desc {
  display: none;
}

.movie-card-list .year-badge {
  top: 6px;
  right: 6px;
  min-height: 22px;
  padding: 2px 7px;
  font-size: 0.7rem;
}

.movie-card-list .card-body {
  padding-top: 0;
}

.movie-card-list .card-body h3 {
  min-height: auto;
  margin-top: 2px;
}

.site-footer {
  margin-top: 72px;
  padding: 54px 0 0;
  color: var(--neutral-300);
  background: var(--neutral-900);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.footer-logo {
  margin-bottom: 14px;
  color: var(--white);
}

.footer-inner h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 1rem;
}

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

.footer-inner ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(100% - 32px, 1280px);
  margin: 38px auto 0;
  padding: 24px 0;
  border-top: 1px solid rgb(255 255 255 / 0.10);
  color: var(--neutral-300);
  font-size: 0.92rem;
}

[hidden] {
  display: none !important;
}

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    bottom: 76px;
  }

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

  .quick-search,
  .filter-panel,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .filter-selects {
    flex-direction: column;
  }

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

  .detail-poster {
    max-width: 260px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

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

  .brand-text {
    font-size: 1.08rem;
  }

  .small-hero {
    padding: 54px 18px;
  }

  .container {
    width: min(100% - 24px, 1280px);
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .rank-list,
  .rank-list-large,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .scroll-row {
    grid-auto-columns: 168px;
  }

  .glow-block,
  .ranking-preview,
  .ranking-page,
  .card-panel {
    padding: 22px;
    border-radius: 20px;
  }

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

  .rank-item img {
    width: 64px;
    height: 90px;
  }

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