:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.64);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --line: rgba(148, 163, 184, 0.16);
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  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(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.12), transparent 32rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

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

.nav-shell {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 68px;
}

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

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

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--cyan);
}

.header-search {
  width: 280px;
}

input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  padding: 11px 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type="search"]:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.98);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--panel-soft);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
}

.mobile-panel-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 22px;
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 45%;
  background: linear-gradient(transparent, var(--bg));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 150px;
  max-width: 680px;
}

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

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0 18px;
  line-height: 1.06;
  font-size: clamp(42px, 7vw, 82px);
  letter-spacing: -0.055em;
}

.hero p,
.page-hero p,
.detail-one-line {
  color: #dbeafe;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.75;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags a,
.chip-row button {
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  padding: 7px 12px;
  color: #bae6fd;
  background: rgba(8, 47, 73, 0.45);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.primary-button {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 38px rgba(34, 211, 238, 0.24);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.18);
}

.hero-poster {
  position: absolute;
  right: max(32px, calc((100vw - 1180px) / 2));
  top: 120px;
  width: min(340px, 30vw);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-poster img,
.poster-link img,
.compact-card img,
.ranking-poster img,
.detail-poster img,
.category-stack img,
.category-cover-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(8, 47, 73, 0.7));
}

.image-empty {
  visibility: hidden;
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.search-band {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: -34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band h2,
.section-heading h2,
.site-footer h2,
.detail-copy h2,
.movie-card h2,
.ranking-body h2,
.category-tile h2,
.category-panel h2 {
  margin: 0;
}

.search-band h2 {
  margin-top: 6px;
  font-size: clamp(23px, 3vw, 34px);
}

.search-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(100%, 520px);
}

.search-line.narrow {
  margin-top: 26px;
  max-width: 560px;
}

.section {
  padding: 74px 0 0;
}

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

.section-heading h2 {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.035em;
}

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

.section-heading.compact h2 {
  font-size: clamp(24px, 3vw, 34px);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
}

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

.poster-link img {
  transition: transform 0.45s ease;
}

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

.poster-shine {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.76));
}

.movie-card-body {
  padding: 18px;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
}

.movie-card h2 {
  margin-top: 12px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p,
.category-tile p,
.category-panel p,
.ranking-body p,
.detail-copy p,
.site-footer p {
  color: var(--muted);
  line-height: 1.72;
}

.movie-card p {
  min-height: 72px;
  margin: 10px 0 14px;
  font-size: 14px;
}

.tag-row {
  font-size: 12px;
}

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

.category-tile,
.category-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  padding: 20px;
  transition: transform 0.22s ease, border 0.22s ease;
}

.category-tile:hover,
.category-panel:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
}

.category-stack,
.category-cover-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  height: 150px;
  margin-bottom: 18px;
}

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

.category-stack img,
.category-cover-row img {
  border-radius: 14px;
}

.two-column {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
}

.rank-list,
.ranking-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
}

.rank-number,
.ranking-index {
  color: var(--cyan);
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

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

.compact-card {
  display: grid;
  gap: 8px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 700;
}

.compact-card img {
  aspect-ratio: 2 / 3;
  border-radius: 15px;
  border: 1px solid var(--line);
}

.page-hero {
  padding: 86px 0 20px;
}

.page-hero h1 {
  max-width: 780px;
}

.page-hero p {
  max-width: 780px;
  color: #cbd5e1;
}

.category-hero .chip-row {
  margin-top: 26px;
}

.chip-row button {
  cursor: pointer;
}

.chip-row button.is-active {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.category-panel {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.ranking-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-body h2 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 68px 0 44px;
  isolation: isolate;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

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

.breadcrumb a {
  color: #bae6fd;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  max-width: 820px;
}

.detail-meta,
.detail-tags {
  margin-top: 20px;
}

.detail-info .primary-button {
  margin-top: 28px;
}

.video-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-panel video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #001018;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.5));
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 54px rgba(34, 211, 238, 0.3);
  font-size: 32px;
}

.video-panel.is-playing .play-overlay {
  display: none;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.detail-copy article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

[data-card].is-hidden {
  display: none;
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .mobile-panel.is-open {
    display: block;
  }

  .hero-poster {
    opacity: 0.5;
    right: 18px;
    width: 280px;
  }

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

  .category-grid,
  .category-panel-grid,
  .two-column,
  .detail-copy,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 104px;
  }

  .hero-poster {
    display: none;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(36px, 12vw, 56px);
  }

  .search-band,
  .search-line,
  .section-heading,
  .rank-item {
    display: grid;
  }

  .search-line {
    min-width: 0;
  }

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

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

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

  .detail-poster {
    max-width: 230px;
  }

  .ranking-card {
    grid-template-columns: 86px 1fr;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 22px, 1180px);
  }

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

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

  .hero-actions,
  .detail-tags,
  .hero-tags {
    gap: 8px;
  }
}
