:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --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;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.16);
  --orange: #fb923c;
  --purple: #a78bfa;
  --emerald: #34d399;
  --radius: 1.5rem;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section-inner,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-mark {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 16px 44px rgba(6, 182, 212, 0.3);
}

.brand-text {
  font-size: 1.25rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link,
.mobile-link {
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-link {
  padding: 0.65rem 1rem;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
  background: rgba(6, 182, 212, 0.16);
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-link {
  padding: 0.85rem 1rem;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms ease, visibility 700ms ease;
}

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

.hero-bg,
.hero-bg img,
.hero-shade {
  position: absolute;
  inset: 0;
}

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

.hero-shade {
  background:
    linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.92) 12%, rgba(2, 6, 23, 0.48) 58%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(to right, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.72));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  min-height: 85vh;
  padding: 8rem 0 6.5rem;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow,
.meta-chip,
.poster-badge,
.category-more,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.eyebrow {
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  color: #fff;
}

.eyebrow strong {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

.eyebrow span {
  color: var(--muted-strong);
}

.hero h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.55rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 3vw, 2.7rem);
  line-height: 1.15;
}

.hero-text {
  width: min(680px, 100%);
  margin: 0;
  color: var(--muted-strong);
  font-size: clamp(1.02rem, 1.8vw, 1.24rem);
}

.hero-actions,
.section-heading,
.detail-actions,
.filter-row,
.pager-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-actions {
  margin-top: 2.1rem;
}

.btn,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.9rem;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn {
  background: var(--cyan);
  color: #fff;
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.25);
}

.btn:hover,
.btn-secondary:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-3px);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
}

.hero-dots {
  position: absolute;
  right: max(2rem, calc((100vw - 1180px) / 2));
  bottom: 2.5rem;
  z-index: 5;
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.8rem;
  height: 0.8rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: width 250ms ease, background 250ms ease;
}

.hero-dot.is-active {
  width: 2.3rem;
  background: var(--cyan);
}

.main-sections,
.page-shell {
  padding: 4rem 0;
}

.main-sections {
  display: grid;
  gap: 5rem;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 1.6rem;
}

.section-title-block h2,
.page-title,
.detail-title {
  margin: 0;
  letter-spacing: -0.04em;
}

.section-title-block h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.section-title-block p,
.page-lead,
.detail-lead,
.movie-card p,
.category-info p,
.rank-body p,
.footer-inner p,
.breadcrumbs {
  color: var(--muted);
}

.section-title-block p,
.page-lead {
  margin: 0.35rem 0 0;
}

.link-more {
  color: #67e8f9;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.92));
  box-shadow: var(--shadow);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
  border-color: rgba(6, 182, 212, 0.44);
  box-shadow: 0 28px 90px rgba(6, 182, 212, 0.12);
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms ease, filter 360ms ease;
}

.movie-card:hover .poster-link img,
.category-card:hover img {
  transform: scale(1.06);
  filter: saturate(1.12) contrast(1.08);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), transparent 45%);
  pointer-events: none;
}

.poster-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.65rem;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  font-size: 0.78rem;
  backdrop-filter: blur(12px);
}

.movie-card-body {
  padding: 1.05rem;
}

.card-meta-line,
.rank-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: #67e8f9;
  font-size: 0.84rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0.45rem 0;
  color: #fff;
  font-size: 1.06rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-body h3 a:hover {
  color: #67e8f9;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.meta-chip {
  padding: 0.25rem 0.58rem;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted-strong);
  font-size: 0.75rem;
}

.feature-panel,
.search-panel,
.player-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.52));
  box-shadow: var(--shadow);
}

.feature-panel,
.search-panel {
  padding: clamp(1.2rem, 3vw, 2.4rem);
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--panel);
  transition: transform 220ms ease, border-color 220ms ease;
}

.category-card:hover {
  border-color: rgba(6, 182, 212, 0.44);
}

.category-card-link {
  display: grid;
  grid-template-columns: 38% 1fr;
  min-height: 12rem;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  overflow: hidden;
  background: #111827;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  min-height: 6rem;
  object-fit: cover;
  transition: transform 360ms ease, filter 360ms ease;
}

.category-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.15rem;
}

.category-info h2 {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
}

.category-more {
  width: fit-content;
  margin-top: 1rem;
  padding: 0.35rem 0.75rem;
  background: var(--cyan-soft);
  color: #67e8f9;
  font-size: 0.85rem;
}

.rank-list {
  display: grid;
  gap: 0.9rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 3.25rem 5.5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.72);
}

.rank-index {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(37, 99, 235, 0.25));
  color: #fff;
  font-weight: 900;
}

.rank-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 0.9rem;
  background: #111827;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
}

.filter-row {
  margin-top: 1.25rem;
}

.search-input,
.filter-select {
  min-height: 3.15rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.5);
  color: #fff;
  outline: none;
}

.search-input {
  flex: 1 1 22rem;
  padding: 0 1rem;
}

.filter-select {
  flex: 0 1 12rem;
  padding: 0 0.8rem;
}

.page-title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
}

.page-lead {
  max-width: 760px;
  font-size: 1.08rem;
}

.page-head {
  margin-bottom: 2.2rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.breadcrumbs a:hover {
  color: #67e8f9;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: 2.5rem;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.detail-kicker {
  margin-bottom: 1rem;
  padding: 0.35rem 0.8rem;
  background: var(--cyan-soft);
  color: #67e8f9;
}

.detail-title {
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 1.02;
}

.detail-lead {
  max-width: 820px;
  margin: 1rem 0 1.4rem;
  font-size: 1.12rem;
}

.detail-actions {
  margin-top: 1.6rem;
}

.player-panel {
  overflow: hidden;
  margin-bottom: 2rem;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.16));
  color: #fff;
  cursor: pointer;
  transition: opacity 220ms ease, visibility 220ms ease;
  z-index: 3;
}

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

.play-icon {
  display: grid;
  width: clamp(4.5rem, 9vw, 6.8rem);
  height: clamp(4.5rem, 9vw, 6.8rem);
  place-items: center;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 22px 60px rgba(6, 182, 212, 0.32);
  font-size: 2rem;
  transform: translateZ(0);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.4rem;
}

.detail-panel {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-panel h2,
.detail-panel h3 {
  margin: 0 0 0.9rem;
  font-size: 1.45rem;
}

.detail-panel p {
  color: var(--muted-strong);
}

.detail-panel p + p {
  margin-top: 1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.pager-row {
  justify-content: space-between;
  margin-top: 1.5rem;
}

.empty-state {
  display: none;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  color: var(--muted);
  background: var(--panel);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  padding: 2.4rem 0;
}

.footer-brand {
  margin-bottom: 0.7rem;
  font-size: 1.2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  max-width: 460px;
}

.footer-links a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted-strong);
}

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

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

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

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

  .detail-cover {
    width: min(340px, 100%);
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content {
    padding: 7rem 0 5.5rem;
  }

  .hero-dots {
    left: 1rem;
    right: auto;
    bottom: 1.5rem;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
  }

  .category-card-link {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 2.8rem 4.5rem 1fr;
    gap: 0.75rem;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .footer-inner,
  .section-inner,
  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 1.05rem;
  }

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

  .hero-actions,
  .section-heading,
  .detail-actions,
  .filter-row,
  .pager-row {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .btn-secondary,
  .search-input,
  .filter-select {
    width: 100%;
  }
}
