html {
  scroll-behavior: smooth;
}

:root {
  --bg: #070a18;
  --bg-soft: #10172f;
  --card: rgba(17, 25, 50, 0.78);
  --card-strong: rgba(20, 31, 61, 0.94);
  --line: rgba(255, 255, 255, 0.10);
  --text: #f8fafc;
  --muted: #aeb7d2;
  --brand: #8b5cf6;
  --brand-two: #06b6d4;
  --brand-hot: #f97316;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 8%, rgba(139, 92, 246, 0.22), transparent 32rem),
    radial-gradient(circle at 82% 2%, rgba(6, 182, 212, 0.16), transparent 28rem),
    linear-gradient(180deg, #050816 0%, #081123 44%, #050713 100%);
  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-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 22, 0.78);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-two));
  box-shadow: 0 14px 36px rgba(139, 92, 246, 0.34);
}

.brand-name {
  font-size: 1.08rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav a {
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

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

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

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 380px;
  align-items: center;
  gap: 56px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  transform: translateX(4%);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-bg {
  left: 50%;
  right: auto;
  width: 100vw;
  margin-left: -50vw;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 8, 22, 0.12), rgba(5, 8, 22, 0.96)),
    radial-gradient(circle at 72% 34%, rgba(139, 92, 246, 0.24), transparent 22rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a5f3fc;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 18px;
  line-height: 1.04;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-copy .lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

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

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

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-two));
  box-shadow: 0 16px 42px rgba(6, 182, 212, 0.24);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(6, 182, 212, 0.18));
}

.hero-poster img,
.poster img,
.detail-poster img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 8, 22, 0.62);
  backdrop-filter: blur(18px);
}

.hero-controls button,
.hero-dots button {
  cursor: pointer;
  border: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

.hero-controls > button {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.6rem;
  line-height: 1;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
}

.hero-dots button.is-active {
  width: 26px;
  opacity: 1;
  background: linear-gradient(135deg, var(--brand), var(--brand-two));
}

.hero-search {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(780px, calc(100% - 32px));
}

.hero-search form,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(8, 13, 31, 0.78);
  backdrop-filter: blur(18px);
}

.hero-search input,
.search-box input,
.filter-selects select {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.hero-search input {
  flex: 1;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
}

.hero-search button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-hot));
}

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

.page-main {
  min-height: 70vh;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0 24px;
}

.compact-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
}

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

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.section-head.small h2 {
  font-size: 1.5rem;
}

.more-link {
  color: #a5f3fc;
  font-weight: 800;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-top: 34px;
  padding-bottom: 12px;
}

.stats-strip a {
  min-height: 98px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

.stats-strip strong {
  display: block;
  font-size: 2rem;
}

.stats-strip span {
  color: var(--muted);
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.22), transparent 11rem),
    var(--card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.category-tile span,
.category-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile strong,
.category-overview-card strong {
  display: inline-flex;
  margin: 12px 0;
  color: #a5f3fc;
}

.category-tile em,
.category-overview-card p {
  display: block;
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.mini-posters {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: flex;
  gap: 8px;
  opacity: 0.65;
}

.mini-posters img {
  width: 42px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: start;
}

.filter-panel {
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 320px;
  color: var(--muted);
}

.search-box input,
.filter-selects select {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
}

.search-box input {
  flex: 1;
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.filter-count {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(165, 243, 252, 0.38);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(6, 182, 212, 0.16));
}

.poster-year {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #07111d;
  font-size: 0.78rem;
  font-weight: 900;
  background: #a5f3fc;
}

.movie-info {
  padding: 16px;
}

.movie-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.movie-info h3 {
  margin: 10px 0 8px;
  font-size: 1.04rem;
  line-height: 1.35;
}

.movie-info p {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  font-size: 0.76rem;
}

.hero-tags span {
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.12);
}

.hot-board {
  position: sticky;
  top: 92px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(17, 25, 50, 0.64);
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 56px 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.rank-num {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand-hot), var(--brand));
}

.rank-cover {
  width: 76px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.rank-body h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.rank-body p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.rank-meta strong {
  color: #fed7aa;
}

.compact-list .rank-item {
  grid-template-columns: 44px minmax(0, 1fr);
}

.compact-list .rank-cover {
  display: none;
}

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

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.inline-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.86rem;
}

.breadcrumb {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.breadcrumb a {
  color: #a5f3fc;
}

.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 32px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.detail-meta div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.detail-meta dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.detail-section {
  padding-top: 26px;
  padding-bottom: 34px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: black;
  box-shadow: var(--shadow);
}

.player-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  font-size: 1.2rem;
  font-weight: 900;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.24), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.play-overlay span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-two));
}

.play-overlay.is-hidden {
  display: none;
}

.player-note {
  color: var(--muted);
}

.prose-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.prose-card h2 {
  margin: 0 0 12px;
}

.prose-card h2 + p {
  margin-top: 0;
}

.prose-card p {
  color: var(--muted);
  line-height: 1.9;
}

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

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

.index-link {
  display: block;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.index-link span {
  display: block;
  font-weight: 900;
  line-height: 1.4;
}

.index-link em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-inner p {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .two-column,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hot-board {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-wrap {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(5, 8, 22, 0.96);
  }

  .main-nav.is-open {
    display: flex;
  }

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

  .hero-slide {
    width: min(100% - 32px, 560px);
    grid-template-columns: 1fr;
    gap: 18px;
    align-content: center;
  }

  .hero-poster {
    width: min(220px, 70vw);
    margin: 0 auto;
    order: -1;
  }

  .hero-controls {
    bottom: 104px;
  }

  .hero-search form,
  .filter-panel,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .rank-cover {
    display: none;
  }

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

@media (max-width: 520px) {
  .stats-strip,
  .movie-grid,
  .full-grid,
  .related-grid,
  .index-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .section-wrap,
  .page-hero,
  .detail-hero,
  .breadcrumb {
    width: min(100% - 24px, 1280px);
  }
}
