:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --text: #f8fafc;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #1d4ed8;
  --blue-soft: rgba(37, 99, 235, 0.22);
  --gold: #facc15;
  --gold-deep: #eab308;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 16% 8%, rgba(250, 204, 21, 0.12), transparent 24rem),
    radial-gradient(circle at 86% 12%, rgba(37, 99, 235, 0.24), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #0b1120 46%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.nav-wrap,
.footer-grid,
.content-section,
.detail-hero,
.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand span:last-child,
.footer-brand span:last-child {
  background: linear-gradient(90deg, #facc15, #fef3c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  box-shadow: 0 10px 28px rgba(250, 204, 21, 0.26);
}

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

.nav-links a,
.mobile-nav a {
  color: #dbeafe;
  padding: 10px 16px;
  border-radius: 14px;
  transition: 0.24s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(37, 99, 235, 0.78);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.2);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.34);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.hero {
  position: relative;
  height: clamp(520px, 62vw, 680px);
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 46%, rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.46) 38%, transparent 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 76px;
  width: min(760px, calc(100% - 48px));
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.44);
}

.hero p,
.page-hero p,
.detail-intro p {
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: clamp(16px, 2.1vw, 22px);
  line-height: 1.75;
}

.tag-strip,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.tag-strip span,
.detail-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(191, 219, 254, 0.18);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 26px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.24s ease;
}

.primary-button,
.home-search button {
  background: linear-gradient(90deg, #facc15, #eab308);
  color: #111827;
  box-shadow: 0 18px 48px rgba(234, 179, 8, 0.28);
}

.ghost-button {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-button:hover,
.ghost-button:hover,
.home-search button:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.45);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: 0.24s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.24s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--gold);
}

.content-section {
  padding: 62px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-heading a {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.2);
}

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

.dense-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  transition: 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(250, 204, 21, 0.38);
  box-shadow: 0 24px 52px rgba(250, 204, 21, 0.14);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.ranking-grid .poster-frame,
.category-list .poster-frame,
.dense-grid .poster-frame {
  aspect-ratio: 3 / 4;
}

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

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

.card-shade {
  position: absolute;
  inset: auto 0 0;
  height: 60%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.quality-pill,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: var(--gold);
  color: #111827;
}

.card-body {
  display: flex;
  min-height: 156px;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  font-size: 17px;
  line-height: 1.35;
}

.card-line {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.card-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.15);
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 28px;
  align-items: start;
}

.rank-panel,
.search-card,
.filter-panel,
.detail-article {
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.rank-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.compact-card {
  display: grid;
  grid-template-columns: 38px 74px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 15px;
  transition: 0.24s ease;
}

.compact-card:hover {
  background: rgba(30, 64, 175, 0.28);
}

.compact-card img {
  width: 74px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

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

.mini-rank {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.16);
  color: #fde68a;
  font-weight: 900;
}

.search-card {
  padding: 26px;
}

.search-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.search-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.75;
}

.home-search {
  display: flex;
  gap: 10px;
}

.home-search input,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  outline: none;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.82);
  padding: 0 16px;
}

.home-search button {
  flex: 0 0 auto;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.quick-tags a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  background: var(--blue-soft);
}

.category-grid,
.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.category-card,
.category-overview {
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.18), transparent 40%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.52));
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: 0.24s ease;
}

.category-card:hover,
.category-overview:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 204, 21, 0.35);
}

.category-card span,
.category-overview h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-card strong,
.category-overview p {
  color: var(--soft);
  font-weight: 500;
  line-height: 1.7;
}

.category-overview strong {
  color: #fde68a;
  margin-top: 18px;
}

.page-hero,
.detail-hero {
  margin-top: 34px;
}

.slim-hero {
  min-height: 280px;
  display: grid;
  align-items: center;
  padding: 46px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.45));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.filter-panel {
  padding: 18px;
  margin-bottom: 26px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 190px;
  gap: 14px;
}

.no-results {
  display: none;
  color: #fde68a;
  margin: 18px 4px 0;
}

.no-results.is-visible {
  display: block;
}

.hidden-by-filter {
  display: none !important;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.12), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.34));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fde68a;
}

.detail-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.detail-info span {
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--soft);
}

.detail-info b {
  display: block;
  margin-bottom: 6px;
  color: #fde68a;
  font-size: 13px;
}

.player-section {
  padding-top: 46px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.48);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.42)),
    rgba(15, 23, 42, 0.15);
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #111827;
  font-size: 34px;
  box-shadow: 0 20px 58px rgba(250, 204, 21, 0.28);
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 42px);
}

.player-cover em {
  color: #dbeafe;
  font-style: normal;
}

.article-section {
  padding-top: 26px;
}

.detail-article {
  padding: 34px;
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 28px;
  color: var(--soft);
  line-height: 1.95;
  font-size: 17px;
}

.site-footer {
  margin-top: 52px;
  padding: 48px 0 30px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.38), rgba(0, 0, 0, 0.76));
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 34px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 24px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
}

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

  .menu-button {
    display: block;
  }

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

  .hero-content {
    bottom: 70px;
  }

  .hero-arrow {
    display: none;
  }

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

  .filter-row,
  .detail-info {
    grid-template-columns: 1fr;
  }

  .slim-hero,
  .detail-hero {
    padding: 26px;
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  .footer-grid,
  .content-section,
  .detail-hero,
  .page-hero {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

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

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

  .card-body {
    min-height: 170px;
    padding: 12px;
  }

  .card-line {
    display: none;
  }

  .home-search {
    flex-direction: column;
  }

  .compact-card {
    grid-template-columns: 32px 60px 1fr;
  }

  .compact-card img {
    width: 60px;
    height: 48px;
  }
}
