:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #38bdf8;
  --cyan: #22d3ee;
  --purple: #8b5cf6;
  --orange: #f97316;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% -12%, rgba(34, 211, 238, 0.2), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(59, 130, 246, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

body.no-scroll {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 35px rgba(14, 165, 233, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 14px;
  color: #cbd5e1;
  transition: 0.22s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
}

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

.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.3), rgba(12, 74, 110, 0.36));
}

.hero-track {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 4s ease;
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.92)),
    linear-gradient(0deg, #020617 0%, transparent 40%);
}

.hero-content {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 48px;
  padding: 68px 0 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.18);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero h1 span,
.page-hero h1 span {
  background: linear-gradient(90deg, #60a5fa, #22d3ee, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 760px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.65);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.hero-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-panel h2,
.side-panel h2 {
  margin: 0 0 18px;
  font-size: 1.22rem;
}

.hero-feature {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  align-items: center;
}

.hero-feature img {
  aspect-ratio: 2 / 3;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.45);
}

.hero-feature h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.hero-feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.quick-search {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 620px;
}

.quick-search input,
.search-box input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 18px;
  color: white;
  background: rgba(15, 23, 42, 0.82);
  outline: none;
}

.quick-search input:focus,
.search-box input:focus {
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

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

.page-hero {
  margin: 34px auto 26px;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.16), transparent 22rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(2, 6, 23, 0.76));
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.section-block {
  margin: 56px 0;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card.is-hidden {
  display: none;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.82);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 50%);
  opacity: 0.72;
}

.play-dot,
.rank-badge {
  position: absolute;
  display: grid;
  place-items: center;
  color: white;
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.86);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.movie-info {
  padding: 15px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  font-size: 0.82rem;
}

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

.movie-info p {
  min-height: 4.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #bae6fd;
  font-size: 0.78rem;
  background: rgba(14, 116, 144, 0.18);
}

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

.category-card {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.66));
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.26);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.42);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.category-covers img {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.category-card strong {
  display: block;
  font-size: 1.1rem;
}

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

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: 28px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(56, 189, 248, 0.42);
}

.rank-item img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

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

.rank-item em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.rank-item b,
.num {
  color: #facc15;
}

.num {
  font-weight: 900;
  text-align: center;
}

.search-box {
  position: relative;
  margin: 26px 0;
}

.search-box input {
  min-height: 60px;
  padding-left: 22px;
  font-size: 1rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.66);
  cursor: pointer;
}

.filter-chip.is-active {
  color: white;
  border-color: rgba(56, 189, 248, 0.62);
  background: rgba(37, 99, 235, 0.56);
}

.detail-hero {
  margin: 34px 0 36px;
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 48%);
}

.detail-title {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 88% 0%, rgba(14, 165, 233, 0.18), transparent 20rem),
    rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #93c5fd;
  font-size: 0.92rem;
}

.detail-title p {
  margin: 20px 0 0;
  color: #cbd5e1;
  line-height: 1.82;
  font-size: 1.04rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.22);
}

.player-section {
  margin: 40px 0;
  border: 1px solid var(--line);
  border-radius: 32px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.32));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 20px 50px rgba(14, 165, 233, 0.35);
  cursor: pointer;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  margin-bottom: 60px;
}

.article-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.25);
}

.article-panel h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.article-panel p {
  margin: 0 0 24px;
  color: #cbd5e1;
  line-height: 1.9;
}

.side-panel .rank-list {
  gap: 10px;
}

.side-panel .rank-item {
  grid-template-columns: 44px 1fr;
}

.side-panel .rank-item img,
.side-panel .rank-item b {
  display: none;
}

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

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

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

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

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

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

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

  .menu-button {
    display: block;
  }

  .mobile-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    display: none;
    flex-direction: column;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 54px 0;
  }

  .hero-feature {
    grid-template-columns: 96px 1fr;
  }

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

  .page-hero,
  .detail-title,
  .article-panel,
  .side-panel {
    padding: 24px;
    border-radius: 24px;
  }

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

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

  .rank-item {
    grid-template-columns: 40px 48px 1fr;
  }

  .rank-item b {
    display: none;
  }

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