:root {
  color-scheme: light;
  --text: #111827;
  --muted: #4b5563;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --blue: #2563eb;
  --blue-dark: #1e3a8a;
  --red: #dc2626;
  --dark: #111827;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f9fafb;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1200px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  color: #111827;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 600;
  color: #374151;
}

.nav-link {
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 18px;
  height: 2px;
  background: #374151;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #111827);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.08) 55%, rgba(0, 0, 0, 0.35)),
    linear-gradient(90deg, rgba(17, 24, 39, 0.74), rgba(17, 24, 39, 0.08));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1200px, calc(100% - 40px));
  transform: translateX(-50%);
  color: #fff;
}

.hero-content h1 {
  max-width: 780px;
  margin: 16px 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-labels,
.hero-tags,
.detail-tags,
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-labels span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.hero-labels span + span {
  background: var(--blue);
}

.hero-tags span,
.detail-tags span {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #f9fafb;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.section-more,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.35);
}

.primary-button:hover,
.home-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.42);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

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

.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 38px 20px 64px;
}

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

.quick-panel,
.page-title-block,
.filter-panel,
.detail-hero,
.player-section,
.detail-main,
.detail-side {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.quick-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.quick-panel h2,
.page-title-block h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
}

.quick-panel p,
.page-title-block p,
.section-head p {
  margin: 0;
  color: var(--muted);
}

.home-search,
.filter-panel {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  outline: none;
}

.home-search button {
  border: 0;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
}

.content-section {
  margin-top: 46px;
}

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.2;
}

.section-more {
  min-height: 38px;
  color: var(--blue);
  background: #eff6ff;
}

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

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

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e5e7eb);
}

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

.card-link:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-link:hover .poster-shade {
  opacity: 1;
}

.duration-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.duration-pill {
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
}

.card-body {
  padding: 15px;
}

.card-body h2 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.meta-row {
  justify-content: space-between;
  gap: 6px;
  color: #6b7280;
  font-size: 13px;
}

.meta-row span:first-child {
  padding: 3px 8px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 700;
}

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

.mini-card {
  display: grid;
  grid-template-columns: auto 64px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.mini-card img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  background: #dbeafe;
}

.mini-card strong,
.mini-card em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.mini-card strong {
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
}

.mini-card em {
  margin-top: 5px;
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
  -webkit-line-clamp: 1;
}

.mini-rank {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  font-size: 13px;
}

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

.category-card {
  min-height: 150px;
  padding: 20px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #111827);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.category-card span {
  color: #dbeafe;
  font-size: 14px;
}

.category-overview {
  margin-top: 24px;
}

.page-title-block {
  padding: 32px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #6b7280;
  font-size: 14px;
}

.crumbs a {
  color: var(--blue);
  font-weight: 700;
}

.filter-panel {
  margin: 22px 0;
  padding: 16px;
}

.filter-panel select {
  max-width: 200px;
}

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

.large-card .poster-wrap {
  aspect-ratio: 16 / 10;
}

.detail-page {
  max-width: 1160px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  padding: 28px;
  background: linear-gradient(135deg, #111827, #1e3a8a);
  color: #fff;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

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

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.lead-text {
  max-width: 760px;
  color: #e5e7eb;
  font-size: 18px;
}

.detail-tags {
  margin: 24px 0;
}

.player-section {
  margin-top: 28px;
  padding: 16px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
  font-size: 34px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-top: 28px;
}

.detail-main,
.detail-side {
  padding: 24px;
}

.detail-main h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-main p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 16px;
}

.info-list {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px 16px;
  margin: 0;
}

.info-list dt {
  color: #6b7280;
  font-weight: 700;
}

.info-list dd {
  margin: 0;
  color: #111827;
}

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

.side-list .mini-card {
  grid-template-columns: auto 58px 1fr;
}

.side-list .mini-card img {
  width: 58px;
  height: 76px;
}

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

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

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

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
  color: #cbd5e1;
}

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
  font-size: 14px;
}

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

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

  .menu-button {
    display: inline-flex;
  }

  .hero {
    height: 520px;
  }

  .quick-panel,
  .detail-hero,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 640px) {
  .header-inner {
    padding: 0 14px;
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    height: 500px;
  }

  .hero-content {
    bottom: 58px;
  }

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

  .hero-arrow {
    display: none;
  }

  .hero-actions,
  .home-search,
  .filter-panel,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .page-main {
    padding: 26px 14px 46px;
  }

  .quick-panel,
  .page-title-block,
  .detail-hero,
  .detail-main,
  .detail-side {
    padding: 20px;
  }

  .movie-grid,
  .rank-list,
  .rank-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel select {
    max-width: none;
  }
}
