:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(245, 158, 11, 0.36);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.16);
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.14), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(239, 68, 68, 0.13), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.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);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316 48%, #ef4444);
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 15px;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--text);
  background: rgba(245, 158, 11, 0.14);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  font-size: 14px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slider {
  position: relative;
  min-height: calc(100vh - 72px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
  align-items: center;
  gap: 64px;
  padding: 96px max(28px, calc((100vw - var(--max)) / 2)) 108px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
  opacity: 0.32;
}

.hero-overlay {
  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.42) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 42%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.64);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.primary-btn,
.ghost-btn,
.section-more,
.page-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
}

.ghost-btn,
.section-more,
.page-switch a {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.page-switch a:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 30px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  width: min(var(--max), calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

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

.hero-dot {
  width: 32px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 52px;
  background: var(--gold);
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
  pointer-events: auto;
}

.search-panel,
.page-hero,
.content-section,
.filter-bar {
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  margin-top: -36px;
  padding: 26px;
  position: relative;
  z-index: 5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.search-panel h2 {
  font-size: clamp(22px, 3vw, 34px);
}

.search-box,
.mini-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.7);
}

.search-box span,
.mini-search span {
  color: var(--gold);
  font-weight: 800;
}

.search-box input,
.mini-search input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.content-section {
  margin-top: 72px;
}

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

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 42px);
}

.section-more {
  min-width: max-content;
}

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

.category-tile {
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), transparent),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
  font-size: 14px;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.08)),
    rgba(15, 23, 42, 0.86);
}

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.92);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.7));
}

.year-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: rgba(251, 191, 36, 0.94);
  font-size: 12px;
  font-weight: 900;
}

.play-circle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111827;
  background: #f59e0b;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: block;
  min-height: 46px;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
}

.card-title:hover,
.ranking-title:hover {
  color: var(--gold);
}

.card-meta,
.card-desc,
.ranking-item p,
.page-hero p,
.footer-inner p,
.detail-copy p,
.info-card dd,
.breadcrumb {
  color: var(--muted);
}

.card-meta {
  margin: 7px 0 8px;
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  min-height: 26px;
  padding: 3px 9px;
  font-size: 12px;
}

.ranking-section .ranking-list {
  display: grid;
  gap: 14px;
}

.ranking-list.large {
  gap: 18px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 74px 58px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
}

.ranking-cover img {
  width: 74px;
  height: 104px;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-number {
  color: rgba(245, 158, 11, 0.38);
  font-size: 42px;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.ranking-title {
  display: inline-flex;
  margin-bottom: 6px;
  font-size: 19px;
  font-weight: 900;
}

.ranking-item p {
  margin: 0 0 10px;
  line-height: 1.7;
}

.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted-strong);
  font-size: 13px;
}

.page-main,
.detail-main {
  padding-bottom: 82px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 300px;
  margin-top: 38px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.18), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.64));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.chip-row {
  flex: 1;
}

.chip.active,
.chip:hover {
  color: #111827;
  border-color: transparent;
  background: var(--gold);
}

.mini-search {
  width: 320px;
}

.wide-search {
  width: 100%;
}

.page-switch {
  display: flex;
  gap: 10px;
}

.breadcrumb {
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.detail-layout {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.detail-primary,
.detail-aside,
.detail-copy,
.info-card,
.player-panel {
  min-width: 0;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #111827;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.22), rgba(2, 6, 23, 0.54) 34%, rgba(2, 6, 23, 0.1));
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 22px 52px rgba(245, 158, 11, 0.3);
  font-size: 34px;
}

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

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

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.lead-text {
  margin-top: 18px;
  color: var(--muted-strong) !important;
  font-size: 19px;
  line-height: 1.8;
}

.detail-tags {
  margin: 22px 0 28px;
}

.detail-copy h2,
.info-card h2 {
  margin: 30px 0 12px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.detail-copy p {
  font-size: 16px;
  line-height: 2;
}

.detail-aside {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 18px;
}

.detail-poster,
.info-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

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

.info-card {
  padding: 22px;
}

.info-card h2 {
  margin-top: 0;
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-card div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-card div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-card dt {
  color: var(--gold);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  line-height: 1.6;
}

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

.movie-card.compact .card-desc {
  display: none;
}

.movie-card.compact .card-title {
  min-height: 44px;
}

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

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

.footer-inner p {
  max-width: 620px;
  margin: 12px 0 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 10px;
  max-width: 420px;
}

.footer-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
}

.footer-links a:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

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

@media (max-width: 1180px) {
  .movie-grid,
  .movie-grid.wide,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-slide {
    gap: 38px;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  body.menu-open .mobile-nav {
    display: grid;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding-top: 62px;
    padding-bottom: 112px;
  }

  .hero-poster {
    display: none;
  }

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

  .search-panel {
    display: grid;
  }

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

  .detail-aside {
    position: static;
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .mini-search {
    width: 100%;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .brand-text {
    font-size: 18px;
  }

  .hero,
  .hero-slider {
    min-height: calc(100vh - 64px);
  }

  .hero h1 {
    font-size: clamp(36px, 13vw, 58px);
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-controls {
    bottom: 22px;
  }

  .hero-arrow {
    display: none;
  }

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

  .category-grid {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .ranking-number {
    grid-column: 1;
    grid-row: 1;
    width: 62px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
  }

  .ranking-cover {
    display: none;
  }

  .detail-copy,
  .page-hero,
  .search-panel {
    padding: 22px;
    border-radius: 22px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.wide,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .card-title {
    min-height: auto;
  }
}
