:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.12), transparent 30rem),
    radial-gradient(circle at 85% 8%, rgba(59, 130, 246, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 80%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.52));
  backdrop-filter: blur(18px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-nav.is-scrolled {
  background: rgba(2, 6, 23, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.32);
  font-size: 13px;
}

.brand-text {
  font-size: 21px;
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: white;
  padding: 9px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  border-radius: 99px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  padding: 8px 18px 18px;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-menu.is-open {
  display: grid;
  gap: 6px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.46);
}

main {
  position: relative;
  z-index: 1;
}

.hero-carousel {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

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

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

.hero-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.66) 45%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.15) 0%, #020617 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1240px) / 2 + 22px));
  bottom: 210px;
  max-width: 690px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 640px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.85;
}

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

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

.hero-tags span,
.tag-row span,
.chip,
.subnav-row a {
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1;
}

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

.primary-button,
.ghost-button,
.section-head > a,
.category-overview-title a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.26);
}

.ghost-button,
.section-head > a,
.category-overview-title a {
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
}

.primary-button:hover,
.ghost-button:hover,
.section-head > a:hover,
.category-overview-title a:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.hero-search-card {
  position: absolute;
  left: 50%;
  bottom: 106px;
  z-index: 4;
  width: min(1196px, calc(100% - 44px));
  transform: translateX(-50%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  outline: none;
  color: white;
  background: rgba(15, 23, 42, 0.86);
}

.hero-search input {
  min-height: 52px;
  padding: 0 16px;
}

.hero-search button {
  border: 0;
  border-radius: 15px;
  padding: 0 24px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
}

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

.chip:hover,
.subnav-row a:hover {
  border-color: rgba(34, 211, 238, 0.55);
  color: white;
}

.hero-thumbs {
  position: absolute;
  right: max(24px, calc((100vw - 1240px) / 2 + 22px));
  bottom: 210px;
  z-index: 4;
  display: grid;
  gap: 12px;
  width: 260px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  padding: 10px;
  color: #e2e8f0;
  text-align: left;
  background: rgba(15, 23, 42, 0.66);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-thumb img {
  width: 66px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.35;
}

.hero-thumb.is-active {
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(34, 211, 238, 0.12);
}

.page-section,
.category-overview-block {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 22px 0;
}

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

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

.section-head h2,
.category-overview-title h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p,
.category-overview-title p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(15, 23, 42, 0.86);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(34, 211, 238, 0.88);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.3);
}

.movie-card-body {
  padding: 15px;
}

.movie-card-meta {
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 750;
}

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--cyan);
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
}

.tag-row span {
  padding: 6px 9px;
  font-size: 12px;
}

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

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

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

.category-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background: rgba(15, 23, 42, 0.68);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.94));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  font-size: 22px;
  font-weight: 850;
}

.category-card p {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.65;
}

.category-card:hover img {
  opacity: 0.62;
  transform: scale(1.08);
}

.subpage-main {
  padding-top: 96px;
}

.page-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 22px;
}

.small-hero > div {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  padding: clamp(28px, 5vw, 56px);
  background:
    radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.14), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 68px);
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 800px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 140px;
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 750;
}

.filter-panel input,
.filter-panel select {
  min-height: 48px;
  padding: 0 14px;
}

.filter-count {
  min-height: 48px;
  display: grid;
  align-content: center;
  border-radius: 15px;
  padding: 0 16px;
  background: var(--cyan-soft);
  color: #dffbff;
}

.filter-count strong {
  font-size: 20px;
  line-height: 1;
}

.filter-count span {
  color: #a5f3fc;
  font-size: 12px;
}

.breadcrumb {
  max-width: 1240px;
  margin: 0 auto;
  padding: 94px 22px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyan);
}

.detail-main {
  padding-bottom: 40px;
}

.detail-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 0;
  max-width: 800px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 840px;
  margin: 20px 0;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.85;
}

.detail-meta span {
  border-radius: 13px;
  padding: 9px 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
}

.detail-tags {
  margin: 22px 0;
}

.player-section {
  max-width: 1240px;
  margin: 24px auto 0;
  padding: 0 22px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.video-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: white;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.68));
}

.video-cover span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 22px 46px rgba(34, 211, 238, 0.35);
  font-size: 34px;
  padding-left: 6px;
}

.video-shell.is-playing .video-cover {
  display: none;
}

.detail-text {
  color: #cbd5e1;
}

.detail-text h2 {
  margin-top: 0;
  margin-bottom: 14px;
  color: white;
}

.detail-text p {
  margin: 0 0 26px;
  font-size: 18px;
  line-height: 2;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 70px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.footer-grid p,
.footer-links a,
.footer-bottom {
  color: #94a3b8;
}

.footer-grid p {
  max-width: 470px;
  line-height: 1.8;
}

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

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

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 22px 32px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
}

[data-card][hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .hero-thumbs {
    display: none;
  }

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

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

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

  .nav-toggle {
    display: block;
  }

  .brand-text {
    font-size: 18px;
  }

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

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 270px;
  }

  .hero-content p {
    font-size: 16px;
    line-height: 1.7;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .hero-search-card {
    bottom: 54px;
  }

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

  .hero-search button {
    min-height: 48px;
  }

  .section-head,
  .category-overview-title {
    display: grid;
    align-items: start;
  }

  .movie-grid,
  .compact-grid,
  .mini-grid,
  .all-grid,
  .ranking-list,
  .large-ranking,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card-body {
    padding: 12px;
  }

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

  .movie-card p {
    font-size: 12px;
  }

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

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

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .compact-grid,
  .mini-grid,
  .all-grid,
  .ranking-list,
  .large-ranking,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
