:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --line: rgba(34, 211, 238, 0.20);
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #e5f3ff;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --purple: #a855f7;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 8, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 30rem),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 35px rgba(34, 211, 238, 0.35);
}

.brand-text,
.footer-brand {
  font-size: 21px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-links a {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.12);
  transform: translateY(-1px);
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 8px;
}

main {
  padding-top: 68px;
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  display: grid;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.18;
  pointer-events: none;
}

.hero::before {
  left: -10rem;
  top: 5rem;
  background: var(--cyan);
}

.hero::after {
  right: -8rem;
  bottom: -8rem;
  background: var(--purple);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.82) 40%, rgba(2, 6, 23, 0.62)),
    linear-gradient(180deg, rgba(14, 165, 233, 0.16), rgba(2, 6, 23, 0.96)),
    var(--poster-image) center / cover no-repeat;
}

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

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.62fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  padding: 84px 0 62px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  border: 1px solid var(--line);
  background: rgba(34, 211, 238, 0.08);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 950;
  background: linear-gradient(90deg, #ffffff, var(--cyan), #93c5fd, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p,
.page-hero p {
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.8;
  margin: 0 0 28px;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.btn.ghost {
  color: #dbeafe;
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.55);
}

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

.hero-poster-card {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.74));
  box-shadow: var(--shadow);
}

.hero-poster-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(2, 6, 23, 0.96));
  z-index: 1;
}

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

.poster-caption {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 22px;
}

.poster-caption strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.poster-caption span {
  color: #cbd5e1;
  font-size: 14px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(203, 213, 225, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--cyan);
}

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

.section-block {
  margin-bottom: 64px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 900;
}

.section-subtitle {
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.7;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.88));
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 22px 60px rgba(34, 211, 238, 0.12);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.96));
}

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

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
}

img.image-missing {
  opacity: 0;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.32);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), #fb923c);
  box-shadow: 0 10px 24px rgba(250, 204, 21, 0.28);
}

.movie-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  min-height: 192px;
}

.movie-info strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-line {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.movie-tags span,
.detail-tags span {
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, 0.18);
  background: rgba(34, 211, 238, 0.08);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.72));
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.62);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.48));
}

.category-card h2,
.category-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
}

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

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

.category-thumbs img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

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

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

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.55);
}

.rank-item img {
  width: 74px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.rank-num {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-item strong {
  display: block;
  color: #ffffff;
  margin-bottom: 5px;
}

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

.page-hero {
  position: relative;
  padding: 90px 0 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
}

.page-hero-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 880px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  margin-bottom: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
}

.filter-search input,
.filter-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.62);
  outline: none;
}

.filter-search input {
  padding: 0 18px;
}

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

.filter-controls select {
  padding: 0 34px 0 14px;
}

.filter-search input:focus,
.filter-controls select:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

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

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

.breadcrumb a {
  color: #a5f3fc;
}

.detail-title {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.12;
  font-weight: 950;
  color: #ffffff;
}

.detail-intro {
  color: #cbd5e1;
  line-height: 1.85;
  font-size: 18px;
  margin: 0 0 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span {
  color: #dbeafe;
  border: 1px solid var(--line-soft);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72)),
    radial-gradient(circle at center, rgba(34, 211, 238, 0.16), transparent 22rem);
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover span {
  width: 82px;
  height: 82px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 6px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.42);
}

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

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

.article-panel,
.side-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.22);
}

.article-panel {
  margin-top: 26px;
  padding: clamp(22px, 4vw, 34px);
}

.article-panel h2,
.side-panel h2 {
  color: #ffffff;
  margin: 0 0 14px;
  font-size: 24px;
}

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

.side-panel {
  padding: 18px;
  position: sticky;
  top: 88px;
}

.detail-poster {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.9);
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
  padding: 42px 0 22px;
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 34px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  font-size: 18px;
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-tags {
  flex-direction: row;
  flex-wrap: wrap;
}

.footer-tags a {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 10px;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

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

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

  .side-panel {
    position: static;
  }
}

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

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

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

  .nav-links a {
    border-radius: 14px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 72px;
  }

  .hero-poster-card {
    max-width: 320px;
    margin: 0 auto;
  }

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

  .filter-controls {
    flex-direction: column;
  }

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

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

@media (max-width: 640px) {
  .content-wrap {
    width: min(100% - 24px, 1240px);
    padding: 38px 0;
  }

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

  .movie-info {
    min-height: 180px;
    padding: 13px;
  }

  .movie-info strong {
    font-size: 15px;
  }

  .movie-line {
    -webkit-line-clamp: 2;
  }

  .rank-item {
    grid-template-columns: 36px 60px 1fr;
  }

  .rank-item img {
    width: 60px;
  }

  .detail-title {
    font-size: 32px;
  }

  .play-cover span {
    width: 68px;
    height: 68px;
  }
}
