:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #1e293b;
  --bg-card-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(226, 232, 240, 0.28);
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #ffffff;
  --accent-dark: #0f172a;
  --brand: #38bdf8;
  --brand-2: #818cf8;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 30rem),
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.13), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: 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: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.28);
}

.brand-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--text-soft);
  font-size: 15px;
  white-space: nowrap;
}

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.8);
  color: white;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: white;
  border-radius: 999px;
}

.mobile-menu {
  width: min(100% - 32px, var(--max));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  color: var(--text-soft);
  border-radius: 12px;
}

.mobile-link:hover {
  background: rgba(148, 163, 184, 0.12);
  color: white;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

img.is-missing-image {
  opacity: 0;
}

.poster-wrap,
.hero-poster,
.player-frame {
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(129, 140, 248, 0.16)),
    #111827;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #020617 6%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.12)),
    linear-gradient(to right, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.1) 70%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding-top: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 48px;
}

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

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: #bae6fd;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: white;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-copy > p:not(.hero-kicker) {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 19px;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-soft);
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: white;
  color: #0f172a;
}

.btn-primary:hover {
  background: #e2e8f0;
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.45);
  color: white;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.66);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 34px;
  background: white;
}

.page-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 110px 0 64px;
}

.home-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.content-section {
  margin-bottom: 70px;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: white;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.section-heading span {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
}

.section-more {
  flex: 0 0 auto;
  color: #bae6fd;
  font-weight: 700;
}

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

.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: rgba(30, 41, 59, 0.82);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.14);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(226, 232, 240, 0.36);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

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

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.14), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}

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

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 22px;
  transform: translate(-50%, -50%) scale(0.75);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

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

.meta-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.66);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(251, 113, 133, 0.9);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 17px;
  line-height: 1.36;
}

.movie-info h3 a:hover {
  color: #bae6fd;
}

.movie-info p {
  min-height: 45px;
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.9)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.24), transparent 14rem);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(226, 232, 240, 0.34);
}

.category-count {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  font-size: 12px;
  font-weight: 800;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p,
.category-card em {
  color: var(--text-muted);
  font-size: 14px;
  font-style: normal;
}

.ranking-section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

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

.ranking-list li a {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.72);
}

.ranking-list strong {
  color: #fda4af;
  font-size: 22px;
  font-style: italic;
}

.ranking-list em {
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 12px;
  margin: 24px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.75);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(15, 23, 42, 0.92);
  color: white;
  padding: 0 14px;
}

.result-count {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--text-muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: white;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side,
.text-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.detail-main {
  overflow: hidden;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: black;
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: black;
}

.player-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: none;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.58)),
    transparent;
  color: white;
  cursor: pointer;
}

.player-play span {
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

.player-frame.is-playing .player-play {
  opacity: 0;
  pointer-events: none;
}

.detail-body {
  padding: 28px;
}

.detail-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--text-soft);
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

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

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

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

.detail-side {
  padding: 18px;
}

.side-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.side-card:last-child {
  border-bottom: none;
}

.side-card img {
  width: 96px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.side-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

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

.footer-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 38px 0 18px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p,
.copyright {
  color: var(--text-muted);
}

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

.copyright {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 0 0 32px;
  font-size: 13px;
}

.empty-state {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-muted);
  text-align: center;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 680px;
    height: 86vh;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 92px;
    align-content: center;
  }

  .hero-poster {
    width: min(280px, 70vw);
    margin: 0 auto;
    order: -1;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .ranking-list li a {
    grid-template-columns: 44px 1fr;
  }

  .ranking-list em {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 18px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-copy > p:not(.hero-kicker) {
    font-size: 16px;
  }

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

  .detail-body,
  .text-panel {
    padding: 20px;
  }
}
