:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-soft: #0f172a;
  --panel: rgba(17, 24, 39, 0.76);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.22);
  --radius: 1.25rem;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #08111f 45%, #030712 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.36);
}

.brand-text {
  font-size: 1.35rem;
}

.desktop-nav,
.mobile-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.62rem 0.95rem;
  border-radius: 0.8rem;
  color: var(--muted-strong);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.9);
}

.menu-toggle {
  width: 2.6rem;
  height: 2.6rem;
  display: none;
  place-items: center;
  gap: 0.26rem;
  border: 0;
  border-radius: 0.8rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.menu-toggle span {
  width: 1.15rem;
  height: 2px;
  display: block;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 0.85rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.96);
}

.page-main {
  padding-top: 68px;
}

.hero {
  position: relative;
  height: min(80vh, 820px);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 900ms ease, transform 1200ms ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.92) 0%, rgba(3, 7, 18, 0.56) 44%, rgba(3, 7, 18, 0.18) 100%),
    linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.4) 34%, transparent 100%);
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 clamp(3rem, 8vw, 7rem);
}

.hero-kicker,
.eyebrow,
.rank-index,
.year-badge,
.region-badge,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  line-height: 1;
}

.hero-kicker {
  padding: 0.52rem 0.85rem;
  margin-bottom: 1rem;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.36);
  font-weight: 800;
}

.hero h1,
.hero h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 680px;
  margin: 1.2rem 0 1.6rem;
  color: var(--muted-strong);
  font-size: clamp(1.02rem, 2vw, 1.35rem);
}

.hero-actions,
.detail-actions,
.category-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button-primary,
.button-secondary,
.site-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 0.9rem;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button-primary:hover,
.site-search button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.78);
}

.button-secondary:hover {
  border-color: rgba(96, 165, 250, 0.65);
  transform: translateY(-1px);
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(37, 99, 235, 0.82);
}

.hero-control.prev {
  left: clamp(1rem, 3vw, 2rem);
}

.hero-control.next {
  right: clamp(1rem, 3vw, 2rem);
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 1.35rem;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 2rem;
  background: #fff;
}

.site-search {
  width: min(620px, 100%);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(14px);
}

.site-search input,
.filter-input {
  width: 100%;
  min-height: 2.7rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 0.75rem;
  outline: none;
  color: #fff;
  background: rgba(2, 6, 23, 0.76);
}

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

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

.content-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

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

.section-title h2,
.page-title h1,
.detail-text h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-link {
  color: #60a5fa;
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.45rem);
}

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--radius);
  color: #fff;
  background: rgba(15, 23, 42, 0.52);
  overflow: hidden;
  transition: transform 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  background: rgba(30, 41, 59, 0.78);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 28% 20%, rgba(37, 99, 235, 0.5), transparent 32%),
    linear-gradient(145deg, #172554, #020617 58%, #111827);
}

.poster-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

.poster-frame.is-empty img {
  opacity: 0;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 48%);
}

.year-badge,
.region-badge {
  position: absolute;
  z-index: 2;
  padding: 0.42rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.year-badge {
  top: 0.7rem;
  right: 0.7rem;
}

.region-badge {
  left: 0.7rem;
  bottom: 0.7rem;
  background: rgba(37, 99, 235, 0.9);
}

.play-float {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 3.35rem;
  height: 3.35rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  display: block;
  padding: 1rem 0.25rem 0.1rem;
}

.card-body strong {
  display: -webkit-box;
  min-height: 2.6em;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body em {
  display: -webkit-box;
  margin-top: 0.45rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scroll-row {
  display: flex;
  gap: 1rem;
  padding-bottom: 0.7rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.scroll-row .movie-card {
  width: 18rem;
  flex: 0 0 auto;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.25rem;
}

.movie-card.large .poster-frame {
  aspect-ratio: 16 / 9;
}

.movie-card.large .card-body strong {
  font-size: clamp(1.4rem, 3vw, 2.25rem);
}

.side-list {
  display: grid;
  gap: 1rem;
}

.list-card {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.list-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(30, 41, 59, 0.76);
}

.list-poster {
  border-radius: 0.9rem;
}

.list-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.list-info strong,
.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.list-info em,
.list-info small {
  margin-top: 0.35rem;
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}

.list-info small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-tile {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.18), transparent 42%),
    rgba(15, 23, 42, 0.68);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.55);
}

.category-tile strong {
  font-size: 1.25rem;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 4rem 5.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.64);
}

.rank-index {
  width: 2.7rem;
  height: 2.7rem;
  justify-content: center;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.rank-poster {
  aspect-ratio: 2 / 3;
  border-radius: 0.7rem;
}

.rank-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.3rem;
}

.rank-meta small {
  color: var(--muted);
}

.page-title {
  padding: 4rem 0 2rem;
}

.page-title p {
  max-width: 760px;
  color: var(--muted-strong);
  font-size: 1.05rem;
  line-height: 1.8;
}

.filter-bar {
  margin-bottom: 1.4rem;
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumb a {
  color: #93c5fd;
}

.detail-hero {
  padding: 3rem 0 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.38), transparent 34%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.28));
  cursor: pointer;
}

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

.player-cover span {
  width: clamp(4rem, 9vw, 6rem);
  height: clamp(4rem, 9vw, 6rem);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.42);
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21rem;
  gap: 1.5rem;
  padding: 2rem 0 0;
}

.detail-text,
.detail-side,
.info-panel {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.62);
}

.detail-text {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-text p {
  color: var(--muted-strong);
  line-height: 1.95;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.tag {
  padding: 0.48rem 0.68rem;
  color: #bfdbfe;
  background: var(--accent-soft);
  font-size: 0.86rem;
}

.detail-side {
  padding: 1rem;
}

.detail-side img {
  width: 100%;
  border-radius: 1rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background:
    radial-gradient(circle at 28% 20%, rgba(37, 99, 235, 0.5), transparent 32%),
    linear-gradient(145deg, #172554, #020617 58%, #111827);
}

.info-panel {
  margin-top: 1rem;
  padding: 1rem;
  color: var(--muted-strong);
}

.info-panel div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-panel div:last-child {
  border-bottom: 0;
}

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

.search-grid:empty::before {
  content: "输入关键词，查找喜欢的影视内容。";
  display: block;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.62);
}

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

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2.2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted-strong);
}

.footer-links a {
  color: #bfdbfe;
}

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 1rem;
  }

  .info-panel {
    margin-top: 0;
  }
}

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

  .menu-toggle {
    display: grid;
  }

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

  .hero {
    min-height: 620px;
  }

  .hero-control {
    display: none;
  }

  .hero-content {
    padding-bottom: 4.2rem;
  }

  .site-search {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .rank-item .button-secondary {
    grid-column: 2 / -1;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-strip,
  .category-grid,
  .related-grid {
    gap: 0.8rem;
  }

  .card-body strong {
    font-size: 0.94rem;
  }

  .card-body em {
    font-size: 0.82rem;
  }

  .list-card {
    grid-template-columns: 5.7rem minmax(0, 1fr);
  }
}
