:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-soft: #0b1020;
  --panel: rgba(18, 25, 43, 0.78);
  --panel-strong: rgba(19, 28, 50, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --violet: #7c3aed;
  --gold: #fbbf24;
  --radius: 22px;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.30), transparent 32rem),
    radial-gradient(circle at 90% 18%, rgba(124, 58, 237, 0.24), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.65;
}

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

img {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(124, 58, 237, 0.18));
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(18px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.36);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: 0.22s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: white;
  background: rgba(37, 99, 235, 0.22);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: white;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: white;
  border-radius: 99px;
}

.hero {
  position: relative;
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.hero-stage {
  position: relative;
  height: min(76vh, 760px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.62fr);
  gap: 42px;
  align-items: center;
  padding: clamp(30px, 5vw, 76px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.015);
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.80) 48%, rgba(2, 6, 23, 0.50)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12)),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.05);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(37, 99, 235, 0.35), transparent 24rem),
    radial-gradient(circle at 70% 60%, rgba(34, 211, 238, 0.22), transparent 18rem);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.13);
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 760px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: clamp(16px, 1.6vw, 22px);
}

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

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

.hero-tags span,
.tag-list span,
.detail-tags span {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.36);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

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

.hero-poster {
  position: relative;
  z-index: 2;
  align-self: center;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  height: min(62vh, 560px);
  object-fit: cover;
}

.hero-control {
  position: absolute;
  right: 32px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(14px);
}

.hero-control button {
  border: 0;
  color: white;
  cursor: pointer;
}

.hero-control > button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 24px;
  line-height: 1;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
  width: 24px;
  border-radius: 99px;
  background: white;
}

.hero-search-panel {
  position: relative;
  z-index: 8;
  width: min(1040px, calc(100% - 34px));
  margin: -42px auto 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero-search-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.hero-search-panel strong {
  display: block;
  font-size: 20px;
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-box input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  outline: 0;
  padding: 0 18px;
  background: rgba(2, 6, 23, 0.64);
  color: white;
}

.search-box input:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
}

.search-box button {
  min-width: 92px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #bfdbfe;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  transition: 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.45);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  font-size: 13px;
}

.card-body h3,
.ranking-body h2 {
  margin: 8px 0 7px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.ranking-body h2 a:hover {
  color: #93c5fd;
}

.card-body p,
.ranking-body p {
  display: -webkit-box;
  min-height: 3.3em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 0%, rgba(34, 211, 238, 0.18), transparent 70%),
    rgba(15, 23, 42, 0.78);
  transition: 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-card span {
  color: var(--cyan);
  font-weight: 900;
}

.category-card strong {
  display: block;
  margin-top: 18px;
  font-size: 22px;
}

.category-card em {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.80);
}

.ranking-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ranking-title h2 {
  margin: 0;
  font-size: 24px;
}

.ranking-title a {
  color: #93c5fd;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 40px 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

.rank-row:hover {
  background: rgba(37, 99, 235, 0.14);
}

.rank-index {
  color: var(--gold);
  font-weight: 900;
}

.rank-row img {
  width: 58px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-row b {
  color: #bfdbfe;
}

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

.page-hero {
  margin-top: 28px;
  padding: clamp(34px, 5vw, 74px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 32px;
  background:
    radial-gradient(circle at 75% 12%, rgba(34, 211, 238, 0.20), transparent 22rem),
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.28), transparent 24rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 26px;
  color: #cbd5e1;
  font-size: 18px;
}

.small-hero .search-box,
.ranking-hero .search-box {
  max-width: 720px;
}

.ranking-page-list {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-poster img {
  height: 170px;
  object-fit: cover;
}

.ranking-poster span {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--gold);
  font-weight: 900;
}

.ranking-body {
  align-self: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 28px 0 18px;
  color: var(--muted);
}

.breadcrumb a {
  color: #bfdbfe;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.35), transparent 20rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
  color: white;
  cursor: pointer;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.45);
  position: relative;
}

.play-circle::after {
  content: "";
  position: absolute;
  left: 32px;
  top: 23px;
  width: 0;
  height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 23px solid white;
}

.play-cover strong {
  font-size: 24px;
}

.play-cover em {
  color: #cbd5e1;
  font-style: normal;
}

.detail-article,
.side-box {
  margin-top: 22px;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-tags {
  margin-bottom: 18px;
}

.detail-article h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-lead {
  margin: 18px 0 28px;
  color: #dbeafe;
  font-size: 20px;
}

.detail-article h2,
.side-box h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.side-box h2:first-child {
  margin-top: 0;
}

.detail-article p {
  color: #cbd5e1;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.detail-poster {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.32);
}

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

.side-box dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.side-box dt {
  color: var(--muted);
}

.side-box dd {
  margin: 0;
  color: #e2e8f0;
}

.side-box a {
  color: #93c5fd;
}

.side-tags {
  margin-top: 4px;
}

.side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.side-actions a {
  text-align: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.20);
  color: #bfdbfe;
  font-weight: 800;
}

.related-section {
  padding-bottom: 72px;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.74);
}

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

.footer-logo {
  color: var(--text);
}

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

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

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

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

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

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

  .ranking-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .hero-stage {
    min-height: 680px;
    height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px;
  }

  .hero-poster {
    max-width: 230px;
    transform: none;
  }

  .hero-poster img {
    height: auto;
  }

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

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    min-height: 46px;
  }

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

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

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

@media (max-width: 560px) {
  .nav-wrap,
  .hero,
  .content-section,
  .page-main,
  .detail-main,
  .footer-inner {
    width: min(100% - 22px, 1240px);
  }

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

  .hero-stage,
  .page-hero,
  .player-shell,
  .detail-article,
  .side-box {
    border-radius: 20px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

  .hero-control {
    left: 20px;
    right: auto;
  }

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

  .ranking-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .ranking-poster img {
    height: 126px;
  }

  .rank-row {
    grid-template-columns: 34px 50px minmax(0, 1fr);
  }

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