:root {
  --bg: #f9fafb;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fef3c7;
  --soft-2: #fffbeb;
  --line: #e5e7eb;
  --brand: #d97706;
  --brand-dark: #92400e;
  --dark: #111827;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 16px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-dark);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.28);
}

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

.nav-link {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.nav-search,
.mobile-search,
.hero-search,
.filter-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.hero-search input,
.filter-search-row input {
  width: 260px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-search-row input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.nav-search button,
.mobile-search button,
.hero-search button,
.filter-search-row button,
.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.filter-search-row button:hover,
.primary-button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.mobile-menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  background: #f3f4f6;
  color: #111827;
  cursor: pointer;
}

.mobile-menu {
  border-top: 1px solid var(--line);
  padding: 16px;
  background: #fff;
}

.mobile-search {
  margin-bottom: 14px;
}

.mobile-search input {
  width: 100%;
}

.mobile-nav {
  display: grid;
  gap: 12px;
}

.mobile-nav-link {
  padding: 10px 2px;
  color: #374151;
  font-weight: 700;
}

.mobile-nav-link.is-active {
  color: var(--brand-dark);
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.05) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: #fff;
}

.hero-tags,
.movie-badges,
.detail-meta,
.movie-meta,
.list-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.movie-badges span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(217, 119, 6, 0.95);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.hero-tags span:last-child,
.movie-badges span:last-child {
  background: rgba(17, 24, 39, 0.62);
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.7;
}

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

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: #fff;
}

.section {
  padding: 64px 0;
}

.section-soft {
  background: linear-gradient(180deg, var(--soft-2), #fff);
}

.section-gray {
  background: #f3f4f6;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.section-heading.between {
  justify-content: space-between;
  gap: 18px;
}

.section-heading.between > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
}

.heading-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: #fef3c7;
  color: var(--brand);
  font-weight: 900;
}

.text-link {
  color: var(--brand-dark);
  font-weight: 800;
}

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

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

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

.movie-card,
.movie-list-card,
.category-tile,
.category-overview-card,
.detail-card,
.sidebar-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.movie-card {
  display: block;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #111827;
}

.movie-card-large .movie-poster-wrap {
  height: 380px;
}

.movie-poster-wrap img,
.list-poster img,
.related-card img,
.category-tile img,
.category-overview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover img,
.movie-list-card:hover img,
.related-card:hover img,
.category-tile:hover img,
.category-overview-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
}

.large-card-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 24px;
  color: #fff;
}

.large-card-content h3,
.movie-card-body h3,
.list-body h3,
.related-card h3 {
  margin: 0;
}

.large-card-content h3 {
  margin-top: 12px;
  font-size: 26px;
  line-height: 1.15;
}

.large-card-content p,
.movie-card-body p,
.list-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.large-card-content p {
  margin: 10px 0 0;
  color: #e5e7eb;
  line-height: 1.6;
}

.card-year,
.card-genre,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.card-year {
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.72);
}

.card-genre {
  bottom: 12px;
  left: 12px;
  padding: 6px 10px;
  background: rgba(217, 119, 6, 0.95);
}

.rank-badge {
  top: 12px;
  left: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

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

.movie-card-body h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  color: #111827;
  font-size: 17px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.movie-list-card:hover h3,
.related-card:hover h3 {
  color: var(--brand-dark);
}

.movie-card-body p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.movie-meta,
.list-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.rank-list,
.list-stack {
  display: grid;
  gap: 16px;
}

.movie-list-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-list-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.list-poster {
  height: 130px;
  overflow: hidden;
  background: #111827;
}

.list-body {
  padding: 16px 18px;
}

.list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.list-body h3 {
  font-size: 18px;
  line-height: 1.3;
}

.list-body p {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.55;
}

.rank-inline {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fef3c7;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

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

.category-tile,
.category-overview-card {
  display: block;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.category-tile {
  position: relative;
  min-height: 220px;
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
}

.category-tile div {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 22px;
  color: #fff;
}

.category-tile span,
.page-hero span,
.category-overview-body > span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(217, 119, 6, 0.95);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.category-tile h3 {
  margin: 12px 0 8px;
  font-size: 24px;
}

.category-tile p,
.category-overview-body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.page-hero {
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.24), transparent 32%), linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  padding: 76px 0;
}

.page-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #d1d5db;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.overview-cover-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 170px;
  overflow: hidden;
}

.category-overview-body {
  padding: 20px;
}

.category-overview-body h2 {
  margin: 12px 0 8px;
}

.category-overview-body p {
  color: var(--muted);
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.sample-links span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.filter-search-row {
  margin-bottom: 16px;
}

.filter-search-row input {
  width: min(420px, 100%);
}

.filter-chip-row,
.quick-year-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.filter-chip-row button,
.quick-year-row button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip-row button:hover,
.filter-chip-row button.is-active,
.quick-year-row button:hover,
.quick-year-row button.is-active {
  background: var(--brand);
  color: #fff;
}

.filter-status,
.search-summary {
  min-height: 24px;
  color: var(--muted);
  font-weight: 700;
}

.detail-page {
  background: #f9fafb;
}

.detail-shell {
  padding: 32px 0 64px;
}

.detail-breadcrumb {
  color: #4b5563;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 24px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.play-circle {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.95);
  box-shadow: 0 18px 35px rgba(217, 119, 6, 0.35);
  font-size: 32px;
}

.player-error {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.player-error[hidden] {
  display: none;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

.detail-meta {
  margin-bottom: 24px;
}

.detail-meta span,
.tag-list span {
  border-radius: 999px;
  padding: 7px 12px;
  background: #fef3c7;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
}

.detail-card section {
  margin-top: 24px;
}

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

.detail-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.85;
  white-space: pre-line;
}

.lead-text {
  font-size: 18px !important;
  font-style: italic;
}

.detail-sidebar {
  display: block;
}

.sticky-card {
  position: sticky;
  top: 88px;
}

.sidebar-card {
  padding: 22px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  padding: 8px;
  border-radius: 14px;
  background: #f9fafb;
}

.related-card img {
  height: 72px;
  border-radius: 10px;
}

.related-card h3 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-search {
  margin-top: 26px;
}

.hero-search input {
  width: min(460px, 100%);
  border: 0;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-logo {
  color: #f59e0b;
}

.footer-brand p {
  max-width: 560px;
  color: #9ca3af;
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

.site-footer a {
  color: #d1d5db;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #f59e0b;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  color: #9ca3af;
  text-align: center;
}

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

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

  .mobile-menu-toggle {
    display: inline-flex;
  }

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

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

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

  .sticky-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .site-logo {
    font-size: 17px;
  }

  .logo-mark {
    width: 30px;
    height: 30px;
  }

  .hero-slider {
    height: 78vh;
    min-height: 560px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.2));
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 92px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

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

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 44px 0;
  }

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

  .large-grid,
  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-poster-wrap {
    height: 210px;
  }

  .movie-card-large .movie-poster-wrap {
    height: 300px;
  }

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

  .movie-card-body h3 {
    font-size: 15px;
  }

  .movie-card-body p {
    display: none;
  }

  .movie-list-card {
    grid-template-columns: 118px 1fr;
  }

  .list-poster {
    height: 104px;
  }

  .list-body {
    padding: 12px;
  }

  .list-body p {
    display: none;
  }

  .page-hero {
    padding: 54px 0;
  }

  .detail-shell {
    padding-top: 20px;
  }

  .detail-card,
  .sidebar-card,
  .filter-panel {
    padding: 18px;
  }

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

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

  .movie-poster-wrap {
    height: 300px;
  }

  .movie-list-card {
    grid-template-columns: 102px 1fr;
  }

  .hero-actions,
  .hero-search,
  .filter-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search input,
  .filter-search-row input {
    width: 100%;
  }
}
