:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #dbeafe;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 21px;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  color: #334155;
  font-weight: 650;
}

.main-nav a,
.nav-dropdown > button {
  padding: 8px 0;
  color: #334155;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown:hover > button {
  color: var(--blue);
}

.nav-dropdown {
  position: relative;
}

.nav-panel {
  position: absolute;
  top: 100%;
  right: 0;
  display: grid;
  width: 230px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-panel a {
  padding: 10px 12px;
  border-radius: 10px;
}

.nav-panel a:hover {
  background: var(--blue-soft);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  outline: 0;
  transition: 0.2s ease;
}

.header-search input {
  width: 210px;
  padding: 10px 12px;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.btn-primary,
.btn-outline,
.btn-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.btn-primary {
  color: #ffffff;
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.22);
}

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

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}

.btn-outline,
.section-link {
  color: var(--blue);
  background: #ffffff;
  border: 1px solid var(--blue-soft);
}

.btn-outline:hover,
.section-link:hover {
  background: var(--blue-soft);
}

.full {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  background: #f1f5f9;
  border: 0;
  border-radius: 12px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #0f172a;
}

.mobile-panel {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-panel a {
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-bg,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.18)), linear-gradient(0deg, rgba(15, 23, 42, 0.96), transparent 52%);
}

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

.hero-copy {
  width: min(680px, 100%);
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #93c5fd;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.hero-actions,
.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.section {
  padding: 70px 0;
}

.white-section {
  background: #ffffff;
}

.soft-section {
  background: var(--surface-soft);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.slim-heading {
  margin-bottom: 20px;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #1e293b, #2563eb);
}

.poster-wrap::after {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  content: "HD";
}

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

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

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.compact-card .card-body {
  padding: 14px;
}

.card-body strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  margin-bottom: 9px;
  font-size: 18px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-card .card-body strong {
  min-height: 42px;
  font-size: 16px;
}

.card-body em {
  display: -webkit-box;
  overflow: hidden;
  min-height: 45px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.card-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.tag-row span {
  color: var(--blue);
  background: var(--blue-soft);
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  padding: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid #dbeafe;
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 55px rgba(37, 99, 235, 0.16);
}

.category-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 14px;
  font-weight: 900;
}

.category-tile strong {
  display: block;
  margin-top: 24px;
  font-size: 24px;
}

.category-tile em {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-style: normal;
  font-weight: 800;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rank-card,
.side-card,
.content-card {
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.rank-card h2,
.side-card h2,
.content-card h2 {
  margin: 0 0 16px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 64px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: 0.2s ease;
}

.rank-row:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.10);
  transform: translateX(2px);
}

.rank-num {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  width: 64px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #1e293b, #2563eb);
  border-radius: 12px;
}

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

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.rank-tags {
  display: flex;
  gap: 6px;
}

.rank-tags span,
.rank-year {
  padding: 4px 8px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 13px;
}

.page-hero {
  padding: 86px 0;
  color: #ffffff;
  background: radial-gradient(circle at 10% 10%, rgba(96, 165, 250, 0.45), transparent 30%), linear-gradient(135deg, #0f172a, #1d4ed8);
}

.page-hero p {
  max-width: 760px;
}

.category-hero {
  background: radial-gradient(circle at 85% 20%, rgba(219, 234, 254, 0.3), transparent 28%), linear-gradient(135deg, #0f172a, #2563eb);
}

.dark-hero {
  background: radial-gradient(circle at 30% 0%, rgba(37, 99, 235, 0.35), transparent 32%), linear-gradient(135deg, #020617, #111827);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.stacked-previews {
  display: grid;
  gap: 48px;
}

.detail-page {
  background: #ffffff;
}

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

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 620px;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #1e293b, #2563eb);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
  max-width: 880px;
}

.large-tags span,
.stacked-tags span {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.78);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.player-column {
  display: grid;
  gap: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 24px;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.25);
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  border: 0;
  cursor: pointer;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 4px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.38);
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 12px;
  z-index: 4;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

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

.detail-side {
  display: grid;
  gap: 20px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

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

.side-card dd {
  margin: 0;
  color: #0f172a;
}

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

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid p {
  max-width: 680px;
  margin: 10px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a:hover {
  color: #ffffff;
}

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

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

  .menu-toggle {
    display: block;
  }

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

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

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

  .nav-wrap {
    min-height: 64px;
  }

  .hero-carousel {
    height: 540px;
  }

  .hero-shade,
  .detail-shade {
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.38));
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .section {
    padding: 48px 0;
  }

  .section-heading {
    display: grid;
  }

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

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

  .rank-row {
    grid-template-columns: 32px 54px minmax(0, 1fr);
  }

  .rank-tags,
  .rank-year {
    display: none;
  }

  .detail-hero,
  .detail-hero-content {
    min-height: auto;
  }

  .detail-hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 42px 0;
  }

  .detail-poster {
    width: min(240px, 72vw);
  }

  .side-card dl {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .footer-grid {
    display: grid;
  }
}

@media (max-width: 480px) {
  .brand-text small {
    display: none;
  }

  .movie-grid,
  .feature-grid,
  .compact-grid,
  .all-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

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