:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(96, 165, 250, 0.20);
  --line-strong: rgba(125, 211, 252, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #60a5fa;
  --cyan: #22d3ee;
  --deep: #0f172a;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.26), transparent 30%),
    radial-gradient(circle at 85% 8%, rgba(6, 182, 212, 0.18), transparent 34%),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.86), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.24);
}

.header-inner,
.footer-inner,
.section,
.page-hero,
.detail-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #dbeafe, #67e8f9, #dbeafe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  font-size: 12px;
  color: rgba(191, 219, 254, 0.70);
  font-style: normal;
}

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

.nav-link,
.nav-dropdown button,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #dbeafe;
  font-size: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown:hover button,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(37, 99, 235, 0.32);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 180px;
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
}

.dropdown-panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--soft);
}

.dropdown-panel a:hover {
  background: rgba(37, 99, 235, 0.25);
  color: #fff;
}

.nav-dropdown:hover .dropdown-panel {
  display: block;
}

.mobile-toggle,
.mobile-nav {
  display: none;
}

.mobile-toggle {
  border: 0;
  color: #fff;
  background: rgba(37, 99, 235, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 20px;
}

.mobile-nav {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.92);
}

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

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid rgba(96, 165, 250, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.52fr);
  align-items: center;
  gap: 48px;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
  filter: blur(2px) saturate(1.15);
  opacity: 0.52;
}

.hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, #020617 84%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.18);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 10px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 4vw, 44px);
  color: #bfdbfe;
}

.hero-copy p,
.page-hero p,
.detail-one-line,
.section-heading p,
.category-tile p,
.category-block p,
.text-panel p {
  color: var(--soft);
  font-size: 16px;
}

.hero-copy p {
  max-width: 720px;
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #c4b5fd;
  border: 1px solid rgba(147, 197, 253, 0.22);
  background: rgba(15, 23, 42, 0.7);
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.primary-btn {
  min-height: 48px;
  padding: 0 22px;
  color: #08111f;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.28);
}

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

.ghost-btn {
  min-height: 48px;
  padding: 0 22px;
  color: #dbeafe;
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.62);
}

.ghost-btn:hover,
.text-link:hover {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.58);
}

.hero-poster,
.detail-poster,
.category-cover,
.rank-poster,
.poster {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 20%, rgba(96, 165, 250, 0.28), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: var(--shadow);
}

.hero-poster {
  border-radius: 30px;
  aspect-ratio: 3 / 4.15;
  transform: perspective(900px) rotateY(-6deg);
}

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

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

.hero-dots button {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  cursor: pointer;
}

.hero-dots button.active {
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
}

.section {
  padding: 74px 0;
}

.section.narrow,
.page-hero {
  max-width: 1040px;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2,
.category-block h2,
.text-panel h2,
.rank-info h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.text-link {
  min-height: 42px;
  padding: 0 16px;
  color: #7dd3fc;
  border: 1px solid rgba(125, 211, 252, 0.30);
}

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

.category-tile {
  min-height: 158px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.28), rgba(15, 23, 42, 0.78));
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.18);
  transition: 0.2s ease;
}

.category-tile span {
  font-size: 20px;
  font-weight: 800;
}

.category-tile p {
  margin: 0;
  font-size: 13px;
}

.category-tile:hover,
.movie-card:hover,
.category-block:hover,
.rank-row:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.52);
}

.highlight-panel {
  width: min(1220px, calc(100% - 32px));
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 64, 175, 0.18));
  padding: 40px;
  box-shadow: var(--shadow);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
}

.search-box span {
  color: #93c5fd;
  font-size: 14px;
  font-weight: 700;
}

.search-box input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font: inherit;
}

.filter-bar select {
  min-height: 52px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.92);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
  transition: 0.2s ease;
}

.poster {
  display: block;
  aspect-ratio: 3 / 4.05;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.poster::after,
.category-cover::after,
.rank-poster::after,
.hero-poster::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.75));
  pointer-events: none;
}

.poster-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: #08111f;
  background: #67e8f9;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.card-title:hover,
.rank-info a:hover,
.category-block a:hover {
  color: #7dd3fc;
}

.card-body p {
  min-height: 54px;
  margin: 8px 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  font-size: 12px;
}

.card-meta span,
.detail-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
}

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

.movie-card.compact .card-body p {
  display: none;
}

.movie-card.compact .card-title {
  font-size: 15px;
}

.movie-card.compact .card-meta span:nth-child(n+3),
.movie-card.compact .tag-row {
  display: none;
}

.page-hero {
  padding: 90px 0 32px;
}

.page-hero h1 {
  margin-top: 18px;
}

.category-list {
  display: grid;
  gap: 20px;
}

.category-block {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.2s ease;
}

.category-cover {
  aspect-ratio: 16 / 10;
  border-radius: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 96px minmax(0, 1fr) 70px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  transition: 0.2s ease;
}

.rank-index {
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #08111f;
  font-weight: 900;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
}

.rank-poster {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.score {
  justify-self: end;
  min-width: 58px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.32);
  background: rgba(146, 64, 14, 0.20);
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 60px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-position: center;
  background-size: cover;
  filter: saturate(1.15);
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.70);
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 26px;
}

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 66px);
}

.detail-one-line {
  max-width: 760px;
  font-size: 18px;
}

.detail-meta,
.tag-row.big {
  margin-top: 18px;
}

.detail-copy .primary-btn {
  margin-top: 26px;
}

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

.player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.36), rgba(2, 6, 23, 0.82));
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  color: #08111f;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.35);
  font-size: 28px;
}

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

.text-panel h2:first-child {
  margin-top: 0;
}

.text-panel p {
  margin: 12px 0 0;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid rgba(96, 165, 250, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.96));
}

.footer-inner {
  display: grid;
  gap: 24px;
  padding: 44px 0;
}

.footer-brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.footer-brand p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.footer-links a:hover {
  color: #7dd3fc;
}

.copyright {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

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

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

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

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

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
  }

  .hero-poster {
    max-width: 260px;
    transform: none;
  }

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

  .highlight-panel {
    padding: 24px;
  }

  .filter-bar,
  .detail-grid,
  .category-block {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 46px 78px minmax(0, 1fr);
  }

  .score {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .footer-inner,
  .section,
  .page-hero,
  .detail-inner {
    width: min(100% - 22px, 1220px);
  }

  .hero-slide {
    width: min(100% - 22px, 1220px);
  }

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

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

  .rank-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-poster {
    display: none;
  }

  .score {
    grid-column: 2;
  }
}
