:root {
  --bg: #f8fafc;
  --ink: #172033;
  --muted: #64748b;
  --slate: #0f172a;
  --slate-2: #1e293b;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --line: rgba(148, 163, 184, 0.28);
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b 48%, #0f172a);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.26);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), #facc15);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

.brand-text {
  white-space: nowrap;
  font-size: 19px;
}

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

.nav-link {
  padding: 9px 12px;
  border-radius: 12px;
  color: #dbeafe;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-current {
  background: rgba(255, 255, 255, 0.08);
  color: #fed7aa;
}

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

.nav-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  padding: 10px 12px;
  outline: none;
  min-height: 42px;
}

.filter-bar input,
.filter-bar select {
  background: #fff;
  color: var(--ink);
}

.nav-search input {
  width: 220px;
}

.nav-search button,
.mobile-search button,
.btn,
.panel-link {
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.mobile-search button,
.btn-primary {
  background: var(--orange);
  color: #fff;
}

.nav-search button:hover,
.mobile-search button:hover,
.btn-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

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

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

.mobile-brand {
  font-weight: 850;
  color: #fed7aa;
}

.mobile-link {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #0f172a;
  color: #fff;
}

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

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

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

.hero-image {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image), linear-gradient(135deg, #111827, #334155);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(249, 115, 22, 0.34), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  padding: 70px 0;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(249, 115, 22, 0.12);
  color: #fdba74;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 18px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero h1,
.hero h2 {
  max-width: 840px;
  font-size: clamp(42px, 7vw, 74px);
}

.hero p,
.page-hero p,
.lead-text {
  max-width: 780px;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-tags {
  margin-top: 20px;
}

.hero-tags span,
.detail-tags span,
.movie-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 10px;
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-muted {
  background: rgba(51, 65, 85, 0.9);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-muted:hover,
.btn-ghost:hover,
.panel-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

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

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

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

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

.section-light,
.section-dark {
  width: 100%;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
}

.section-dark {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}

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

.section-head h2,
.rank-panel-head h2,
.content-card h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head a,
.panel-link {
  color: var(--orange-dark);
  font-weight: 850;
}

.section-head-dark a,
.section-head-dark .section-kicker {
  color: #fed7aa;
}

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

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.23s ease, box-shadow 0.23s ease, border-color 0.23s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 0.78)),
    var(--cover),
    linear-gradient(135deg, #111827, #475569);
  background-size: cover;
  background-position: center;
}

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.poster-type {
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-card h2,
.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 900;
  color: #111827;
}

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

.movie-meta {
  margin-top: auto;
}

.movie-meta span {
  background: #f1f5f9;
  color: #475569;
}

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

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

.category-card {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  color: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  transition: transform 0.22s ease, background 0.22s ease;
}

.section-light .category-card {
  background: #fff;
  color: var(--ink);
  border-color: rgba(148, 163, 184, 0.22);
}

.category-card:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(255, 255, 255, 0.08));
}

.category-card strong {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: inherit;
  opacity: 0.82;
}

.category-card span {
  color: #fdba74;
  font-weight: 800;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}

.rank-panel,
.content-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  background: #fff;
  padding: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-panel-head span {
  color: var(--orange-dark);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compact-list {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.compact-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: #fff7ed;
  transform: translateX(3px);
}

.compact-thumb {
  width: 62px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: var(--cover), linear-gradient(135deg, #111827, #64748b);
  background-size: cover;
  background-position: center;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  font-size: 15px;
  line-height: 1.35;
}

.compact-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero,
.detail-hero {
  background:
    radial-gradient(circle at 82% 18%, rgba(249, 115, 22, 0.28), transparent 26%),
    linear-gradient(135deg, #0f172a, #1e293b 56%, #111827);
  color: #fff;
}

.slim-hero {
  padding: 78px max(16px, calc((100% - 1180px) / 2));
}

.page-hero h1,
.detail-info h1 {
  font-size: clamp(38px, 6vw, 60px);
}

.catalog-section {
  padding-top: 34px;
}

.filter-bar {
  position: sticky;
  top: 80px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 150px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.filter-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  gap: 30px;
  align-items: center;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.46);
  aspect-ratio: 16 / 9;
}

.player-card video {
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72)),
    var(--cover),
    linear-gradient(135deg, #111827, #334155);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.92);
  color: #fff;
  font-size: 32px;
  padding-left: 6px;
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.34);
}

.detail-info .lead-text {
  color: #e2e8f0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 18px;
}

.detail-meta span {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  color: #fff;
  font-weight: 800;
}

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

.content-card p {
  margin: 12px 0 28px;
  color: #334155;
  font-size: 17px;
}

.content-card dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px 16px;
  margin: 18px 0 0;
}

.content-card dt {
  color: var(--muted);
  font-weight: 800;
}

.content-card dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
}

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

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

.footer-shell p {
  margin: 14px 0 0;
}

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

.footer-shell a:hover {
  color: #fdba74;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 16px;
  text-align: center;
  color: #94a3b8;
}

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

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

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

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

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

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

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

  .two-column-section,
  .detail-layout,
  .detail-body-section,
  .footer-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .nav-shell {
    height: 62px;
  }

  .brand-text {
    font-size: 16px;
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

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

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

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

  .section,
  .section-light,
  .section-dark {
    padding-top: 42px;
    padding-bottom: 42px;
  }
}
