* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --line: rgba(8, 145, 178, 0.24);
  --line-strong: rgba(34, 211, 238, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #60a5fa;
  --gold: #facc15;
  --orange: #fb923c;
  --shadow: 0 24px 70px rgba(8, 47, 73, 0.32);
  --radius: 24px;
}

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 18% 5%, rgba(34, 211, 238, 0.20), transparent 28rem),
    radial-gradient(circle at 92% 8%, rgba(59, 130, 246, 0.18), transparent 26rem),
    linear-gradient(135deg, #020617 0%, #0b1730 44%, #06101f 100%);
}

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);
}

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.38);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  color: #cbd5e1;
  background: transparent;
  font-size: 1.6rem;
}

main {
  overflow: hidden;
}

.hero-slider {
  padding: 34px 20px 18px;
}

.hero-shell {
  position: relative;
  max-width: 1280px;
  min-height: 590px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.58);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.10)),
    radial-gradient(circle at 18% 26%, rgba(34, 211, 238, 0.28), transparent 24rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 590px;
  padding: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 54px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 1.08rem;
  line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.15);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  box-shadow: 0 15px 40px rgba(8, 145, 178, 0.32);
}

.ghost-btn {
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.62);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(1.5deg);
}

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

.hero-poster span,
.score-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(250, 204, 21, 0.92);
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: 34px;
  bottom: 30px;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
  font-size: 1.8rem;
  cursor: pointer;
}

.filter-panel,
.section-wrap,
.page-hero,
.detail-hero,
.player-section,
.detail-layout {
  width: min(1280px, calc(100% - 40px));
  margin: 28px auto 0;
}

.filter-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 16px 46px rgba(2, 6, 23, 0.26);
}

.filter-title {
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 1.1rem;
  font-weight: 900;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 800;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.64);
  padding: 0 13px;
  outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

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

.section-heading.compact {
  align-items: center;
}

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

.section-heading a {
  color: var(--cyan);
  font-weight: 900;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(8, 145, 178, 0.20);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow: 0 22px 56px rgba(8, 145, 178, 0.26);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.card-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.06);
  filter: saturate(1.12);
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(8, 145, 178, 0.84);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

.card-body p {
  min-height: 43px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 0.78rem;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 0.72rem;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #020617;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-weight: 900;
}

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

.category-tile {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 14rem),
    rgba(15, 23, 42, 0.70);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
}

.category-name {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
}

.category-intro {
  color: var(--muted);
  line-height: 1.7;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.82rem;
}

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

.ranking-panel,
.category-overview-block,
.detail-side,
.detail-article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 14px 38px rgba(2, 6, 23, 0.24);
}

.ranking-panel {
  align-self: start;
  padding: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.42);
}

.rank-row:hover {
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.15);
}

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

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.year-collection {
  display: grid;
  gap: 28px;
}

.year-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.30);
}

.page-hero {
  min-height: 290px;
  padding: 52px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  background:
    radial-gradient(circle at 18% 22%, rgba(34, 211, 238, 0.26), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.60));
  box-shadow: var(--shadow);
}

.compact-hero h1,
.ranking-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-block {
  padding: 24px;
}

.category-overview-block p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.8;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  padding: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 12%, rgba(34, 211, 238, 0.18), transparent 22rem),
    rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-poster span {
  position: absolute;
  right: 16px;
  top: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(250, 204, 21, 0.92);
  font-weight: 900;
}

.crumbs {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

.player-section {
  scroll-margin-top: 90px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(8, 145, 178, 0.24), rgba(2, 6, 23, 0.52));
  cursor: pointer;
}

.player-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  font-size: 2.1rem;
  box-shadow: 0 20px 60px rgba(8, 145, 178, 0.40);
}

.player-cover.is-hidden {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  color: var(--cyan);
}

.detail-article p {
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 1rem;
  line-height: 2;
}

.detail-side dl {
  margin: 0;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px 14px;
  color: #cbd5e1;
}

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

.detail-side dd {
  margin: 0;
}

.related-wrap {
  margin-bottom: 30px;
}

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

.footer-grid {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 1.3rem;
  font-weight: 900;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  padding: 18px 20px;
  border-top: 1px solid rgba(8, 145, 178, 0.18);
  color: #64748b;
  text-align: center;
}

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

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

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

  .hero-content {
    grid-template-columns: 1fr 240px;
    padding: 52px;
  }

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

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

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
  }

  .nav-menu.open {
    display: grid;
    gap: 12px;
  }

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

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.active {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 34px 24px 94px;
  }

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

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

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

  .category-grid,
  .footer-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 280px;
  }

  .page-hero {
    padding: 34px 24px;
  }
}

@media (max-width: 520px) {
  .filter-panel,
  .section-wrap,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-layout {
    width: min(100% - 24px, 1280px);
  }

  .hero-slider {
    padding: 18px 12px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.05em;
  }

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

  .movie-grid,
  .dense-grid,
  .small-grid,
  .mini-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

  .detail-hero {
    padding: 22px;
  }

  .detail-layout {
    gap: 14px;
  }

  .detail-article,
  .detail-side {
    padding: 20px;
  }
}
