:root {
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-800);
  background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 28%, #f1f5f9 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 14px 35px rgba(249, 115, 22, 0.28);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--orange);
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

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

.nav-link {
  opacity: 0.86;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  transform: translateY(-1px);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

.mobile-link {
  display: block;
  padding: 10px 0;
  font-weight: 700;
  opacity: 0.9;
}

.mobile-link.active {
  opacity: 1;
}

.hero-slider {
  position: relative;
  height: 72vh;
  min-height: 540px;
  margin-top: 64px;
  overflow: hidden;
  color: #fff;
  background: var(--slate-950);
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.5) 44%, rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  right: max(32px, calc((100% - 1180px) / 2));
  bottom: 12%;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.05;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.42);
}

.hero-content h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 40px);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 18px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-btn,
.secondary-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.32);
}

.secondary-btn {
  min-height: 46px;
  padding: 0 24px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.primary-btn:hover,
.secondary-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

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

.page-top {
  padding-top: 104px;
}

.search-entrance,
.page-hero,
.content-section,
.filter-panel {
  margin-top: 36px;
}

.search-entrance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow);
}

.search-entrance h2,
.search-entrance p {
  margin: 0;
}

.search-entrance p {
  margin-top: 8px;
  color: var(--slate-500);
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2,
.page-hero h1 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading p,
.page-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--slate-500);
  line-height: 1.8;
}

.warm-section,
.soft-hero,
.category-hero,
.ranking-hero {
  padding: 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  box-shadow: var(--shadow);
}

.ranking-hero {
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
}

.category-hero {
  background: linear-gradient(135deg, #f5f3ff, #fff7ed);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--slate-900);
}

.featured .poster-link {
  aspect-ratio: 4 / 3;
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.movie-body {
  padding: 16px;
}

.movie-meta {
  margin: 0 0 8px;
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-body h3 {
  min-height: 48px;
  margin: 0;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.42;
}

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

.movie-desc {
  display: -webkit-box;
  min-height: 46px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--slate-500);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--slate-900);
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.45s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.12));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  display: block;
  margin-top: 84px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 10px 0 0;
  color: #e5e7eb;
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 40px 58px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.rank-row:hover {
  color: var(--orange);
}

.rank-num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 900;
}

.rank-row img {
  width: 58px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--slate-500);
  font-size: 13px;
}

.text-link {
  margin-top: 18px;
  color: var(--orange);
  font-weight: 900;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow);
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 18px;
}

.category-cover-row img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 6px 0 10px;
}

.category-overview-card p {
  color: var(--slate-500);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(140px, 1fr));
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0 14px;
  outline: 0;
  color: var(--slate-800);
  background: #fff;
  font: inherit;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.detail-shell {
  width: min(1120px, calc(100% - 32px));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  padding: 30px;
  border-radius: var(--radius-xl);
  color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.35), transparent 30%), linear-gradient(135deg, #111827, #0f172a);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-intro {
  align-self: center;
}

.detail-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.1;
}

.detail-line {
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.jump-play {
  margin-top: 24px;
}

.player-section,
.detail-content {
  margin-top: 34px;
}

.player-section h2,
.detail-content h2 {
  margin: 0 0 18px;
  color: var(--slate-900);
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.22);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.2));
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

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

.play-symbol {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.34);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr 320px;
  gap: 22px;
}

.detail-content article,
.info-card {
  padding: 24px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow);
}

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

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-card dl div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
}

.info-card dt {
  color: var(--slate-500);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  color: var(--slate-900);
}

.detail-tags {
  margin-top: 18px;
}

.site-footer {
  margin-top: 64px;
  color: #cbd5e1;
  background: linear-gradient(90deg, #1f2937, #111827);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 42px;
  padding: 46px 0 32px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

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

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  color: #94a3b8;
}

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

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slider {
    min-height: 600px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 80px;
  }

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

  .search-entrance,
  .split-section,
  .detail-hero,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .search-entrance {
    align-items: stretch;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .catalog-grid,
  .related-grid,
  .small-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-row {
    grid-template-columns: 34px 52px 1fr;
  }

  .rank-meta {
    display: none;
  }

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

@media (max-width: 520px) {
  .main-shell,
  .detail-shell,
  .nav-shell,
  .mobile-nav,
  .footer-grid,
  .footer-copy {
    width: min(100% - 22px, 1180px);
  }

  .hero-slider {
    min-height: 640px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .catalog-grid,
  .related-grid,
  .small-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .warm-section,
  .soft-hero,
  .category-hero,
  .ranking-hero,
  .detail-hero,
  .detail-content article,
  .info-card {
    padding: 22px;
  }
}
