:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.64);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.16);
  --blue: #3b82f6;
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(
      circle at 16% 8%,
      rgba(6, 182, 212, 0.2),
      transparent 28rem
    ),
    radial-gradient(
      circle at 82% 12%,
      rgba(59, 130, 246, 0.18),
      transparent 32rem
    ),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.main-nav a,
.mobile-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #cbd5e1;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: white;
  background: rgba(6, 182, 212, 0.14);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.92);
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.65s ease,
    visibility 0.65s ease;
}

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

.hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.05) brightness(0.72);
}

.hero-shade {
  background:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.96) 0%,
      rgba(2, 6, 23, 0.72) 38%,
      rgba(2, 6, 23, 0.26) 100%
    ),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 56px;
  align-items: center;
  padding: 72px 0 132px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-copy h2 {
  margin: 18px 0 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.035em;
}

.hero-copy p,
.page-hero p,
.lead-text {
  max-width: 680px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(8, 47, 73, 0.35);
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

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

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.28);
}

.ghost-btn,
.text-link {
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.55);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 32px;
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.9),
    rgba(6, 182, 212, 0.16)
  );
  box-shadow: var(--shadow);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.38));
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 118px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 34px;
  background: var(--cyan);
}

.hero-search-card {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 260px minmax(240px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search-card strong {
  display: block;
  font-size: 18px;
}

.hero-search-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-search-card input,
.search-box input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  color: white;
  background: rgba(2, 6, 23, 0.58);
  padding: 0 18px;
}

.hero-cat-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hero-cat-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #cffafe;
  background: var(--cyan-soft);
  font-size: 13px;
}

.hero-thumbs {
  position: absolute;
  z-index: 5;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 108px;
  display: flex;
  gap: 12px;
}

.hero-thumb {
  width: 112px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  opacity: 0.72;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  transform: translateY(-4px);
}

.hero-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-thumb span {
  display: block;
  padding: 8px;
  color: #e2e8f0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.section-heading p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.split-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 20px 55px rgba(2, 6, 23, 0.18);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 26px 80px rgba(6, 182, 212, 0.1);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(6, 182, 212, 0.24),
      transparent 40%
    ),
    linear-gradient(135deg, #0f172a, #1e293b);
}

.movie-card .poster-frame img,
.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition:
    transform 0.4s ease,
    opacity 0.2s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.05);
}

.poster-frame img.media-off,
.hero-poster img.media-off,
.hero-thumb img.media-off {
  opacity: 0;
}

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.poster-type {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta a {
  color: #67e8f9;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #67e8f9;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 10px 0 0;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.compact-card .chip-row {
  display: none;
}

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

.category-card a {
  position: relative;
  display: block;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.22);
}

.category-bg,
.category-overlay,
.category-content {
  position: absolute;
  inset: 0;
}

.category-bg {
  background-size: cover;
  background-position: center;
  transition: transform 0.45s ease;
}

.category-overlay {
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.22),
    rgba(2, 6, 23, 0.92)
  );
}

.category-card:hover .category-bg {
  transform: scale(1.06);
}

.category-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
}

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

.category-content em {
  margin-top: 10px;
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.6;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.68);
}

.search-box {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
}

.search-box span {
  color: #e2e8f0;
  font-weight: 800;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-buttons button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.36);
  padding: 0 12px;
  cursor: pointer;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  color: white;
  border-color: rgba(6, 182, 212, 0.55);
  background: rgba(6, 182, 212, 0.18);
}

.movie-card.is-hidden {
  display: none;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.small-hero {
  min-height: 420px;
}

.page-hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) brightness(0.68);
  transform: scale(1.04);
}

.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.58)),
    linear-gradient(180deg, transparent, #020617);
}

.page-hero-content,
.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero-content {
  padding: 110px 0 90px;
}

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

.breadcrumb a {
  color: #67e8f9;
}

.stacked-sections {
  display: grid;
  gap: 62px;
}

.detail-inner {
  padding: 56px 0 72px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-copy {
  max-width: 760px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.meta-list li {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.meta-list strong {
  color: #67e8f9;
  font-size: 12px;
}

.meta-list span {
  color: #e2e8f0;
}

.player-section {
  padding-bottom: 42px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-trigger {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: white;
  background: radial-gradient(
    circle at 50% 48%,
    rgba(6, 182, 212, 0.22),
    rgba(2, 6, 23, 0.42) 42%,
    rgba(2, 6, 23, 0.66)
  );
  cursor: pointer;
}

.play-trigger span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 55px rgba(6, 182, 212, 0.36);
  font-size: 30px;
  padding-left: 4px;
}

.play-trigger strong {
  font-size: 20px;
}

.video-shell.is-playing .play-trigger {
  display: none;
}

.video-shell.player-error .play-trigger strong::after {
  content: "加载失败，请稍后重试";
  display: block;
  margin-top: 10px;
  color: #fecaca;
  font-size: 14px;
  font-weight: 500;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 36px;
}

.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.95;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.84);
}

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

.footer-inner p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: #64748b;
  font-size: 13px;
}

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

  .hero-thumbs {
    display: none;
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .hero-carousel {
    min-height: 820px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 48px;
  }

  .hero-poster {
    width: min(260px, 78vw);
  }

  .hero-search-card {
    grid-template-columns: 1fr;
    bottom: 20px;
  }

  .hero-controls {
    bottom: 220px;
  }

  .hero-cat-links {
    justify-content: flex-start;
  }

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

  .split-heading,
  .footer-inner,
  .detail-content,
  .detail-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .detail-poster {
    max-width: 280px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .section-wrap,
  .page-hero-content,
  .detail-inner,
  .footer-inner,
  .copyright {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 17px;
  }

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

  .hero-copy h2 {
    font-size: 28px;
  }

  .hero-carousel {
    min-height: 900px;
  }

  .hero-content {
    padding-bottom: 260px;
  }

  .hero-controls {
    bottom: 250px;
  }

  .movie-grid,
  .featured-grid,
  .ranking-grid,
  .all-movie-grid,
  .category-grid,
  .meta-list {
    grid-template-columns: 1fr;
  }

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

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