:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --pink: #f472b6;
  --orange: #fb923c;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 28rem),
    radial-gradient(circle at top right, rgba(244, 114, 182, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.container {
  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.82);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--pink));
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.34);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--soft);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.36);
  background: rgba(59, 130, 246, 0.14);
}

.sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 14px;
}

.sub-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.sub-nav a:hover {
  color: #ffffff;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #ffffff;
}

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

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.15) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.16) 38%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: 48px;
  padding: 92px 0 116px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #93c5fd;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(2.7rem, 7vw, 6rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--soft);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.58);
  font-size: 0.82rem;
}

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

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.34);
}

.ghost-button,
.section-more {
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.32), transparent 48%);
}

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

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

.hero-dots button {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.active {
  background: #ffffff;
}

.section-block {
  padding: 54px 0;
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 24px;
  align-items: center;
  margin-top: -44px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.site-search {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: #ffffff;
  outline: 0;
  background: rgba(2, 6, 23, 0.72);
}

.site-search:focus {
  border-color: rgba(59, 130, 246, 0.78);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

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

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

.category-tile {
  min-height: 148px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(244, 114, 182, 0.08)),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 52px rgba(2, 6, 23, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.58);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 1.18rem;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.movie-grid.small-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 24px 62px rgba(37, 99, 235, 0.15);
}

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

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.85);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #93c5fd;
  font-size: 0.82rem;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.32;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.movie-card.compact h3 {
  font-size: 0.98rem;
}

.movie-card.compact p {
  font-size: 0.86rem;
}

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

.rank-strip-item {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-no {
  color: #bfdbfe;
  font-weight: 900;
}

.rank-strip-item img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-year {
  color: var(--muted);
  font-size: 0.86rem;
}

.page-main {
  padding: 32px 0 64px;
}

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 260px;
  margin-bottom: 26px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.28), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.86));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 860px;
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
}

.site-search.wide {
  max-width: 420px;
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-thumb img {
  width: 160px;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  color: #93c5fd;
  font-size: 0.88rem;
  font-weight: 800;
}

.rank-info h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
}

.rank-info p {
  margin: 0 0 14px;
  color: var(--soft);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.player-card,
.text-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
}

.player-card {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  background: #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), rgba(2, 6, 23, 0.38));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-overlay span {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 52px rgba(37, 99, 235, 0.38);
}

.play-overlay span::before {
  content: "";
  position: absolute;
  margin: 25px 0 0 32px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #ffffff;
}

.detail-copy {
  padding: 28px;
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.lead-text {
  margin: 0 0 18px;
  color: var(--soft);
  font-size: 1.08rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c7d2fe;
  background: rgba(2, 6, 23, 0.42);
  font-size: 0.9rem;
}

.text-panel {
  margin-top: 18px;
  padding: 26px;
}

.text-panel h2,
.side-panel h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.text-panel p {
  margin: 0;
  color: var(--soft);
}

.detail-side {
  position: sticky;
  top: 112px;
  align-self: start;
}

.side-poster {
  display: block;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.side-panel {
  padding: 20px;
}

.side-panel a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.side-panel a:last-child {
  border-bottom: 0;
}

.side-panel span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-panel em {
  color: var(--muted);
  font-style: normal;
}

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

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 34px 0;
}

.footer-grid p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 14px;
  color: var(--soft);
}

.is-hidden {
  display: none !important;
}

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

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

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

  .detail-side {
    position: static;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 780px) {
  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .menu-button {
    display: inline-block;
  }

  .sub-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 12px;
  }

  .sub-nav a {
    white-space: nowrap;
  }

  .hero-carousel {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 66px 0 88px;
  }

  .hero-poster {
    width: min(340px, 100%);
    transform: none;
  }

  .search-panel,
  .page-hero,
  .section-head,
  .footer-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .rank-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .rank-thumb img {
    width: 110px;
  }

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

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

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .movie-grid.small-grid,
  .rank-strip-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-thumb img {
    width: 100%;
    max-height: 420px;
  }

  .page-hero,
  .detail-copy,
  .text-panel {
    padding: 22px;
  }
}
