:root {
  --bg: #f8fafc;
  --bg-soft: #eff6ff;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-soft: #dbeafe;
  --card: #ffffff;
  --dark: #0f172a;
  --shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 52%, #f1f5f9 100%);
}

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

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

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.92);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.32);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  color: #1f2937;
}

.brand-text em {
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
  font-style: normal;
}

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

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--primary);
}

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

.mobile-nav a {
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 14px;
}

.mobile-nav a.is-active,
.mobile-nav a:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.4s ease;
  pointer-events: none;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.64) 46%, rgba(2, 6, 23, 0.14) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2));
  bottom: 70px;
  max-width: 780px;
  color: #ffffff;
}

.hero-kicker {
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(37, 99, 235, 0.72);
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-title,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.04;
  font-weight: 800;
}

.hero-summary {
  margin: 18px 0 0;
  max-width: 720px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  color: #cbd5e1;
}

.hero-meta span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.56);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.32);
}

.btn-soft {
  color: var(--primary-dark);
  background: #dbeafe;
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

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

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

.home-search {
  width: min(1180px, calc(100% - 32px));
  margin: -36px auto 0;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  box-shadow: var(--shadow);
}

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

.home-search p {
  margin-top: 8px;
  color: #dbeafe;
}

.section-block {
  padding: 58px 0 0;
}

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

.section-head h2,
.ranking-box h2,
.link-cloud h2,
.info-panel h2,
.footer-links h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #1f2937;
}

.section-head a,
.text-link {
  color: var(--primary);
  font-weight: 700;
}

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

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 160px;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
  font-size: 24px;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.7;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

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

.movie-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.movie-card-wide .movie-cover {
  aspect-ratio: 16 / 9;
}

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

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

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.duration-badge {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 30px;
  text-align: center;
  background: rgba(37, 99, 235, 0.9);
}

.cover-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  opacity: 0;
  background: rgba(15, 23, 42, 0.18);
  transition: opacity 0.2s ease;
}

.movie-card-link:hover .cover-play {
  opacity: 1;
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0;
  min-height: 46px;
  font-size: 17px;
  line-height: 1.35;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 9px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
}

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

.ranking-box,
.glass-section,
.soft-section,
.link-cloud,
.detail-content-card,
.poster-panel,
.info-panel,
.category-overview-card {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.ranking-box {
  padding: 22px;
}

.sticky-side {
  position: sticky;
  top: 96px;
}

.compact-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 10px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.compact-card img {
  width: 64px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #0f172a;
}

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

.compact-card small {
  margin-top: 5px;
  color: var(--muted);
}

.list-rank {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  font-size: 13px;
}

.glass-section,
.soft-section,
.link-cloud {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
  padding: 28px;
}

.soft-section {
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.page-hero {
  min-height: 330px;
  display: grid;
  align-items: end;
  padding: 64px max(24px, calc((100% - 1180px) / 2));
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #1d4ed8 68%, #2563eb);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.category-page-hero {
  background: radial-gradient(circle at 75% 15%, rgba(96, 165, 250, 0.5), transparent 34%), linear-gradient(135deg, #0f172a, #1e40af);
}

.ranking-hero {
  background: radial-gradient(circle at 80% 20%, rgba(253, 186, 116, 0.42), transparent 32%), linear-gradient(135deg, #020617, #1e3a8a);
}

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

.category-overview-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.category-preview-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  min-height: 220px;
  background: #0f172a;
}

.category-preview-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-card > div {
  padding: 24px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-weight: 700;
  font-size: 14px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: #1f2937;
  background: #f8fafc;
  outline: none;
}

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

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 28px;
  text-align: center;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
  display: block;
}

.link-cloud div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.link-cloud a {
  border-radius: 999px;
  padding: 9px 16px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.detail-layout {
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--muted);
}

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

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.28));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-orb {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding-left: 4px;
  color: var(--primary);
  background: #ffffff;
  font-size: 28px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.26);
}

.detail-content-card {
  padding: 30px;
}

.detail-content-card h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
}

.detail-content-card h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.detail-content-card p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.9;
}

.detail-content-card .lead-text {
  margin-top: 20px;
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

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

.detail-meta a {
  color: #1d4ed8;
  background: #dbeafe;
}

.tag-row-large span {
  font-size: 14px;
  padding: 7px 12px;
}

.detail-side {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 96px;
}

.poster-panel,
.info-panel {
  padding: 18px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: #0f172a;
  margin-bottom: 16px;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 18px 0 0;
}

.info-panel dt {
  color: var(--muted);
}

.info-panel dd {
  margin: 0;
  color: #1f2937;
  font-weight: 700;
}

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

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
}

.brand-footer .brand-text strong {
  color: #ffffff;
}

.brand-footer .brand-text em,
.footer-brand p {
  color: #94a3b8;
}

.footer-brand p {
  max-width: 520px;
  line-height: 1.8;
}

.footer-links h2 {
  color: #ffffff;
  font-size: 18px;
}

.footer-links ul {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  color: #94a3b8;
  font-size: 14px;
}

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

  .mobile-nav {
    display: flex;
  }

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

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

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

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

  .detail-side,
  .sticky-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    height: 62px;
  }

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

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .hero-carousel {
    height: 76vh;
    min-height: 560px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 70px;
  }

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

  .btn {
    width: 100%;
  }

  .home-search {
    margin-top: -24px;
  }

  .poster-grid,
  .compact-grid,
  .wide-grid,
  .category-grid,
  .category-overview-grid,
  .filter-panel,
  .detail-related-list {
    grid-template-columns: 1fr 1fr;
  }

  .filter-panel .filter-search {
    grid-column: 1 / -1;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .category-preview-images {
    min-height: 180px;
  }

  .page-hero {
    min-height: 280px;
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .detail-content-card {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .poster-grid,
  .compact-grid,
  .wide-grid,
  .category-grid,
  .category-overview-grid,
  .filter-panel,
  .detail-related-list {
    grid-template-columns: 1fr;
  }

  .movie-card-wide .movie-cover {
    aspect-ratio: 3 / 4;
  }

  .compact-card {
    grid-template-columns: auto 58px minmax(0, 1fr);
  }

  .filter-panel {
    padding: 14px;
  }
}
