:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(96, 165, 250, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #60a5fa;
  --cyan: #67e8f9;
  --accent: #2563eb;
  --radius: 22px;
  --shadow: 0 26px 80px rgba(15, 23, 42, 0.48);
}

* {
  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(8, 145, 178, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.9));
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.32);
}

.nav-wrap {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #dbeafe;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(8, 145, 178, 0.9));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
  font-size: 16px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-size: 14px;
  transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #e0f2fe;
  background: rgba(37, 99, 235, 0.18);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.16);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
}

.hero {
  position: relative;
  min-height: 82vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  filter: saturate(1.08) contrast(1.06);
}

.hero-bg.image-missing,
.movie-card img.image-missing,
.rank-cover img.image-missing,
.hero-poster img.image-missing {
  opacity: 0.18;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(8, 145, 178, 0.28));
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 40%, rgba(2, 6, 23, 0.26) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.35) 42%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 82vh;
  padding-top: 132px;
  padding-bottom: 86px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: end;
  gap: 48px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bae6fd;
  padding: 7px 12px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.065em;
  text-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2.5vw, 22px);
}

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

.hero-tags {
  margin-top: 20px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 5px 10px;
  font-size: 12px;
}

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

.btn,
.search-panel button,
.search-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  font-weight: 800;
  transition: 0.24s ease;
}

.btn.primary,
.search-panel button {
  color: white;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.26);
}

.btn.ghost,
.search-panel a {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
}

.btn.soft {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
}

.btn:hover,
.search-panel button:hover,
.search-panel a:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.38);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.26);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: 0 36px 100px rgba(2, 6, 23, 0.62);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.45;
}

.hero-dot.active {
  width: 26px;
  opacity: 1;
  background: var(--cyan);
}

.quick-search {
  position: relative;
  z-index: 10;
  margin-top: -32px;
}

.search-panel,
.filter-box,
.content-panel,
.category-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 14px;
}

.search-panel input,
.filter-grid input,
.filter-grid select {
  width: 100%;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  outline: 0;
  background: rgba(2, 6, 23, 0.46);
  padding: 13px 15px;
}

.page-main {
  padding-top: 124px;
  padding-bottom: 70px;
}

.page-section {
  padding: 68px 0 0;
}

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

.section-head h2,
.page-title-block h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.045em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-head p,
.page-title-block p,
.movie-card-body p,
.rank-info p,
.content-panel p,
.footer-grid p {
  color: var(--muted);
}

.section-more {
  color: #bae6fd;
  font-weight: 800;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(37, 99, 235, 0.1);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.32);
  transition: 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.34);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(8, 145, 178, 0.16));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.045);
}

.poster-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: white;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3em;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
}

.movie-card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.8em;
  margin: 9px 0 12px;
  font-size: 13px;
}

.movie-card.compact .movie-card-body p {
  -webkit-line-clamp: 2;
  min-height: 3.2em;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #bae6fd;
  font-size: 12px;
  margin-bottom: 11px;
}

.meta-line span,
.meta-line a {
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  padding: 4px 8px;
}

.heat-block {
  padding-top: 56px;
}

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

.rank-pill {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
}

.rank-pill span,
.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #dbeafe;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.82), rgba(8, 145, 178, 0.84));
  font-weight: 900;
}

.rank-pill strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-pill em {
  color: var(--cyan);
  font-style: normal;
  font-weight: 900;
}

.page-title-block {
  max-width: 820px;
  margin-bottom: 34px;
}

.page-title-block h1 {
  margin-top: 14px;
  font-size: clamp(36px, 7vw, 66px);
  line-height: 1.02;
}

.page-title-block p {
  font-size: 18px;
}

.compact-title {
  margin-bottom: 26px;
}

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

.category-card {
  display: block;
  padding: 22px;
  transition: 0.24s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.category-card em {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--cyan);
  font-style: normal;
  font-weight: 800;
}

.category-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.category-card div span {
  color: #dbeafe;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 9px;
  font-size: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 88px 1fr 120px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-cover img {
  width: 88px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
}

.heat-score {
  text-align: right;
}

.heat-score span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.heat-score strong {
  color: var(--cyan);
  font-size: 24px;
}

.filter-box {
  padding: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
}

.search-summary {
  margin: 18px 0;
  color: var(--muted-strong);
}

.detail-main {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 1));
}

.detail-hero {
  position: relative;
  padding: 116px 0 56px;
  overflow: hidden;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image: var(--poster-image);
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.66)),
    linear-gradient(0deg, #020617 0%, transparent 70%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 34px;
  align-items: center;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  background: #000;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.58);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.38);
  font-size: 30px;
  padding-left: 4px;
}

.player-overlay strong {
  font-size: 20px;
}

.player-overlay.hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.breadcrumb a,
.detail-meta a {
  color: #bae6fd;
}

.detail-copy h1 {
  margin-top: 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
}

.lead {
  color: var(--muted-strong);
  font-size: 18px;
}

.detail-meta {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  margin: 20px 0;
}

.detail-content {
  padding-bottom: 72px;
}

.content-panel {
  padding: 24px;
  margin-bottom: 20px;
}

.content-panel h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.content-panel p {
  margin: 0;
  font-size: 16px;
}

.related-section {
  padding-top: 34px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding: 46px 0;
}

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

.footer-grid h3 {
  margin: 0 0 12px;
}

.footer-grid a {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

.footer-grid a:hover {
  color: #bae6fd;
}

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

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

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

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

@media (max-width: 820px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .menu-button {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 76px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
  }

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

  .nav-link {
    padding: 13px 14px;
  }

  .hero,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 108px;
    padding-bottom: 96px;
  }

  .hero-poster {
    display: none;
  }

  .search-panel,
  .filter-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-grid,
  .movie-grid.six-col,
  .category-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .rank-strip,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 44px 74px 1fr;
  }

  .rank-cover img {
    width: 74px;
  }

  .heat-score {
    grid-column: 3;
    text-align: left;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 18px;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .movie-grid,
  .movie-grid.six-col,
  .category-page-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 38px 62px 1fr;
    gap: 10px;
  }

  .rank-info h2 {
    font-size: 18px;
  }

  .rank-info p,
  .rank-info .tag-row {
    display: none;
  }
}
