:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-strong: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --radius: 18px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 14px 45px rgba(2, 6, 23, 0.4);
}

.header-inner {
  width: min(100% - 32px, var(--max));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(14, 165, 233, 0.76));
  color: white;
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
  font-size: 14px;
  padding-left: 2px;
}

.brand-name {
  font-size: 1.35rem;
  color: white;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 99px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.header-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.large-search input {
  width: 230px;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 10px 4px 10px 16px;
}

.header-search button,
.mobile-search button,
.large-search button {
  border: 0;
  color: white;
  background: var(--cyan-strong);
  padding: 10px 15px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: white;
  font-size: 1.55rem;
}

.mobile-menu {
  display: none;
  width: min(100% - 32px, var(--max));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-link {
  padding: 10px 12px;
  color: #cbd5e1;
  border-radius: 12px;
}

.mobile-link:hover {
  background: rgba(34, 211, 238, 0.1);
  color: white;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.58) 45%, rgba(2, 6, 23, 0.15) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - var(--max)) / 2));
  bottom: 84px;
  width: min(680px, calc(100vw - 48px));
}

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

.hero h1,
.hero h2,
.page-hero h1,
.detail-hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-hero p {
  max-width: 720px;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  background: var(--cyan-strong);
  color: white;
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.26);
}

.ghost-button {
  min-height: 46px;
  padding: 0 22px;
  color: white;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.55);
  font-size: 2rem;
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.page-stack {
  display: grid;
  gap: 56px;
  padding: 56px 0 24px;
}

.content-section,
.panel-card,
.story-card,
.filter-panel,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-section {
  padding: 26px;
}

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

.section-heading h2,
.panel-card h2,
.story-card h2 {
  margin: 0;
  color: white;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  letter-spacing: -0.03em;
}

.section-link {
  color: var(--cyan);
}

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

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

.movie-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.44);
  box-shadow: 0 24px 55px rgba(2, 6, 23, 0.5);
}

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

.movie-card-small .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 58%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-circle,
.player-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.92);
  transform: translate(-50%, -50%) scale(0.76);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding-left: 3px;
}

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

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  font-size: 0.78rem;
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #e11d48);
  font-weight: 800;
}

.movie-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.movie-body strong {
  color: white;
  font-size: 1.02rem;
  line-height: 1.32;
  min-height: 2.6em;
}

.movie-body small {
  min-height: 3.1em;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-row span {
  color: #cbd5e1;
  font-size: 0.82rem;
}

.tag-row span {
  padding: 4px 9px;
  font-size: 0.78rem;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.12);
}

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

.category-card,
.category-overview-main {
  display: grid;
  gap: 12px;
  min-height: 180px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-main:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.5);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.category-thumbs img {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.category-card strong,
.category-overview-main span {
  color: white;
  font-size: 1.1rem;
}

.category-card small,
.category-overview-main strong {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.two-column-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.panel-card,
.story-card {
  padding: 24px;
}

.compact-heading {
  margin-bottom: 18px;
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 58px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: rgba(34, 211, 238, 0.08);
  transform: translateX(4px);
}

.compact-card img {
  width: 58px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
}

.compact-card strong,
.compact-card small {
  display: block;
}

.compact-card strong {
  color: white;
}

.compact-card small {
  color: var(--muted);
  font-size: 0.82rem;
}

.compact-card em {
  color: var(--cyan);
  font-style: normal;
  font-weight: 800;
}

.compact-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: rgba(34, 211, 238, 0.18);
  font-weight: 800;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 56px;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.18), transparent 30%), #020617;
}

.compact-hero {
  min-height: 340px;
  display: flex;
  align-items: center;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 0.92rem;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 20px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
}

.filter-panel input,
.filter-panel select,
.large-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.48);
  color: white;
  padding: 12px 14px;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus,
.large-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.empty-state {
  display: none;
  margin: 26px 0 0;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
}

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

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

.category-overview-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.category-overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-overview-links a {
  border-radius: 999px;
  padding: 6px 11px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.42);
}

.category-overview-links a:hover {
  color: white;
  background: rgba(34, 211, 238, 0.16);
}

.large-search {
  max-width: 640px;
  margin-top: 26px;
  border-radius: 18px;
}

.large-search input {
  border: 0;
  border-radius: 0;
  padding: 16px 18px;
}

.large-search button {
  align-self: stretch;
  padding: 0 28px;
}

.detail-hero {
  min-height: 580px;
  display: flex;
  align-items: flex-end;
  background-image: var(--detail-cover);
  background-size: cover;
  background-position: center;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.8) 52%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.24));
}

.detail-hero-content {
  position: relative;
  z-index: 1;
}

.detail-intro {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 32px;
  align-items: end;
}

.detail-poster {
  width: 230px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 40px 0;
}

.detail-content {
  display: grid;
  gap: 26px;
}

.player-panel {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #000;
  box-shadow: var(--shadow);
}

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

.movie-video,
.player-cover,
.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  object-fit: contain;
  background: #000;
}

.player-cover {
  z-index: 3;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #000;
}

.player-cover img {
  object-fit: cover;
  filter: brightness(0.8);
}

.player-cover-shade {
  background: radial-gradient(circle, transparent 0%, rgba(2, 6, 23, 0.42) 58%, rgba(2, 6, 23, 0.8) 100%);
}

.player-play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  width: 78px;
  height: 78px;
  font-size: 1.4rem;
}

.player-cover.is-hidden {
  display: none;
}

.story-card {
  color: #cbd5e1;
}

.story-card h2 + p {
  margin-top: 12px;
}

.info-list {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 16px;
  margin: 20px 0 0;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  color: #e2e8f0;
}

.info-list a {
  color: var(--cyan);
}

.sticky-card {
  position: sticky;
  top: 92px;
  margin-top: 24px;
}

.related-section {
  box-shadow: none;
}

.site-footer {
  margin-top: 64px;
  padding: 46px 0 26px;
  color: #94a3b8;
  background: rgba(2, 6, 23, 0.72);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: white;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  width: min(100% - 32px, var(--max));
  margin: 30px auto 0;
  padding-top: 20px;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
  }

  .header-search input {
    width: 180px;
  }

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

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

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

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

  .sticky-card {
    position: static;
    margin-top: 0;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    bottom: 74px;
  }

  .hero-arrow {
    display: none;
  }

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

  .category-grid,
  .category-overview-grid,
  .two-column-section,
  .footer-grid,
  .filter-panel,
  .detail-sidebar {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: 180px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 62px;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .content-section,
  .panel-card,
  .story-card {
    padding: 18px;
  }

  .movie-grid,
  .full-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-hero h1 {
    font-size: 2.2rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero {
    min-height: 620px;
  }

  .large-search {
    border-radius: 18px;
    display: grid;
  }

  .large-search button {
    padding: 12px 18px;
  }
}
