:root {
  --bg: #0f1419;
  --panel: rgba(26, 31, 38, 0.84);
  --panel-strong: #1a1f26;
  --text: #ffffff;
  --muted: #a8b0bc;
  --soft: #dbe2ee;
  --line: rgba(255, 255, 255, 0.10);
  --mystery: #9333ea;
  --mystery-soft: #c084fc;
  --crimson: #dc2626;
  --gold: #f59e0b;
  --radius: 22px;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(147, 51, 234, 0.23), transparent 34rem),
    radial-gradient(circle at 85% 0%, rgba(220, 38, 38, 0.20), transparent 32rem),
    linear-gradient(180deg, #0f1419 0%, #121721 50%, #0b0f14 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 72%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(22px);
  background: rgba(15, 20, 25, 0.82);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  width: min(1280px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--mystery), var(--crimson));
  box-shadow: 0 0 24px rgba(147, 51, 234, 0.45);
}

.logo__text {
  font-size: 19px;
}

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

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active,
.footer-links a:hover {
  color: #ffffff;
}

.desktop-nav a:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(26, 31, 38, 0.96);
  flex-wrap: wrap;
}

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

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

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

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

.hero-slide__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.1) contrast(1.04);
}

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15,20,25,0.98) 0%, rgba(15,20,25,0.72) 42%, rgba(15,20,25,0.18) 100%),
    linear-gradient(0deg, rgba(15,20,25,1) 0%, rgba(15,20,25,0.36) 44%, rgba(15,20,25,0.10) 100%);
}

.hero-slide__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.hero-slide__copy {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 168px;
}

.hero-tags,
.movie-card__meta,
.detail-meta,
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.hero-tags span,
.detail-meta span,
.movie-card__meta span,
.breadcrumb a,
.breadcrumb span {
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}

.hero h1 {
  max-width: 820px;
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.9;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #dcc9ff;
  background: rgba(147, 51, 234, 0.14);
  border: 1px solid rgba(192, 132, 252, 0.22);
  font-size: 12px;
}

.tag-row--hero {
  margin-top: 22px;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.hot-entry,
.section-more,
.play-button,
.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.play-button,
.search-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--mystery), var(--crimson));
  box-shadow: 0 16px 34px rgba(147, 51, 234, 0.32);
}

.ghost-btn,
.hot-entry,
.section-more {
  color: #fff;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.hot-entry:hover,
.section-more:hover,
.play-button:hover,
.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0,0,0,0.28), 0 0 24px rgba(147,51,234,0.28);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(15,20,25,0.45);
  backdrop-filter: blur(10px);
  font-size: 36px;
  line-height: 1;
}

.hero-control--prev {
  left: 28px;
}

.hero-control--next {
  right: 28px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 104px;
  z-index: 8;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
}

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

.hero-previews {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 8;
  width: min(960px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.hero-preview {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(15, 20, 25, 0.54);
  backdrop-filter: blur(14px);
  color: var(--muted);
}

.hero-preview.is-active {
  color: #fff;
  border-color: rgba(192, 132, 252, 0.56);
  background: rgba(147, 51, 234, 0.20);
}

.hero-preview img {
  width: 50px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
}

.hero-preview span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

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

.content-section {
  padding: 56px 0 10px;
}

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

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--mystery-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-head h2,
.page-title-row h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title-row p,
.detail-copy p,
.prose p {
  color: var(--muted);
  line-height: 1.88;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
  box-shadow: 0 14px 34px rgba(0,0,0,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(192, 132, 252, 0.42);
  box-shadow: var(--shadow), 0 0 20px rgba(147, 51, 234, 0.18);
}

.movie-card__poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #161b22;
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-card__poster img {
  transform: scale(1.08);
  opacity: 0.84;
}

.movie-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.86);
  box-shadow: 0 0 32px rgba(147, 51, 234, 0.50);
  color: #fff;
  font-weight: 800;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.movie-card__body {
  padding: 14px;
}

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

.movie-card__body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

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

.category-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 10% 15%, rgba(147, 51, 234, 0.22), transparent 48%),
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  box-shadow: 0 14px 34px rgba(0,0,0,0.18);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.category-card__thumbs {
  display: flex;
  margin-top: 18px;
}

.category-card__thumbs img {
  width: 52px;
  height: 70px;
  margin-right: -12px;
  border: 2px solid rgba(15,20,25,0.90);
  border-radius: 12px;
  object-fit: cover;
  background: #161b22;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
}

.rank-panel,
.search-panel,
.detail-panel,
.prose,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0,0,0,0.20);
}

.rank-panel {
  padding: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 11px;
  border-radius: 16px;
  color: var(--soft);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(255,255,255,0.07);
  transform: translateX(4px);
}

.rank-row img {
  width: 72px;
  height: 94px;
  border-radius: 12px;
  object-fit: cover;
  background: #161b22;
}

.rank-number,
.rank-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--mystery), var(--crimson));
  color: #fff;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
}

.rank-row__text strong,
.rank-row__text em {
  display: block;
}

.rank-row__text em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
}

.heat {
  color: var(--gold);
  font-weight: 800;
}

.search-panel {
  padding: 18px;
  margin-bottom: 24px;
}

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

.search-form input,
.search-form select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  outline: none;
}

.search-form option {
  color: #111;
}

.page-hero {
  padding: 52px 0 24px;
}

.page-title-row {
  align-items: center;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 28px;
  padding: 44px 0 28px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: #161b22;
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy {
  align-self: center;
}

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(34px, 5vw, 62px);
}

.detail-copy .intro {
  color: var(--soft);
  font-size: 18px;
}

.player-card {
  position: relative;
  overflow: hidden;
  margin: 22px 0 28px;
  background: #03060a;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #03060a;
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(147,51,234,0.18), transparent 42%),
    linear-gradient(180deg, rgba(0,0,0,0.20), rgba(0,0,0,0.58));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-shell.is-playing .video-overlay {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  min-height: 58px;
  padding: 0 28px;
  font-size: 17px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
}

.prose {
  padding: 24px;
}

.prose h2,
.rank-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.prose p + h2 {
  margin-top: 28px;
}

.prose p {
  margin: 0 0 14px;
}

.related-list {
  display: grid;
  gap: 10px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(15,20,25,0.72);
}

.site-footer__inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: var(--muted);
}

.footer-logo {
  color: #fff;
}

.site-footer p {
  max-width: 460px;
  margin: 0;
  line-height: 1.8;
  font-size: 13px;
}

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

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

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

@media (max-width: 860px) {
  .hero {
    min-height: 720px;
  }

  .hero-slide__copy {
    padding-bottom: 228px;
  }

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

  .hero-control {
    display: none;
  }

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

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

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

  .site-footer__inner,
  .section-head,
  .page-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-header__inner,
  main,
  .page-main,
  .site-footer__inner {
    width: min(100% - 24px, 1280px);
  }

  .logo__text {
    font-size: 16px;
  }

  .hero-slide__copy {
    width: min(100% - 24px, 760px);
  }

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

  .rank-row {
    grid-template-columns: 34px 58px 1fr;
  }

  .rank-row .heat {
    display: none;
  }
}
