:root {
  --primary-950: #082f49;
  --primary-900: #0c4a6e;
  --primary-800: #075985;
  --primary-700: #0369a1;
  --primary-600: #0284c7;
  --primary-100: #e0f2fe;
  --primary-50: #f0f9ff;
  --accent-600: #d97706;
  --accent-500: #f59e0b;
  --accent-400: #fbbf24;
  --accent-300: #fcd34d;
  --accent-100: #fef3c7;
  --accent-50: #fffbeb;
  --neutral-950: #1c1917;
  --neutral-900: #292524;
  --neutral-800: #44403c;
  --neutral-700: #57534e;
  --neutral-600: #78716c;
  --neutral-500: #a8a29e;
  --neutral-300: #d6d3d1;
  --neutral-200: #e7e5e4;
  --neutral-100: #f5f5f4;
  --neutral-50: #fafaf9;
  --white: #ffffff;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-nav {
  background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand:hover {
  opacity: 0.86;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent-500);
  color: var(--white);
  font-size: 0.78rem;
  box-shadow: 0 0 0 4px rgb(245 158 11 / 0.18);
}

.brand-mark.small {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.62rem;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

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

.mobile-menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.1);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 0.25rem auto;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
  padding: 0 0 1rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 0;
  color: rgb(255 255 255 / 0.92);
  border-top: 1px solid rgb(255 255 255 / 0.12);
}

.hero {
  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;
  z-index: 1;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.88), rgb(0 0 0 / 0.52), transparent);
}

.hero-copy {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 2rem 0 3rem;
}

.hero-copy-inner {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgb(245 158 11 / 0.92);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0 0 1rem;
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  font-weight: 850;
}

.hero p {
  max-width: 720px;
  margin: 0 0 1.5rem;
  color: var(--neutral-200);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.65rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  background: var(--accent-500);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

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

.ghost-button {
  background: rgb(255 255 255 / 0.16);
  color: var(--white);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgb(255 255 255 / 0.26);
}

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

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

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

.quick-search {
  margin-top: -2rem;
  position: relative;
  z-index: 5;
}

.search-box {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 0.96);
  box-shadow: var(--shadow-xl);
}

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

.search-box input {
  flex: 1;
  padding: 0.85rem 1rem;
}

.search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgb(2 132 199 / 0.12);
}

.search-box button {
  border: 0;
  border-radius: 0.75rem;
  padding: 0 1.5rem;
  background: var(--primary-600);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

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

.quick-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 1rem 0 0;
}

.quick-categories a {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 0.9rem;
  font-weight: 700;
}

.quick-categories a:hover {
  background: var(--accent-100);
  color: var(--accent-600);
}

.page-sections {
  padding: 3rem 0;
}

.page-sections > section + section {
  margin-top: 4rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: var(--accent-100);
  color: var(--accent-600);
  font-weight: 900;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.2;
}

.text-link {
  color: var(--primary-700);
  font-weight: 800;
}

.text-link:hover {
  color: var(--accent-600);
}

.movie-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

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

.movie-card-link,
.movie-list-link {
  display: block;
  height: 100%;
}

.movie-card-link:hover .movie-poster,
.movie-list-link:hover .movie-poster {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-xl);
}

.movie-card-link:hover img,
.movie-list-link:hover img {
  transform: scale(1.055);
}

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

.movie-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-poster.wide {
  aspect-ratio: 16 / 9;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 0.55rem;
  z-index: 2;
  padding: 0.25rem 0.5rem;
  border-radius: 0.45rem;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
}

.year-badge {
  right: 0.55rem;
  background: var(--accent-500);
}

.rank-badge {
  left: 0.55rem;
  background: var(--primary-700);
}

.poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0.8rem;
  color: var(--white);
  background: linear-gradient(to top, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.24), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.poster-overlay p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 0.78rem;
}

.movie-card-body {
  padding: 0.65rem 0.1rem 0;
}

.movie-card h3,
.compact-card h3,
.movie-list-content h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: var(--neutral-900);
  font-size: 1rem;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.4rem;
  color: var(--neutral-600);
  font-size: 0.78rem;
}

.meta-row span + span::before {
  content: "·";
  margin-right: 0.45rem;
  color: var(--neutral-500);
}

.genre-pill {
  display: inline-block;
  max-width: 100%;
  margin-top: 0.45rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.soft-panel,
.neutral-panel {
  border-radius: 1.5rem;
  padding: 1.5rem;
}

.soft-panel {
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.neutral-panel {
  background: var(--neutral-100);
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 12rem;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.2rem 0 1rem;
  scroll-snap-type: x proximity;
}

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

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

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

.category-tile {
  display: block;
  min-height: 9rem;
  padding: 1.4rem;
  border-radius: 1.25rem;
  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-tile:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-xl);
}

.category-tile span {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--primary-700);
  font-size: 1.25rem;
  font-weight: 850;
}

.category-tile p {
  margin: 0;
  color: var(--neutral-600);
  font-size: 0.94rem;
}

.list-stack {
  display: grid;
  gap: 1rem;
}

.movie-card-list {
  border-radius: 1rem;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.movie-list-link {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 1rem;
  padding: 1rem;
}

.movie-list-content p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0.55rem 0;
  color: var(--neutral-600);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  background: var(--accent-100);
  color: var(--accent-600);
  font-size: 0.74rem;
  font-weight: 700;
}

.page-hero {
  background: linear-gradient(90deg, var(--primary-600), var(--primary-700));
  color: var(--white);
  padding: 3rem 0;
}

.page-hero h1 {
  margin: 0.6rem 0 0.6rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
}

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

.back-link {
  display: inline-flex;
  color: rgb(255 255 255 / 0.92);
  font-weight: 700;
}

.back-link:hover {
  color: var(--accent-300);
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.filter-panel input,
.filter-panel select {
  min-height: 2.8rem;
  padding: 0 0.85rem;
}

.detail-hero {
  background: linear-gradient(135deg, var(--primary-950), var(--primary-800));
  color: var(--white);
  padding: 3rem 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 20rem) 1fr;
  gap: 2rem;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: rgb(255 255 255 / 0.78);
  font-size: 0.92rem;
}

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

.detail-intro h1 {
  margin: 0.8rem 0 1rem;
  font-size: clamp(2rem, 4.8vw, 3.25rem);
  line-height: 1.1;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 1rem;
  color: var(--neutral-200);
  font-size: 1.12rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.detail-meta span {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgb(255 255 255 / 0.12);
  color: rgb(255 255 255 / 0.92);
  font-weight: 700;
}

.detail-tags {
  margin-bottom: 1.5rem;
}

.player-section {
  padding: 3rem 0 1.5rem;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-xl);
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0.18));
  color: var(--white);
  cursor: pointer;
}

.player-cover span {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: var(--accent-500);
  box-shadow: 0 0 0 10px rgb(245 158 11 / 0.18);
  font-size: 1.55rem;
  padding-left: 0.2rem;
}

.player-cover:hover span {
  background: var(--accent-600);
}

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

.detail-content {
  padding: 1.5rem 0 3rem;
}

.content-card {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.content-card h2 {
  margin: 0 0 0.85rem;
  font-size: 1.45rem;
}

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

.compact-card a {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.85rem;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.compact-card img {
  width: 4rem;
  height: 5.5rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

.compact-card p {
  margin: 0.2rem 0 0;
  color: var(--neutral-600);
  font-size: 0.85rem;
}

.site-footer {
  margin-top: 3rem;
  padding: 3rem 0 2rem;
  background: var(--neutral-900);
  color: var(--neutral-300);
}

.footer-inner {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  color: var(--white);
  margin-bottom: 0.8rem;
}

.site-footer h3 {
  margin: 0 0 1rem;
  color: var(--white);
  font-size: 1rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.5rem;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.is-filtered-out {
  display: none !important;
}

@media (min-width: 768px) {
  .hero {
    height: 600px;
  }
}

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

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

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

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

  .mobile-menu-button {
    display: block;
  }

  .hero-copy {
    padding-bottom: 4rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-dots {
    left: 1rem;
    right: auto;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    min-height: 2.75rem;
  }

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

  .movie-list-link {
    grid-template-columns: 1fr;
  }

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

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

  .detail-poster {
    max-width: 18rem;
  }

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

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

@media (max-width: 480px) {
  .container,
  .nav-inner,
  .footer-inner,
  .hero-copy-inner {
    width: min(100% - 1rem, 1280px);
  }

  .movie-grid.six-col,
  .movie-grid.four-col {
    gap: 0.9rem;
  }

  .soft-panel,
  .neutral-panel,
  .content-card {
    padding: 1rem;
    border-radius: 1rem;
  }

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