:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c33;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.16);
  --cyan: #67e8f9;
  --gold: #facc15;
  --shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.2), transparent 28rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.16), transparent 32rem),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

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

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #dbeafe, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-logo::before,
.footer-logo::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.9);
}

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

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

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.65s ease;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-content {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0 110px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-lead {
  max-width: 660px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags {
  margin: 28px 0 0;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.24);
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
}

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

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

.hero-toolbar {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  width: min(var(--max), calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-dots,
.hero-arrows {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dots button,
.hero-arrows button {
  border: 0;
  color: white;
  cursor: pointer;
}

.hero-dots button {
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.active {
  background: var(--blue);
}

.hero-arrows button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--line);
  font-size: 28px;
  line-height: 1;
}

.section {
  padding: 56px 0;
}

.page-main {
  padding: 38px 0 70px;
}

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.28));
  box-shadow: var(--shadow);
}

.intro-strip h2,
.section-head h2,
.rank-panel h2,
.page-title-block h1,
.text-section h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.intro-strip h2,
.section-head h2,
.rank-panel h2,
.text-section h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.intro-strip p,
.page-title-block p,
.text-section p {
  color: #cbd5e1;
  line-height: 1.9;
}

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

.section-head a {
  color: #93c5fd;
  font-weight: 700;
}

.compact-head {
  align-items: center;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 12px;
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.search-box span {
  color: var(--blue);
  font-weight: 800;
}

.search-box input,
.filter-select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.filter-select {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.filter-select option {
  color: #0f172a;
}

.empty-state {
  margin: 20px 0;
  padding: 24px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted);
  text-align: center;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.52);
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.18);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.8), transparent 55%);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.9);
  color: #ffffff;
  font-size: 14px;
}

.card-body {
  padding: 14px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: #93c5fd;
  font-size: 12px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.card-title a:hover,
.ranking-info h2 a:hover {
  color: #93c5fd;
}

.card-desc {
  min-height: 44px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  color: #bfdbfe;
  font-size: 11px;
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.55);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  color: #cbd5e1;
  line-height: 1.6;
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.7));
  box-shadow: var(--shadow);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rank-row:hover {
  background: rgba(59, 130, 246, 0.16);
}

.rank-row b {
  grid-row: span 2;
  color: var(--gold);
  font-size: 20px;
}

.rank-row span {
  font-weight: 800;
}

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

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

.breadcrumb a {
  color: #93c5fd;
}

.page-title-block {
  margin-bottom: 28px;
  padding: 34px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 58, 138, 0.28));
  border: 1px solid var(--line);
}

.page-title-block h1 {
  font-size: clamp(34px, 5vw, 60px);
}

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

.category-card-large {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card-large a {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 190px;
}

.category-card-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-large div {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.category-card-large h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
}

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

.category-card-large span {
  color: #93c5fd;
  font-weight: 800;
}

.ranking-list-page {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
}

.ranking-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
}

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

.ranking-poster b {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f172a;
  background: var(--gold);
}

.ranking-info h2 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 900;
}

.ranking-info p {
  margin: 0 0 16px;
  color: #cbd5e1;
  line-height: 1.8;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: end;
  padding: 34px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 138, 0.28)),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.24), transparent 26rem);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  aspect-ratio: 2 / 3;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.detail-lead {
  margin: 22px 0;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.85;
}

.detail-meta {
  margin-bottom: 18px;
}

.large-tags span {
  font-size: 12px;
}

.player-section,
.text-section,
.related-section {
  margin-top: 34px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 3;
}

.play-layer span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.46);
  font-size: 30px;
  padding-left: 5px;
}

.video-frame.is-playing .play-layer {
  opacity: 0;
  pointer-events: none;
}

.text-section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.text-section h2 {
  margin-bottom: 16px;
}

.text-section p {
  margin: 0;
  font-size: 17px;
}

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

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

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

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

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

  .rank-panel {
    position: static;
  }
}

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

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

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

  .hero-slider {
    min-height: 650px;
  }

  .hero-content {
    padding-top: 70px;
  }

  .intro-strip,
  .section-head,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .movie-grid,
  .home-grid,
  .latest-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .category-card-large a,
  .detail-hero,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .category-card-large img {
    height: 220px;
  }

  .detail-hero {
    padding: 22px;
  }

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

@media (max-width: 540px) {
  .header-inner {
    height: 64px;
  }

  .site-logo {
    font-size: 18px;
  }

  .hero-content h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-lead,
  .detail-lead {
    font-size: 16px;
  }

  .movie-grid,
  .home-grid,
  .latest-grid,
  .related-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

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

  .page-title-block,
  .intro-strip,
  .text-section {
    padding: 22px;
  }

  .hero-toolbar {
    align-items: flex-end;
  }

  .hero-arrows {
    display: none;
  }
}
