:root {
  color-scheme: dark;
  --site-bg: #020617;
  --site-panel: #0f172a;
  --site-panel-soft: #111827;
  --site-line: rgba(148, 163, 184, 0.18);
  --site-text: #e5e7eb;
  --site-muted: #94a3b8;
  --site-blue: #2563eb;
  --site-cyan: #38bdf8;
  --site-radius: 1rem;
  --site-shadow: 0 24px 80px rgba(15, 23, 42, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 5%, rgba(37, 99, 235, 0.24), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(14, 165, 233, 0.16), transparent 36rem),
    var(--site-bg);
  color: var(--site-text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
  display: block;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 1 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--site-line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  white-space: nowrap;
}

.logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.36);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.site-nav a {
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.94rem;
  transition: color 0.18s ease, background 0.18s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.24);
}

.header-search {
  width: min(23rem, 28vw);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
}

.header-search input,
.filter-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #f8fafc;
  background: transparent;
}

.header-search input::placeholder,
.filter-search input::placeholder {
  color: #64748b;
}

.header-search button,
.filter-search button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  border-radius: 999px;
  background: #2563eb;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease;
}

.header-search button {
  padding: 0.42rem 0.78rem;
}

.filter-search button {
  padding: 0.72rem 1.15rem;
}

.header-search button:hover,
.filter-search button:hover {
  transform: translateY(-1px);
  background: #1d4ed8;
}

.mobile-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--site-line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-menu-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.mobile-menu a {
  color: #dbeafe;
  font-weight: 700;
}

.hero-section {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.8s ease, visibility 0.55s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.12)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.42) 45%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 2rem));
  min-height: 74vh;
  margin: 0 auto;
  display: grid;
  align-content: center;
  padding: 6.5rem 0 6rem;
}

.hero-copy {
  max-width: 44rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.38rem 0.72rem;
  border: 1px solid rgba(96, 165, 250, 0.36);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.22);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-title {
  margin: 0 0 1.1rem;
  color: #ffffff;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.hero-desc {
  max-width: 40rem;
  margin: 0 0 1.45rem;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.85;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.6rem;
}

.meta-pill,
.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-weight: 700;
}

.meta-pill {
  padding: 0.42rem 0.72rem;
  font-size: 0.9rem;
}

.tag-chip {
  padding: 0.34rem 0.62rem;
  font-size: 0.78rem;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.15rem;
  border-radius: 0.85rem;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.34);
}

.secondary-btn {
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.7);
}

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

.secondary-btn:hover {
  color: #ffffff;
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(37, 99, 235, 0.18);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: 0.65rem;
  height: 0.65rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.18s ease, background 0.18s ease;
}

.hero-dot.active {
  width: 2.1rem;
  background: #38bdf8;
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  cursor: pointer;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.58);
  transform: translateY(-50%);
  transition: background 0.18s ease, transform 0.18s ease;
}

.hero-arrow:hover {
  background: rgba(37, 99, 235, 0.78);
  transform: translateY(-50%) scale(1.04);
}

.hero-arrow.prev {
  left: 1rem;
}

.hero-arrow.next {
  right: 1rem;
}

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

.section.compact {
  padding: 2.5rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.65rem;
}

.section-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 44rem;
  margin: 0.55rem 0 0;
  color: var(--site-muted);
  line-height: 1.8;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.05rem;
}

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

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.72);
  box-shadow: 0 22px 62px rgba(37, 99, 235, 0.18);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.02) 52%);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.18rem 0.48rem;
  border-radius: 0.5rem;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
  font-size: 0.72rem;
  font-weight: 800;
}

.poster .badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
}

.card-body {
  padding: 0.9rem;
}

.card-title {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 850;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  color: #94a3b8;
  font-size: 0.78rem;
}

.card-desc {
  margin: 0.58rem 0 0;
  color: #aab6c7;
  font-size: 0.84rem;
  line-height: 1.65;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

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

.category-card {
  min-height: 12rem;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 1.25rem;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.88)),
    rgba(15, 23, 42, 0.85);
  box-shadow: var(--site-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.5);
}

.category-card h3 {
  margin: 0 0 0.6rem;
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 850;
}

.category-card p {
  margin: 0;
  color: #aab6c7;
  line-height: 1.72;
  font-size: 0.92rem;
}

.filter-panel {
  margin: 1.25rem 0 1.75rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.78);
}

.filter-search {
  display: flex;
  gap: 0.75rem;
}

.filter-search input {
  min-height: 3rem;
  padding: 0 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.9rem;
  background: rgba(2, 6, 23, 0.72);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.filter-chip {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 0.44rem 0.75rem;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.55);
  cursor: pointer;
  font-weight: 700;
}

.filter-chip:hover {
  color: #ffffff;
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(37, 99, 235, 0.22);
}

.rank-list {
  display: grid;
  gap: 0.85rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.84);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(59, 130, 246, 0.55);
}

.rank-num {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  border-radius: 0.8rem;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  font-weight: 900;
}

.rank-title {
  margin: 0;
  color: #ffffff;
  font-weight: 850;
}

.rank-meta {
  margin: 0.2rem 0 0;
  color: #94a3b8;
  font-size: 0.86rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 3rem;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.17), transparent 48%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.1));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.9rem;
}

.breadcrumb span {
  color: #64748b;
}

.page-title {
  max-width: 58rem;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.page-desc {
  max-width: 58rem;
  margin: 1rem 0 0;
  color: #b9c7db;
  font-size: 1.08rem;
  line-height: 1.85;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: 1.6rem;
  align-items: start;
}

.detail-card,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 20px 70px rgba(2, 6, 23, 0.28);
}

.detail-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #000000;
  outline: 0;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.28)),
    radial-gradient(circle at center, rgba(37, 99, 235, 0.25), transparent 24rem);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.78);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.38);
  font-size: 1.05rem;
  font-weight: 900;
}

.play-icon {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #2563eb;
  background: #ffffff;
  font-size: 1.2rem;
}

.detail-body {
  padding: 1.35rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.detail-body h2,
.side-card h2 {
  margin: 1.2rem 0 0.65rem;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
}

.detail-body p {
  margin: 0 0 0.85rem;
  color: #cbd5e1;
  line-height: 1.9;
}

.side-card {
  padding: 1rem;
}

.side-poster {
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

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

.side-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.side-link {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 0.8rem;
  background: rgba(2, 6, 23, 0.42);
  transition: background 0.18s ease;
}

.side-link:hover {
  background: rgba(37, 99, 235, 0.2);
}

.side-link img {
  width: 3.4rem;
  height: 4.8rem;
  object-fit: cover;
  border-radius: 0.55rem;
}

.side-link strong {
  display: block;
  color: #ffffff;
  line-height: 1.35;
}

.side-link span {
  display: block;
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.82rem;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.76);
}

.footer-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.hidden-card {
  display: none !important;
}

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

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

  .header-search {
    display: none;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 64px;
  }

  .site-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .mobile-menu.open {
    display: block;
  }

  .hero-section,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    padding-top: 5.25rem;
    padding-bottom: 5rem;
  }

  .hero-title {
    font-size: clamp(2.25rem, 13vw, 4rem);
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 3.25rem 0;
  }

  .section-head {
    display: block;
  }

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

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

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

  .side-card {
    order: -1;
  }

  .side-poster {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-logo {
    font-size: 1rem;
  }

  .logo-mark {
    width: 2rem;
    height: 2rem;
  }

  .hero-meta,
  .action-row {
    gap: 0.5rem;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

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

  .filter-search {
    display: grid;
  }

  .rank-item {
    grid-template-columns: 2.8rem minmax(0, 1fr);
  }

  .rank-item .badge {
    display: none;
  }

  .footer-inner {
    display: grid;
  }
}
