:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-bright: rgba(34, 211, 238, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --shadow: 0 25px 60px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at top left,
      rgba(34, 211, 238, 0.18),
      transparent 32rem
    ),
    radial-gradient(
      circle at 80% 10%,
      rgba(37, 99, 235, 0.18),
      transparent 30rem
    ),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.88);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 38px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 16px 0;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(34, 211, 238, 0.18);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand strong,
.site-footer strong {
  display: block;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
  font-size: 15px;
  font-weight: 600;
}

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

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

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

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav a {
  padding: 12px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
  border-radius: 12px;
}

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 600px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transition: opacity 0.7s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.94) 0%,
      rgba(2, 6, 23, 0.64) 44%,
      rgba(2, 6, 23, 0.24) 100%
    ),
    linear-gradient(
      0deg,
      #020617 0%,
      rgba(2, 6, 23, 0.2) 48%,
      rgba(2, 6, 23, 0.58) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 0 180px;
}

.hero-copy {
  max-width: 680px;
}

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

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.9;
}

.hero-tags,
.detail-tags,
.movie-tags,
.movie-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.movie-tags span,
.movie-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  color: #cffafe;
  background: rgba(14, 116, 144, 0.24);
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn,
.hero-search button,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.btn-primary,
.hero-search button {
  color: #00131b;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  box-shadow: 0 18px 30px rgba(34, 211, 238, 0.18);
}

.btn-secondary {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line-bright);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 115px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  background: rgba(203, 213, 225, 0.48);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--cyan);
}

.hero-panel {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 22px;
  margin-top: -96px;
}

.hero-search,
.hero-ranking {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

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

.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  padding: 0 16px;
}

.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--line-bright);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.hero-ranking {
  padding: 18px;
}

.hero-ranking > strong {
  display: block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 18px;
}

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

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

.section-heading span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.22);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-bright);
  box-shadow: 0 22px 50px rgba(8, 145, 178, 0.12);
}

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

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

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

.movie-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    180deg,
    transparent 30%,
    rgba(2, 6, 23, 0.78) 100%
  );
}

.movie-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #00131b;
  background: var(--cyan);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.25);
}

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.movie-info strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-tags {
  margin-top: auto;
}

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

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.72;
}

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

.category-tile span {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 2;
}

.category-tile strong {
  display: block;
  color: #fff;
  font-size: 22px;
}

.category-tile em {
  display: block;
  margin-top: 8px;
  color: var(--soft);
  font-size: 14px;
  font-style: normal;
  line-height: 1.6;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 44px 68px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(3px);
  border-color: var(--line-bright);
}

.ranking-number {
  color: var(--cyan);
  font-weight: 900;
  font-size: 18px;
  text-align: center;
}

.ranking-item img {
  width: 68px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-item strong {
  display: block;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-item em {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  position: relative;
  margin-top: 36px;
  padding: 56px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.18), rgba(37, 99, 235, 0.1)),
    rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.category-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.category-hero > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.pill-link {
  padding: 10px 15px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.detail-layout {
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #cffafe;
}

.breadcrumb em {
  color: var(--soft);
  font-style: normal;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-bright);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.55);
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  background: radial-gradient(
    circle at center,
    rgba(8, 145, 178, 0.18),
    rgba(2, 6, 23, 0.72)
  );
  border: 0;
  cursor: pointer;
}

.player-card.is-playing .player-overlay {
  display: none;
}

.player-overlay span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  color: #00131b;
  background: var(--cyan);
  border-radius: 999px;
  box-shadow: 0 0 0 16px rgba(34, 211, 238, 0.12);
  font-size: 30px;
}

.player-overlay strong {
  max-width: min(82%, 760px);
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.25;
  text-align: center;
}

.detail-info {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  margin-top: 32px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  font-size: clamp(32px, 4vw, 56px);
}

.detail-one-line,
.detail-copy p {
  color: var(--soft);
  font-size: 16px;
  line-height: 1.9;
}

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

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

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

.detail-meta dd {
  margin: 6px 0 0;
  color: #fff;
  font-weight: 800;
}

.detail-copy h2 {
  margin: 26px 0 10px;
  color: #fff;
  font-size: 22px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

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

.footer-bottom {
  padding: 18px 0 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
  text-align: center;
}

.movie-card.is-hidden {
  display: none;
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-panel,
  .category-hero,
  .detail-info {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .movie-grid.all-movies,
  .category-grid,
  .category-grid.large,
  .ranking-grid,
  .ranking-grid.long-list,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    min-height: 740px;
  }

  .hero-content {
    padding: 92px 0 190px;
  }

  .hero-panel {
    margin-top: -120px;
  }

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

  .hero-dots {
    right: 20px;
    bottom: 138px;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 24px;
  }

  .movie-grid,
  .movie-grid.all-movies,
  .category-grid,
  .category-grid.large,
  .ranking-grid,
  .ranking-grid.long-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-info {
    padding: 18px;
  }

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