:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.74);
  --line: rgba(59, 130, 246, 0.28);
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 5%, rgba(37, 99, 235, 0.22), transparent 30rem),
    radial-gradient(circle at 85% 16%, rgba(245, 158, 11, 0.13), transparent 24rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark,
.footer-brand span {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 0.72rem;
  color: #bfdbfe;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #dbeafe;
  font-size: 0.94rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111827;
  background: var(--amber-2);
  transform: translateY(-1px);
}

.nav-link-soft {
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.28);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #dbeafe;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

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

.hero-slide::before,
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-slide::before {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.47), rgba(2, 6, 23, 0.85));
}

.hero-slide::after {
  background: linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 54%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding-top: 90px;
  padding-bottom: 74px;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber-2);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 6vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(1.45rem, 3vw, 2.6rem);
  line-height: 1.18;
  color: #f8fafc;
}

.hero-desc {
  max-width: 780px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.info-chip {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.26);
  border: 1px solid rgba(96, 165, 250, 0.24);
  color: #bfdbfe;
  font-size: 0.88rem;
}

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

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

.button-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.button-secondary {
  color: #dbeafe;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.66);
}

.button-ghost {
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 42px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--amber-2);
}

.section {
  padding: 58px 0;
}

.section-tight {
  padding: 36px 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--amber-2);
  font-weight: 800;
}

.section-title {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.2;
}

.section-lead {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 64, 175, 0.28));
  box-shadow: var(--shadow);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

.search-input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.6);
  outline: none;
}

.search-input:focus {
  border-color: var(--amber-2);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chip {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 8px 13px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #111827;
  background: var(--amber-2);
  border-color: var(--amber-2);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.feature-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: start;
}

.movie-card,
.category-card,
.panel-card,
.detail-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.3);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.74);
  box-shadow: 0 20px 50px rgba(30, 64, 175, 0.28);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #020617;
}

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

.movie-card:hover img {
  transform: scale(1.08);
  filter: saturate(1.12);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.82));
}

.poster-year,
.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 5px 8px;
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.poster-year {
  left: 10px;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
}

.poster-type {
  right: 10px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
  top: auto;
  right: 10px;
  bottom: 10px;
  color: #111827;
  background: var(--amber-2);
}

.poster-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card-body h3 {
  margin: 0 0 10px;
  min-height: 2.8em;
  color: #f8fafc;
  font-size: 1.02rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  margin: 0 0 14px;
  min-height: 3.1em;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  gap: 7px;
  margin-bottom: 12px;
}

.movie-meta span {
  padding: 5px 8px;
  font-size: 0.75rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  font-size: 0.74rem;
}

.category-card {
  display: block;
  padding: 26px;
  overflow: hidden;
  position: relative;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: auto -35% -45% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 70%);
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.7);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.28rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.panel-card {
  padding: 24px;
}

.rank-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-row {
  border-radius: 16px;
  overflow: hidden;
}

.rank-row a {
  display: grid;
  grid-template-columns: 52px 76px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.rank-row img {
  width: 76px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-number {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #111827;
  background: var(--amber-2);
  font-weight: 900;
}

.rank-main {
  min-width: 0;
}

.rank-main strong {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-main em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
}

.rank-score {
  color: var(--amber-2);
  font-weight: 900;
  text-align: right;
}

.page-hero {
  padding: 62px 0 34px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(30, 64, 175, 0.22), rgba(6, 182, 212, 0.08));
}

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

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

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  align-items: start;
  gap: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #111827;
  background: #000;
  cursor: pointer;
  padding: 0;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.24));
}

.player-cover.is-hidden {
  display: none;
}

.play-circle {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.32);
  font-size: 2rem;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.detail-title {
  margin: 24px 0 14px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.16;
}

.detail-meta {
  margin-bottom: 22px;
}

.prose {
  color: #dbeafe;
  line-height: 1.92;
}

.prose h2 {
  margin: 26px 0 10px;
  color: #f8fafc;
  font-size: 1.32rem;
}

.prose p {
  margin: 0 0 16px;
}

.side-poster {
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 18px;
  background: #020617;
}

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

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

.related-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.28);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
  border-color: var(--amber-2);
  transform: translateX(3px);
}

.related-item img {
  width: 82px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
}

.related-item strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.related-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.empty-state {
  display: none;
  padding: 44px 20px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 46px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1.2rem;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.footer-links {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--amber-2);
}

.footer-bottom {
  padding: 16px;
  color: var(--muted-2);
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

  .menu-toggle {
    display: flex;
  }

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

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

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

  .hero,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content {
    padding-bottom: 92px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
  }

  .section-header,
  .search-row {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

  .movie-card-body h3 {
    font-size: 0.96rem;
  }

  .rank-row a {
    grid-template-columns: 42px 66px minmax(0, 1fr);
  }

  .rank-row img {
    width: 66px;
    height: 48px;
  }

  .rank-score {
    display: none;
  }

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

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

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

  .button-primary,
  .button-secondary,
  .button-ghost {
    width: 100%;
  }
}
