:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --gold: #f59e0b;
  --green: #22c55e;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 88% 8%, rgba(59, 130, 246, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #08111f 48%, #020617 100%);
  color: var(--text);
}

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

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.35);
  color: #00111a;
  font-size: 15px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 15px;
  transition: 0.25s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.14);
}

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

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

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  isolation: isolate;
}

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

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

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

.hero-shadow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.04) 48%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(650px, calc(100% - 48px));
  transform: translateY(-50%);
}

.eyebrow,
.section-heading span,
.page-hero-inner span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-content h1 {
  margin: 14px 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 600px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-pills span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.10);
  color: #a5f3fc;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #00111a;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.24);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.34);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(15, 23, 42, 0.66);
  color: #e2e8f0;
}

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

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.56);
  color: white;
  cursor: pointer;
  font-size: 32px;
  transition: 0.25s ease;
}

.hero-nav:hover {
  background: rgba(34, 211, 238, 0.22);
}

.hero-prev {
  right: 90px;
}

.hero-next {
  right: 32px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
  transition: 0.25s ease;
}

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

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

.alt-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: rgba(15, 23, 42, 0.34);
  border-block: 1px solid rgba(148, 163, 184, 0.08);
}

.section-heading {
  position: relative;
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.section-heading h2,
.page-hero-inner h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero-inner p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link,
.text-link {
  justify-self: start;
  min-height: 38px;
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 13px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.72);
  color: #e2e8f0;
  outline: none;
  padding: 0 14px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.empty-state {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.48);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
  transition: 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 22px 55px rgba(8, 145, 178, 0.18);
}

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

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

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

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.card-badge {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.76);
  color: #e2e8f0;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 36px;
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #0f172a;
}

.card-body {
  display: grid;
  gap: 11px;
  padding: 18px;
}

.card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

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

.card-desc {
  margin: 0;
  color: #a8b3c7;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #94a3b8;
  font-size: 13px;
}

.card-meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 12px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.55);
  vertical-align: middle;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
}

.movie-card-compact .poster-link {
  aspect-ratio: 3 / 4;
}

.movie-card-compact .card-body {
  align-content: center;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 36px;
}

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

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: 0.25s ease;
}

.mini-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
  transform: translateX(4px);
}

.mini-card img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card strong {
  margin-bottom: 8px;
  line-height: 1.4;
}

.mini-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.list-rank {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--cyan);
  color: #04111e;
  font-weight: 900;
  font-size: 12px;
}

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

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 12px;
  min-height: 148px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.72);
  transition: 0.25s ease;
}

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

.category-card span,
.category-overview-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
}

.category-card strong,
.category-overview-card p {
  color: #a8b3c7;
  font-weight: 400;
  line-height: 1.7;
}

.category-card em {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-style: normal;
}

.category-card em a,
.category-overview-card li a {
  color: #a5f3fc;
}

.category-overview-card ul {
  margin: 0;
  padding-left: 18px;
  color: #cbd5e1;
  line-height: 1.9;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.page-hero {
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.06)),
    radial-gradient(circle at 70% 10%, rgba(34, 211, 238, 0.16), transparent 26rem);
}

.slim-hero {
  min-height: 310px;
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  display: grid;
  gap: 12px;
}

.detail-hero {
  min-height: 640px;
  place-items: stretch;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.92)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 45%, #020617 100%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #a5f3fc;
}

.detail-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-copy p {
  max-width: 820px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.20);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.62)),
    radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 18rem);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.play-button {
  min-width: 170px;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #00111a;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.28);
}

.article-section {
  padding-top: 26px;
}

.detail-article {
  display: grid;
  gap: 18px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
}

.detail-article h2 {
  margin: 0;
  font-size: 28px;
}

.detail-article p {
  margin: 0;
  color: #cbd5e1;
  line-height: 2;
  font-size: 16px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
}

.info-list strong {
  color: var(--cyan);
  font-size: 13px;
}

.info-list span {
  color: #e2e8f0;
}

.spotlight-ranking {
  padding-bottom: 20px;
}

.ranking-spotlight-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 16px;
}

.ranking-spotlight-card {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #0f172a;
}

.ranking-spotlight-card:first-child {
  min-height: 360px;
}

.ranking-spotlight-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.ranking-spotlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.10));
}

.ranking-spotlight-card span,
.ranking-spotlight-card strong,
.ranking-spotlight-card em {
  position: relative;
  z-index: 2;
}

.ranking-spotlight-card span {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #0f172a;
  font-weight: 900;
}

.ranking-spotlight-card strong {
  font-size: 20px;
  line-height: 1.4;
}

.ranking-spotlight-card em {
  margin-top: 8px;
  color: #cbd5e1;
  font-style: normal;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #94a3b8;
}

.footer-inner strong {
  color: #e2e8f0;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    top: 52%;
  }

  .hero-nav {
    display: none;
  }

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

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

  .split-section,
  .detail-layout,
  .ranking-spotlight-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    padding: 46px 0;
  }

  .detail-poster {
    width: min(330px, 100%);
  }
}

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 17px;
  }

  .hero-carousel {
    height: 540px;
  }

  .hero-content {
    left: 16px;
    width: calc(100% - 32px);
  }

  .hero-content p,
  .detail-copy p {
    font-size: 16px;
  }

  .content-section,
  .page-hero-inner,
  .detail-layout,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid,
  .three-grid,
  .category-movie-grid,
  .category-grid,
  .category-overview-grid,
  .compact-category-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .movie-card-compact {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .movie-card-compact .card-body {
    padding: 14px;
  }

  .card-desc {
    -webkit-line-clamp: 3;
  }

  .footer-inner {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 24px 0;
  }
}
