:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: #0b1220;
  --muted: #94a3b8;
  --text: #f8fafc;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #22d3ee;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 15%, rgba(34, 211, 238, 0.1), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.45);
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-search input {
  width: 13.5rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.7rem;
  padding: 0.65rem 0.85rem;
  background: #1e293b;
  color: #fff;
  outline: none;
}

.nav-search input:focus {
  border-color: rgba(37, 99, 235, 0.85);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.nav-search button,
.primary-button,
.secondary-button,
.filter-button {
  border: 0;
  border-radius: 0.7rem;
  padding: 0.7rem 1rem;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.primary-button:hover,
.filter-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.secondary-button {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.secondary-button:hover {
  background: rgba(30, 41, 59, 0.95);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 0.7rem;
  padding: 0.65rem 0.85rem;
  background: #1e293b;
  color: #fff;
  font-size: 1.1rem;
}

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

.mobile-panel.open {
  display: grid;
  gap: 0.35rem;
}

.mobile-nav-link {
  padding: 0.75rem 0;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.hero {
  position: relative;
  height: 37.5rem;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.72) 44%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  max-width: 43rem;
  padding-top: 2rem;
}

.hero-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: var(--blue);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero h1 {
  margin: 1rem 0 0.8rem;
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero .lead {
  margin: 0 0 0.5rem;
  color: #dbeafe;
  font-size: 1.16rem;
  line-height: 1.7;
}

.hero .summary {
  display: -webkit-box;
  max-width: 40rem;
  margin: 0 0 1.6rem;
  overflow: hidden;
  color: #cbd5e1;
  line-height: 1.8;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-dots {
  display: flex;
  gap: 0.45rem;
  margin-top: 2rem;
}

.hero-dot {
  width: 1rem;
  height: 0.25rem;
  border: 0;
  border-radius: 999px;
  background: #64748b;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 2.15rem;
  background: var(--blue);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}

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

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

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

.section {
  margin-bottom: 3.5rem;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.section-heading p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: #93c5fd;
  font-weight: 700;
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.category-chip {
  border-radius: 0.8rem;
  padding: 0.9rem 1.2rem;
  background: #1e293b;
  color: #fff;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.category-chip:hover {
  background: var(--blue);
  transform: translateY(-2px);
}

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.85rem;
  background: #111827;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease, filter 0.32s ease;
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.1) 46%, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-badge,
.card-year {
  position: absolute;
  z-index: 3;
  top: 0.55rem;
  border-radius: 0.45rem;
  padding: 0.25rem 0.48rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.card-badge {
  left: 0.55rem;
  background: var(--blue);
}

.card-year {
  right: 0.55rem;
  background: rgba(2, 6, 23, 0.72);
}

.card-body {
  padding: 0.65rem 0.1rem 0;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 0;
  overflow: hidden;
  font-size: 0.95rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body h3 a:hover {
  color: #60a5fa;
}

.card-body p {
  display: -webkit-box;
  min-height: 2.6em;
  margin: 0.35rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin-top: 0.4rem;
  color: #64748b;
  font-size: 0.75rem;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), transparent 40%),
    #0f172a;
  box-shadow: var(--shadow);
}

.category-card h2 {
  margin: 0 0 0.45rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-card .category-card-link {
  display: inline-flex;
  margin-top: 1rem;
  color: #93c5fd;
  font-weight: 800;
}

.page-hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(2, 6, 23, 0.15)),
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.13), transparent 24rem);
}

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

.page-hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.page-hero p {
  max-width: 48rem;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.search-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-tools input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.8rem;
  padding: 0.9rem 1rem;
  background: #0f172a;
  color: #fff;
  outline: none;
}

.search-tools input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.result-count {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
  color: #93c5fd;
  font-size: 0.92rem;
}

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

.player-card,
.info-card,
.related-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 1rem 1rem 0 0;
  background: #000;
}

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

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 5rem;
  height: 5rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.88);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.big-play:hover {
  background: var(--blue-dark);
  transform: translate(-50%, -50%) scale(1.05);
}

.big-play.hidden {
  opacity: 0;
  pointer-events: none;
}

.player-caption {
  padding: 1rem 1.1rem;
  color: #cbd5e1;
}

.detail-content {
  padding: 1.2rem;
}

.detail-content h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 3vw, 3rem);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0;
}

.detail-tags span {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: #1e293b;
  color: #dbeafe;
  font-size: 0.85rem;
}

.detail-copy h2 {
  margin: 1.7rem 0 0.7rem;
  font-size: 1.25rem;
}

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

.side-poster {
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
  background: #111827;
}

.side-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.info-list {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 0.65rem;
}

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

.info-list dd {
  margin: 0;
  text-align: right;
}

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

.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1rem;
  background: #020617;
  color: #64748b;
  text-align: center;
}

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

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

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

  .info-card {
    max-width: 24rem;
  }
}

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

  .nav-toggle {
    display: inline-flex;
  }

  .hero {
    height: 34rem;
  }

  .hero-content {
    padding-inline: 1.8rem;
  }

  .hero-arrow {
    display: none;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

  .search-tools {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 540px) {
  .brand {
    font-size: 1rem;
  }

  .hero {
    height: 32rem;
  }

  .hero .lead,
  .hero .summary {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .secondary-button {
    text-align: center;
  }

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

  .main {
    padding-top: 2rem;
  }
}
