:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --violet: #a78bfa;
  --amber: #f59e0b;
  --radius: 24px;
  --shadow: 0 28px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(167, 139, 250, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(20px);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #020617;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--soft);
  font-weight: 700;
}

.main-nav a {
  position: relative;
  transition: color 0.22s ease, transform 0.22s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.main-nav a:hover {
  color: var(--cyan);
  transform: translateY(-1px);
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-size: 20px;
}

.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.22)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.38));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 780px;
  padding-top: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info-text h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 680px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.88;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.14);
  color: #cffafe;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #020617;
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.3);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.36);
}

.ghost-btn:hover {
  border-color: rgba(34, 211, 238, 0.42);
}

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

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.active {
  width: 68px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -46px;
  position: relative;
  z-index: 12;
}

.stats-panel div,
.category-tile,
.movie-card,
.category-overview-card,
.story-card,
.detail-info-card,
.player-shell,
.page-hero {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stats-panel div {
  padding: 22px;
  border-radius: 22px;
}

.stats-panel strong {
  display: block;
  font-size: 28px;
  color: #fff;
}

.stats-panel span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.section-block {
  margin-top: 72px;
}

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

.section-heading h2,
.category-overview-head h2,
.story-card h2,
.site-footer h2 {
  margin: 0;
  color: #fff;
}

.section-heading h2,
.category-overview-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading a,
.section-heading span {
  color: var(--cyan);
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  padding: 18px;
  overflow: hidden;
  border-radius: var(--radius);
}

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

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

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

.category-tile span {
  display: inline-flex;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 900;
}

.category-tile strong {
  display: block;
  margin-top: 70px;
  color: #fff;
  font-size: 24px;
}

.category-tile p {
  margin: 8px 0 0;
  color: var(--soft);
  line-height: 1.62;
  font-size: 14px;
}

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

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.58);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease, filter 0.36s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
  filter: brightness(0.82);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.92);
  color: #020617;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), #fef3c7);
  color: #451a03;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

.card-body {
  padding: 16px;
}

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

.card-meta,
.card-desc {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.card-meta {
  font-size: 13px;
}

.card-desc {
  font-size: 14px;
}

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

.small-card .card-body h3 {
  font-size: 16px;
}

.small-card .card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
}

.search-box {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 240px;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.search-box input::placeholder {
  color: #64748b;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  color: var(--soft);
  cursor: pointer;
  font-weight: 800;
}

.filter-btn.active,
.filter-btn:hover {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.14);
  color: #cffafe;
}

.page-main {
  padding: 36px 0 80px;
}

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

.breadcrumb a {
  color: var(--cyan);
  font-weight: 800;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 66px);
  border-radius: 32px;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -50% auto auto 50%;
  width: 560px;
  height: 560px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 65%);
  transform: translateX(-12%);
}

.page-hero p {
  position: relative;
  max-width: 760px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.86;
}

.slim-hero h1,
.category-hero h1,
.ranking-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.category-overview-list {
  display: grid;
  gap: 26px;
  margin-top: 30px;
}

.category-overview-card {
  padding: 24px;
  border-radius: 28px;
}

.category-overview-head p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
}

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

.detail-hero-section {
  position: relative;
  overflow: hidden;
  padding: 30px 0 54px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  filter: blur(26px) saturate(1.15);
  transform: scale(1.08);
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.42), #020617 88%);
}

.detail-layout {
  position: relative;
  z-index: 2;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(320px, 0.7fr);
  gap: 24px;
  align-items: stretch;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.64));
  color: #fff;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #020617;
  font-size: 32px;
  box-shadow: 0 24px 66px rgba(34, 211, 238, 0.32);
}

.player-overlay strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.detail-info-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 18px;
  border-radius: 30px;
}

.detail-poster {
  width: 150px;
  height: 225px;
  border-radius: 20px;
  object-fit: cover;
}

.detail-info-text {
  align-self: center;
}

.detail-info-text h1 {
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.detail-info-text p:not(.eyebrow) {
  color: var(--soft);
  line-height: 1.82;
}

.block-btn {
  width: 100%;
  margin-top: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 30px;
}

.story-card {
  padding: 28px;
  border-radius: 28px;
}

.story-card p:not(.eyebrow) {
  color: var(--soft);
  font-size: 16px;
  line-height: 1.9;
}

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

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

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

.footer-brand {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  display: block;
  color: var(--muted);
  line-height: 1.82;
}

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

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

@media (max-width: 1100px) {
  .category-grid,
  .archive-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 84px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  body.nav-open .main-nav {
    display: flex;
  }

  .main-nav a {
    padding: 14px;
    border-radius: 16px;
  }

  .main-nav a:hover {
    background: rgba(34, 211, 238, 0.12);
  }

  .main-nav a::after {
    display: none;
  }

  .hero {
    height: 580px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.4), rgba(2, 6, 23, 0.95));
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 90px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .stats-panel {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 18px;
  }

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

  .toolbar,
  .section-heading,
  .category-overview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .filter-btn {
    flex: 1;
  }

  .detail-info-card {
    grid-template-columns: 110px 1fr;
  }

  .detail-poster {
    width: 110px;
    height: 165px;
  }

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

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

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

  .brand-text small {
    display: none;
  }

  .hero {
    height: 560px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero-actions,
  .filter-group {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn,
  .filter-btn {
    width: 100%;
  }

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

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

  .detail-poster {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
  }

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