:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --yellow: #facc15;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.18), transparent 30%), linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  width: 100%;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.site-nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
  font-size: 14px;
}

.site-logo span:last-child {
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.nav-dropdown > a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-dropdown:hover > a,
.nav-link.active,
.nav-dropdown > a.active {
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 48px;
  left: 0;
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a,
.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.dropdown-panel a:hover,
.mobile-nav a:hover {
  background: rgba(51, 65, 85, 0.92);
  color: #fff;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.98);
}

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

.hero {
  position: relative;
  min-height: 560px;
  height: 72vh;
  overflow: hidden;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) brightness(0.74);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72) 55%, #020617 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.76));
}

.hero-content {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: end;
  gap: 40px;
  padding-bottom: 92px;
}

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

.hero-kicker,
.page-kicker {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--yellow);
  font-weight: 700;
}

.hero-kicker span,
.page-kicker,
.hero-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
  font-size: 13px;
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 700px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-actions,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.primary-btn,
.ghost-btn,
.search-box button,
.section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-box button {
  background: linear-gradient(135deg, var(--blue), #0891b2);
  color: #fff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

.primary-btn:hover,
.search-box button:hover,
.section-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
}

.ghost-btn,
.section-action {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.52);
  color: #e2e8f0;
}

.ghost-btn:hover {
  background: rgba(30, 41, 59, 0.82);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateY(18px);
}

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

.hero-poster span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.82);
  color: #fff;
  font-size: 13px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.32);
}

.hero-dot.active {
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 28px;
}

.home-search {
  margin-top: -36px;
  position: relative;
  z-index: 2;
}

.search-panel,
.page-hero,
.feature-panel,
.side-card,
.detail-block,
.player-shell,
.category-card a {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: 24px;
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.movie-detail-head h1,
.detail-block h2,
.side-card h2,
.site-footer h2 {
  margin: 0;
  color: #fff;
  font-weight: 800;
}

.search-panel h2,
.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.search-panel p,
.section-head p,
.page-hero p,
.movie-card-body p,
.side-card p,
.detail-block p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.62);
}

.search-box input,
.category-tools input,
.category-tools select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  outline: none;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
}

.category-chips,
.sibling-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.category-chips a,
.sibling-links a {
  padding: 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
}

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

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

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(30, 41, 59, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.movie-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(2, 6, 23, 0.82));
  opacity: 0.8;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #111827;
  font-weight: 900;
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: #fff;
  font-weight: 800;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card:hover .movie-title {
  color: #60a5fa;
}

.movie-card-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 46px;
  margin: 8px 0 12px;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta span,
.detail-meta span {
  color: #cbd5e1;
  font-size: 13px;
}

.movie-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 10px;
  color: #475569;
}

.movie-card-compact .movie-card-body p {
  display: none;
}

.movie-card-compact .movie-title {
  min-height: 42px;
  font-size: 15px;
}

.page-shell {
  padding: 36px 0 70px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 38px;
  border-radius: 28px;
}

.page-hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
}

.category-page-hero,
.search-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  align-items: end;
}

.category-tools {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ranking-tools {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.category-card a {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card a:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.48);
}

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

.category-thumbs img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.category-body {
  padding: 18px;
}

.category-body h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.category-body p {
  min-height: 52px;
  color: var(--muted);
  line-height: 1.7;
}

.category-body span {
  display: inline-flex;
  margin-top: 14px;
  color: #60a5fa;
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #60a5fa;
}

.detail-shell {
  padding-bottom: 70px;
}

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

.detail-main {
  min-width: 0;
}

.player-panel {
  margin-bottom: 24px;
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15), rgba(2, 6, 23, 0.48));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-shell.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-size: 30px;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.48);
}

.movie-detail-head,
.detail-block {
  margin-bottom: 22px;
  padding: 24px;
  border-radius: 24px;
}

.movie-detail-head {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
}

.movie-detail-head h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 46px);
}

.movie-detail-head p {
  margin: 0 0 14px;
  color: #e2e8f0;
  line-height: 1.8;
}

.detail-tags {
  margin-top: 16px;
  margin-bottom: 0;
}

.detail-block h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.detail-block p {
  color: #cbd5e1;
  font-size: 16px;
}

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

.side-card {
  padding: 18px;
  border-radius: 22px;
}

.side-card img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
}

.side-card h2 {
  margin-bottom: 10px;
  font-size: 20px;
}

.block-btn {
  width: 100%;
  margin-top: 16px;
}

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

.side-list .movie-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
}

.side-list .movie-cover img {
  height: 122px;
}

.side-list .movie-meta,
.side-list .card-play {
  display: none;
}

.side-list .movie-card-body {
  padding: 10px;
}

.search-results:empty::before {
  content: "输入关键词后展示匹配内容";
  display: block;
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.7);
}

.site-footer {
  margin-top: 70px;
  padding: 48px 0 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), #020617);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  margin-bottom: 12px;
}

.site-footer h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: #64748b;
  font-size: 14px;
}

.is-hidden-by-filter {
  display: none !important;
}

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

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

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

  .hero-poster,
  .detail-side {
    display: none;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    height: 62px;
  }

  .site-logo {
    font-size: 19px;
  }

  .hero {
    min-height: 600px;
    height: auto;
  }

  .hero-stage,
  .hero-slide {
    position: relative;
    min-height: 600px;
  }

  .hero-slide:not(.active) {
    display: none;
  }

  .hero-content {
    min-height: 600px;
    padding-bottom: 86px;
  }

  .hero h1 {
    font-size: 40px;
  }

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

  .search-panel,
  .category-page-hero,
  .search-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-tools {
    flex-direction: column;
    align-items: stretch;
  }

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

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1240px);
  }

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

  .primary-btn,
  .ghost-btn,
  .search-box button {
    width: 100%;
  }

  .poster-grid,
  .wide-grid,
  .ranking-grid,
  .category-grid {
    gap: 14px;
  }

  .movie-card-body {
    padding: 12px;
  }

  .page-hero {
    padding: 24px;
  }

  .play-circle {
    width: 70px;
    height: 70px;
  }
}
