* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --cyan: #22d3ee;
  --blue: #2563eb;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner,
.footer-inner,
.content-section,
.sub-hero,
.detail-hero,
.quick-strip {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.22);
}

.brand-text,
.footer-brand {
  font-size: 1.35rem;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--cyan);
}

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

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

.mobile-nav {
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.86) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 56%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.sub-hero h1,
.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.3rem, 5.2vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.sub-hero p,
.detail-line {
  color: #cbd5e1;
  line-height: 1.85;
  font-size: 1.08rem;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.22);
  color: #cffafe;
  background: var(--cyan-soft);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.82rem;
  line-height: 1;
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.25);
}

.ghost-btn,
.section-more {
  color: #e0f2fe;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.66);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.14);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 50%;
  color: white;
  background: rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 2rem;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.45);
  cursor: pointer;
}

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

.quick-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: -34px;
  position: relative;
  z-index: 8;
}

.quick-strip a {
  display: grid;
  place-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  color: #e2e8f0;
  font-weight: 800;
}

.content-section {
  padding: 72px 0 0;
}

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

.section-head h2,
.text-panel h2,
.category-overview-card h2 {
  margin: 8px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -0.04em;
}

.compact-head {
  margin-bottom: 18px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 20px 60px 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.45);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.38);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.quality-badge,
.rank-badge,
.year-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
}

.quality-badge {
  right: 12px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.rank-badge {
  left: 12px;
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid rgba(226, 232, 240, 0.22);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.category-overview-card h2 a:hover {
  color: var(--cyan);
}

.movie-meta,
.movie-line {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.9rem;
}

.mini-tags {
  margin-top: 12px;
}

.mini-tags .tag {
  font-size: 0.72rem;
  padding: 5px 8px;
}

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

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

.category-card {
  position: relative;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 18px;
  background: #0f172a;
}

.category-card img,
.category-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-card img {
  object-fit: cover;
  opacity: 0.66;
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.07);
}

.category-overlay {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.22));
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 1.15rem;
}

.category-card em {
  margin-top: 6px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 0.86rem;
}

.rank-panel {
  position: sticky;
  top: 94px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  padding: 20px;
  box-shadow: var(--shadow);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 36px 54px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 8px;
  background: rgba(2, 6, 23, 0.34);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.22);
}

.rank-number {
  color: var(--cyan);
  font-weight: 900;
}

.rank-row img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

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

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

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

.rank-arrow {
  color: var(--muted);
  font-size: 1.5rem;
}

.sub-hero {
  padding: 82px 0 24px;
}

.sub-hero p {
  max-width: 780px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  padding: 16px;
  box-shadow: var(--shadow);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  padding: 14px;
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.search-box input,
.select-box select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.74);
  min-height: 48px;
  padding: 0 14px;
  outline: none;
}

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

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

.ranking-grid .movie-card:nth-child(-n + 3) {
  border-color: rgba(34, 211, 238, 0.42);
}

.narrow-section {
  max-width: 980px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 30px;
  align-items: center;
  padding: 56px 0 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.55);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.38);
  font-size: 1.8rem;
  text-indent: 4px;
}

.player-overlay strong {
  font-size: 1.15rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.detail-copy {
  padding: 8px 0;
}

.detail-copy h1 {
  font-size: clamp(2.2rem, 4vw, 4.1rem);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.detail-meta div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.62);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.detail-meta dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.text-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  padding: clamp(22px, 4vw, 38px);
  box-shadow: var(--shadow);
}

.text-panel p {
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 1.02rem;
}

.text-panel h2 + p {
  margin-top: 12px;
}

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

.compact-card .movie-line,
.compact-card .mini-tags {
  display: none;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 34px 0;
}

.footer-inner p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  color: #cbd5e1;
}

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

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

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

  .rank-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 580px;
  }

  .hero-content {
    justify-content: end;
    padding-bottom: 86px;
  }

  .hero-control {
    display: none;
  }

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

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

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

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .content-section,
  .sub-hero,
  .detail-hero,
  .quick-strip {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 1.08rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero {
    height: 540px;
  }

  .hero h1,
  .sub-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.045em;
  }

  .quick-strip,
  .movie-grid,
  .category-movie-grid,
  .category-grid,
  .related-grid,
  .large-rank-list,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

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