:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --brand: #818cf8;
  --brand-strong: #6366f1;
  --brand-soft: rgba(99, 102, 241, 0.24);
  --gold: #fbbf24;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(99, 102, 241, 0.22), transparent 34rem),
    radial-gradient(circle at 85% 8%, rgba(14, 165, 233, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: var(--max);
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(99, 102, 241, 0.38);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: var(--muted-strong);
  font-size: 14px;
}

.nav-menu a {
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #fff;
}

.hero-wrap {
  position: relative;
  max-width: var(--max);
  margin: 28px auto 0;
  padding: 0 24px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 44px;
  padding: 70px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.025);
  transition: opacity 0.8s ease, transform 1.1s ease;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.84) 44%, rgba(2, 6, 23, 0.55) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
}

.hero-tags,
.tag-row,
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.filter-chip {
  border: 1px solid rgba(129, 140, 248, 0.34);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  padding: 6px 12px;
  font-size: 12px;
}

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

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

.primary-btn {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.36);
}

.primary-btn:hover,
.section-link:hover,
.text-link:hover {
  transform: translateY(-2px);
  background: #4338ca;
  color: #fff;
}

.ghost-btn,
.section-link,
.text-link {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.64);
  color: var(--muted-strong);
}

.hero-poster {
  position: relative;
  z-index: 2;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  transform: rotate(1deg);
}

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

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

.hero-controls {
  position: absolute;
  left: 60px;
  bottom: 42px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: #fff;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 26px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.hero-dot.is-active {
  width: 44px;
  background: #818cf8;
}

.search-band,
.content-section,
.page-main,
.detail-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.search-band {
  margin-top: 26px;
}

.search-card,
.page-hero,
.detail-hero,
.category-overview-block,
.detail-article {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: end;
  padding: 28px;
}

.search-card h2,
.section-head h2,
.category-overview-head h2,
.detail-article h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.search-card p,
.section-head p,
.category-overview-head p,
.page-hero p,
.detail-lead,
.detail-article p {
  color: var(--muted-strong);
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--muted);
  font-size: 13px;
}

.search-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 16px;
  outline: 0;
  background: rgba(2, 6, 23, 0.68);
  color: #fff;
  padding: 0 16px;
}

.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.14);
}

.content-section {
  padding-top: 64px;
}

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

.section-head p,
.category-overview-head p {
  max-width: 720px;
  margin: 10px 0 0;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(129, 140, 248, 0.55);
  background: rgba(30, 41, 59, 0.86);
}

.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.45s ease;
}

.card-badge,
.poster-action {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.card-badge {
  top: 12px;
  left: 12px;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.poster-action {
  right: 12px;
  bottom: 12px;
  background: rgba(79, 70, 229, 0.9);
  color: #fff;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-action {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta a {
  color: var(--brand);
  font-weight: 700;
}

.card-title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.32;
}

.card-title a:hover {
  color: #c7d2fe;
}

.card-desc {
  display: -webkit-box;
  min-height: 3.9em;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-desc.compact {
  min-height: 2.8em;
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-top: 14px;
}

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

.category-tile {
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.74));
}

.category-title {
  display: inline-flex;
  margin-bottom: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.category-tile p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

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

.mini-link {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.42);
}

.mini-link span {
  color: #fff;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-link small {
  color: var(--muted);
}

.ranking-section {
  padding-top: 72px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  min-height: 168px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.8);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

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

.rank-cover span {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.92);
  color: #111827;
  font-weight: 900;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.rank-copy h3 {
  margin: 6px 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.28;
}

.rank-copy h3 a:hover {
  color: #c7d2fe;
}

.text-link {
  min-height: 34px;
  margin-top: 12px;
  padding: 0 14px;
  font-size: 13px;
}

.page-main,
.detail-main {
  padding-top: 30px;
}

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

.breadcrumb a {
  color: #c7d2fe;
}

.page-hero {
  padding: 40px;
}

.page-hero h1 {
  max-width: 900px;
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  font-size: 17px;
}

.page-search {
  max-width: 580px;
  margin-top: 28px;
}

.filter-row {
  margin-top: 18px;
}

.filter-chip {
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  background: #4f46e5;
  border-color: #818cf8;
  color: #fff;
}

.category-list-section,
.ranking-page-section {
  padding-top: 34px;
}

.category-overview-block {
  margin-top: 28px;
  padding: 28px;
}

.ranking-page-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 30px;
  align-items: stretch;
  padding: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 26px;
  background: #000;
}

.video-player {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: #000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.player-cover-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(99, 102, 241, 0.28), transparent 22rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.82));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 45px rgba(79, 70, 229, 0.45);
}

.detail-copy {
  padding: 20px 12px 20px 6px;
}

.detail-copy h1 {
  font-size: clamp(34px, 4.6vw, 58px);
}

.detail-lead {
  font-size: 17px;
  margin: 18px 0 0;
}

.detail-tags {
  margin-bottom: 20px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

.detail-meta-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta-grid dd {
  margin: 4px 0 0;
  color: #fff;
  font-weight: 700;
}

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

.detail-article {
  padding: 32px;
}

.detail-article h2 + p {
  margin-top: 12px;
}

.detail-article p + h2 {
  margin-top: 26px;
}

.related-section {
  padding-bottom: 64px;
}

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

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  margin-left: 16px;
  color: var(--muted-strong);
}

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 300px;
    padding: 52px;
  }
}

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

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    padding: 12px;
    border-radius: 12px;
  }

  .nav-menu a:hover {
    background: rgba(129, 140, 248, 0.12);
  }

  .hero-carousel {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 40px 28px 90px;
  }

  .hero-poster {
    max-width: 250px;
    margin: 0 auto;
  }

  .hero-controls {
    left: 28px;
    bottom: 28px;
  }

  .search-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .ranking-list,
  .ranking-page-list {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .nav-shell,
  .hero-wrap,
  .search-band,
  .content-section,
  .page-main,
  .detail-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-copy small {
    display: none;
  }

  .hero-carousel {
    min-height: 680px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 34px 22px 92px;
  }

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

  .hero-copy p {
    font-size: 15px;
  }

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

  .page-hero,
  .search-card,
  .detail-article,
  .category-overview-block {
    padding: 24px;
    border-radius: 22px;
  }

  .detail-hero {
    padding: 14px;
  }

  .player-shell,
  .video-player {
    min-height: 260px;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}
