:root {
  color-scheme: light;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --sky: #e0f2fe;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 46%, #ecfeff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  width: min(1180px, 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: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

.brand-mark.small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.brand-text {
  font-size: 21px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 700;
  color: #334155;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #0f172a;
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 28px auto 42px;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 44px;
  padding: 68px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.54;
}

.hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.45), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.76) 48%, rgba(15, 23, 42, 0.42) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #0369a1;
  background: rgba(224, 242, 254, 0.92);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

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

.hero-content p,
.page-hero p,
.detail-content p {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.hero-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero-actions,
.quick-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.quick-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.25s ease;
}

.btn.primary,
.quick-panel a {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.3);
}

.btn.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.btn:hover,
.quick-panel a:hover,
.movie-card:hover,
.category-tile:hover,
.category-overview:hover {
  transform: translateY(-4px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 68px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.quick-panel,
.page-section,
.page-hero,
.detail-hero,
.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 44px;
}

.quick-panel {
  justify-content: center;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.page-section {
  padding: 28px 0;
}

.page-section.soft {
  width: 100%;
  padding: 52px max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(207, 250, 254, 0.86));
}

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

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

.section-heading a {
  color: var(--blue);
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 44px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 0 13px;
  outline: none;
  color: #0f172a;
  background: #fff;
  font: inherit;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

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

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

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

.movie-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #bfdbfe, #cffafe);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.55));
}

.duration,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.duration {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
}

.card-desc {
  min-height: 45px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.card-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.card-meta span,
.card-tags em,
.tag-cloud span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-style: normal;
  font-weight: 800;
}

.card-tags em:last-child {
  color: #0891b2;
  background: #ecfeff;
}

.horizontal-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 290px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}

.horizontal-list .movie-card {
  scroll-snap-align: start;
}

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

.category-tile,
.category-overview {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.category-tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.category-tile span,
.category-overview {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.category-tile strong,
.category-overview strong {
  font-size: 18px;
}

.category-tile em,
.category-overview em {
  color: #64748b;
  font-style: normal;
  font-size: 14px;
  line-height: 1.55;
}

.mini-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.mini-covers img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-split {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
}

.ranking-split.top-align {
  align-items: start;
}

.ranking-list,
.rank-detail-list,
.intro-card,
.side-card,
.movie-article {
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.ranking-list {
  padding: 10px;
}

.ranking-row,
.rank-detail-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
}

.ranking-row:hover,
.rank-detail-row:hover {
  background: #eff6ff;
}

.ranking-row span,
.rank-detail-row span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.ranking-row strong,
.rank-detail-row strong {
  font-size: 16px;
}

.ranking-row em,
.rank-detail-row em {
  grid-column: 2;
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

.rank-detail-row {
  grid-template-columns: 42px 72px 1fr;
}

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

.rank-detail-row em {
  grid-column: 3;
}

.intro-card {
  padding: 30px;
  align-self: stretch;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(6, 182, 212, 0.92));
  color: #fff;
}

.intro-card p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  padding: 58px;
  border-radius: 32px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 50%, #0891b2);
  box-shadow: var(--shadow);
}

.page-hero.compact-hero {
  padding-block: 44px;
}

.detail-hero {
  min-height: 440px;
  display: grid;
  align-items: end;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.05);
  opacity: 0.6;
}

.detail-content {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.breadcrumb a {
  color: #bae6fd;
}

.breadcrumb em {
  font-style: normal;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.player-section {
  margin-top: -20px;
  position: relative;
  z-index: 2;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.26);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.55));
  cursor: pointer;
  transition: 0.25s ease;
}

.play-layer span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.36);
}

.play-layer.is-hidden {
  opacity: 0;
  pointer-events: none;
}

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

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

.movie-article h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.movie-article p {
  color: #334155;
  line-height: 1.9;
  font-size: 16px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.info-list dt {
  color: #64748b;
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: #0f172a;
}

.side-grid {
  display: grid;
  gap: 16px;
}

.movie-card.compact .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

.site-footer {
  margin-top: 60px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #67e8f9;
}

.site-footer p {
  max-width: 360px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 10px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #fff;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 35;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 980px) {
  .hero-carousel {
    min-height: 740px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 40px;
  }

  .hero-poster {
    width: min(280px, 70%);
  }

  .movie-grid,
  .movie-grid.wide,
  .movie-grid.single,
  .category-grid,
  .category-overview-grid,
  .ranking-split,
  .detail-layout,
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 10px;
  }

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

  .nav-link {
    width: 100%;
  }

  .hero-carousel {
    width: min(100% - 24px, 1180px);
    min-height: 700px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 28px;
    gap: 24px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-content h1 {
    font-size: 36px;
  }

  .hero-content p,
  .page-hero p,
  .detail-content p {
    font-size: 16px;
  }

  .hero-dots {
    left: 28px;
    bottom: 22px;
  }

  .page-hero,
  .detail-hero {
    padding: 34px 24px;
    border-radius: 24px;
  }

  .filter-bar,
  .movie-grid,
  .movie-grid.wide,
  .movie-grid.single,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .rank-detail-row {
    grid-template-columns: 34px 62px 1fr;
  }

  .rank-detail-row img {
    width: 62px;
    height: 48px;
  }

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