:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f1f5f9;
  --white: #ffffff;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --deep: #020617;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #ecfeff 100%);
}

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

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

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 21px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  font-size: 16px;
}

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

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover {
  background: var(--soft);
  color: var(--blue);
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
  background-position: center;
  background-size: cover;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18)), radial-gradient(circle at 70% 25%, rgba(6, 182, 212, 0.35), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: center;
}

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

.kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 660px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 19px;
  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-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  color: #e0f2fe;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
}

.btn.ghost {
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-panel {
  position: relative;
  z-index: 2;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.46);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(20px);
}

.hero-panel h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

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

.hero-mini-list a {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  transition: 0.2s ease;
}

.hero-mini-list a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(3px);
}

.hero-mini-list img {
  width: 68px;
  height: 86px;
  object-fit: cover;
  border-radius: 14px;
}

.hero-mini-list strong {
  display: block;
  margin-bottom: 4px;
}

.hero-mini-list em {
  display: block;
  color: #bfdbfe;
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.active {
  background: #67e8f9;
}

.section {
  margin: 54px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  height: 310px;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.compact .poster {
  height: 255px;
}

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

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

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

.rating,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.rating {
  right: 12px;
  bottom: 12px;
  background: rgba(14, 165, 233, 0.88);
}

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

.card-body {
  padding: 17px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 9px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.card-meta a {
  color: var(--blue);
}

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

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

.card-body p {
  margin: 10px 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.tag-row span,
.detail-tags span {
  color: #2563eb;
  background: #eff6ff;
  border-color: #dbeafe;
}

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

.category-card {
  display: block;
  padding: 24px;
  min-height: 180px;
  border-radius: 26px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(135deg, #fff, #eff6ff);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
  transition: 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card span {
  display: inline-flex;
  margin-bottom: 16px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

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

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

.rank-list {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 88px;
}

.rank-item {
  display: grid;
  grid-template-columns: 36px 70px 1fr 48px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.rank-item img {
  width: 70px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

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

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

.rank-item b {
  color: var(--blue);
}

.mini-rank {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.page-hero {
  margin: 34px 0 30px;
  padding: clamp(30px, 6vw, 58px);
  border-radius: 34px;
  color: #fff;
  background: radial-gradient(circle at 78% 18%, rgba(6, 182, 212, 0.42), transparent 35%), linear-gradient(135deg, #0f172a, #1e3a8a 56%, #0891b2);
  box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero p {
  color: #fff;
}

.page-hero p {
  max-width: 780px;
  color: #dbeafe;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  padding: 16px;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.search-box,
.select-box {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  color: #0f172a;
  font: inherit;
  background: #fff;
  outline: none;
}

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

.detail-hero {
  margin: 34px 0;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumbs a {
  color: var(--blue);
}

.detail-title h1 {
  margin-bottom: 16px;
}

.detail-title p {
  margin: 0 0 20px;
  color: #475569;
  font-size: 18px;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.detail-meta span {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 13px;
  color: #1e40af;
  background: #dbeafe;
  font-weight: 800;
}

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

.player-card,
.content-card {
  overflow: hidden;
  margin: 34px 0;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.player-shell {
  position: relative;
  background: #020617;
}

.player-shell video {
  width: 100%;
  min-height: 320px;
  max-height: 74vh;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.72));
}

.player-shell.is-playing .play-layer {
  display: none;
}

.play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 32px;
  padding-left: 6px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
}

.player-caption {
  padding: 22px 24px;
}

.player-caption h2 {
  margin: 0 0 8px;
}

.player-caption p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.content-card {
  padding: 30px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 17px;
  line-height: 2;
}

.empty-tip {
  display: none;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.empty-tip.show {
  display: block;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-grid h3 {
  margin: 0 0 16px;
  color: #67e8f9;
}

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

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #94a3b8;
}

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

.footer-bottom {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

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

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

  .hero-panel {
    display: none;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

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

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .movie-grid,
  .movie-grid.wide,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .poster,
  .movie-card.compact .poster {
    height: 360px;
  }

  .rank-item {
    grid-template-columns: 32px 62px 1fr;
  }

  .rank-item b {
    display: none;
  }

  .detail-cover {
    max-width: 420px;
  }
}
