:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --white: #ffffff;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 25px 60px rgba(15, 23, 42, 0.24);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  background: linear-gradient(135deg, #f9fafb 0%, #fff7ed 48%, #fffbeb 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong,
.footer-brand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fb923c, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 12px;
}

.nav-search {
  flex: 1;
  max-width: 430px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-panel input,
.search-hero input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  outline: none;
  border-radius: 999px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input,
.mobile-panel input {
  color: var(--white);
  background: rgba(51, 65, 85, 0.88);
  padding: 10px 16px;
}

.nav-search input::placeholder,
.mobile-panel input::placeholder {
  color: #94a3b8;
}

.nav-search input:focus,
.mobile-panel input:focus,
.search-hero input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.nav-search button,
.mobile-panel button,
.primary-button,
.secondary-button,
.search-hero button {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.mobile-panel button,
.primary-button,
.search-hero button {
  color: var(--white);
  background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.nav-search button {
  padding: 10px 18px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
}

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

.nav-search button:hover,
.mobile-panel button:hover,
.primary-button:hover,
.secondary-button:hover,
.search-hero button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(249, 115, 22, 0.36);
}

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: #fb923c;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(51, 65, 85, 0.9);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  padding: 16px 0 12px;
}

.mobile-panel button {
  padding: 10px 16px;
}

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

.mobile-link {
  color: #e2e8f0;
  font-weight: 700;
}

.category-strip {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.78);
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 10px max(16px, calc((100vw - 1180px) / 2));
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-strip a {
  flex: 0 0 auto;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.category-strip a:hover {
  color: #fb923c;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  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;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.42) 52%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  z-index: 2;
  color: var(--white);
}

.hero-content-inner {
  max-width: 720px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 14px;
  color: var(--white);
  background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.35);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 650px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta span {
  padding: 8px 13px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}

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

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

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

.page-main {
  padding: 54px 0 72px;
}

.page-hero {
  padding: 72px 0 40px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(124, 45, 18, 0.9));
  color: var(--white);
}

.page-hero h1,
.search-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.page-hero p,
.search-hero p {
  max-width: 780px;
  margin: 0;
  color: #e2e8f0;
  line-height: 1.8;
}

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

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

.section-head p {
  margin: 0 0 8px;
  color: var(--orange-600);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-head h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--orange-600);
  font-weight: 800;
  transition: color 0.2s ease;
}

.section-more:hover {
  color: #c2410c;
}

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

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

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

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

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-box {
  position: relative;
  height: 255px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #431407);
}

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

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

.duration-badge,
.category-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: var(--white);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.74);
}

.category-badge {
  left: 10px;
  top: 10px;
  padding: 5px 10px;
  background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
}

.rank-badge {
  right: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.card-content {
  padding: 18px;
}

.card-content h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card a:hover h3 {
  color: var(--orange-600);
}

.card-content p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
}

.card-meta span:first-child {
  color: #ca8a04;
}

.movie-card-horizontal a {
  display: flex;
  min-height: 168px;
}

.movie-card-horizontal .poster-box {
  width: 190px;
  height: auto;
  flex: 0 0 190px;
}

.movie-card-horizontal .card-content {
  flex: 1;
}

.movie-card-horizontal .card-content h3 {
  min-height: auto;
  -webkit-line-clamp: 1;
}

.feature-panel {
  overflow: hidden;
  border-radius: 28px;
  padding: 34px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
  box-shadow: var(--shadow-strong);
}

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

.compact-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.compact-card img {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 14px;
  object-fit: cover;
}

.compact-card span {
  min-width: 0;
}

.compact-card strong,
.compact-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card strong {
  color: var(--white);
  font-size: 16px;
}

.compact-card small {
  margin-top: 6px;
  color: #cbd5e1;
}

.list-rank {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
  font-weight: 900;
}

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

.category-card {
  min-height: 172px;
  padding: 24px;
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #e2e8f0;
  line-height: 1.65;
}

.category-card.drama,
.category-card.urban,
.category-card.featured {
  background: linear-gradient(135deg, #ea580c, #f59e0b);
}

.category-card.suspense,
.category-card.action {
  background: linear-gradient(135deg, #0f172a, #7f1d1d);
}

.category-card.youth,
.category-card.fantasy {
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}

.category-card.family,
.category-card.comedy,
.category-card.romance {
  background: linear-gradient(135deg, #be123c, #f97316);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 160px;
  gap: 14px;
  margin: 0 0 30px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select,
.search-hero input {
  color: var(--gray-900);
  background: var(--white);
  padding: 13px 16px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow-strong);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.42));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.38);
  font-size: 32px;
}

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

.detail-panel,
.side-panel {
  margin-top: 22px;
  padding: 28px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-panel h1 {
  margin: 0 0 16px;
  color: var(--gray-900);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.05em;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 22px;
}

.detail-meta span,
.detail-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 14px;
  font-weight: 700;
}

.detail-tags span:first-child,
.detail-meta span:first-child {
  color: var(--white);
  background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
}

.detail-panel h2,
.side-panel h2 {
  margin: 28px 0 12px;
  color: var(--gray-900);
  font-size: 24px;
}

.detail-panel p {
  color: var(--gray-700);
  line-height: 1.9;
}

.side-panel {
  margin-top: 0;
  position: sticky;
  top: 110px;
}

.side-panel h2:first-child {
  margin-top: 0;
}

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

.side-related .compact-card {
  color: var(--gray-900);
  background: #f8fafc;
  border-color: #e2e8f0;
}

.side-related .compact-card strong {
  color: var(--gray-900);
}

.side-related .compact-card small {
  color: var(--gray-500);
}

.search-hero {
  padding: 72px 0 48px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), #7c2d12);
}

.search-box {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin-top: 26px;
}

.search-hero button {
  padding: 13px 24px;
}

.empty-message {
  padding: 36px;
  border-radius: 22px;
  background: var(--white);
  color: var(--gray-500);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-950));
  padding: 46px 0;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 34px;
  align-items: start;
}

.footer-inner p {
  max-width: 460px;
  margin: 12px 0 0;
  line-height: 1.7;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.footer-inner nav a {
  color: #e2e8f0;
  font-weight: 700;
}

.footer-inner nav a:hover {
  color: #fb923c;
}

@media (max-width: 1040px) {
  .movie-grid,
  .movie-grid.three,
  .movie-grid.horizontal-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .hero {
    height: 620px;
    min-height: 620px;
  }

  .hero-content {
    bottom: 88px;
  }

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

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

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

  .movie-card-horizontal a {
    display: block;
  }

  .movie-card-horizontal .poster-box {
    width: 100%;
    height: 235px;
  }

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

  .footer-inner nav {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .movie-grid,
  .movie-grid.three,
  .movie-grid.horizontal-grid,
  .compact-grid,
  .category-cards {
    grid-template-columns: 1fr;
  }

  .poster-box {
    height: 245px;
  }

  .compact-card img {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }

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