:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-soft: rgba(30, 41, 59, 0.88);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --brand: #f97316;
  --brand-2: #dc2626;
  --brand-3: #facc15;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(249, 115, 22, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(220, 38, 38, 0.14), transparent 28rem),
    linear-gradient(135deg, #020617 0%, #0f172a 45%, #111827 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.32);
  transform: translateZ(0);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-2deg);
}

.brand-text strong {
  display: block;
  font-size: 21px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fb923c, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.72);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links > a {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links > a:hover {
  color: #fb923c;
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.top-search input,
.filter-bar input,
.filter-bar select,
.search-panel input {
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  color: #f8fafc;
  outline: none;
  background: rgba(30, 41, 59, 0.92);
  padding: 0 14px;
}

.top-search input {
  width: 210px;
}

.top-search button,
.btn,
.play-button,
.search-panel button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 0 18px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.btn:hover,
.play-button:hover,
.search-panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.34);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(248, 250, 252, 0.18);
  box-shadow: none;
}

.page-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 640px;
  margin: 28px auto 44px;
  overflow: hidden;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(127, 29, 29, 0.38)),
    radial-gradient(circle at 85% 20%, rgba(250, 204, 21, 0.18), transparent 18rem);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 34px;
  align-items: center;
  padding: clamp(26px, 5vw, 68px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(2, 6, 23, 0.2) 100%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(220, 38, 38, 0.12)),
    linear-gradient(135deg, #111827, #0f172a);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.1) contrast(1.08);
}

.hero-bg img.is-missing {
  opacity: 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #fed7aa;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: clamp(16px, 1.8vw, 21px);
}

.hero-meta,
.detail-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.hero-meta span,
.detail-meta span,
.card-tags span,
.tags span,
.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 800;
}

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

.hero-poster .poster-frame {
  min-height: 520px;
  border-radius: 28px;
  transform: rotate(2deg);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
}

.hero-dots {
  position: absolute;
  left: clamp(26px, 5vw, 68px);
  bottom: 28px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.28);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.section {
  margin: 46px 0;
}

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

.section-head h2,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p,
.detail-copy .summary {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: #fb923c;
  font-weight: 900;
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px;
}

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 15%, rgba(251, 146, 60, 0.38), transparent 13rem),
    linear-gradient(135deg, #1e293b, #020617);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(2, 6, 23, 0.82) 100%);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

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

.poster-frame img.is-missing {
  opacity: 0;
}

.score {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  color: #111827;
  background: #facc15;
  padding: 4px 9px;
  font-size: 13px;
  line-height: 1;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #fb923c;
}

.meta,
.line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.line {
  margin-top: 9px;
  min-height: 42px;
}

.tags,
.category-grid,
.related-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.movie-card.hidden {
  display: none;
}

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

.category-card {
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 0%, rgba(249, 115, 22, 0.18), transparent 12rem),
    rgba(15, 23, 42, 0.78);
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.45);
}

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

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

.page-title {
  margin: 34px 0 26px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(20, 184, 166, 0.08)),
    rgba(15, 23, 42, 0.72);
}

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

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

.rank-no {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  font-weight: 950;
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-thumb img.is-missing {
  opacity: 0;
}

.rank-info h3 {
  margin: 0 0 6px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.rank-score {
  padding: 0 12px;
  color: #facc15;
  font-weight: 950;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin: 34px 0;
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 82% 14%, rgba(249, 115, 22, 0.18), transparent 20rem),
    rgba(15, 23, 42, 0.75);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.content-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.68);
  padding: clamp(20px, 3vw, 32px);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.content-panel p {
  margin: 0 0 16px;
  color: #cbd5e1;
}

.player-panel {
  margin: 36px 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.24);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.24), transparent 18rem),
    rgba(2, 6, 23, 0.55);
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-box.is-playing .player-mask {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  min-width: 146px;
  min-height: 54px;
  font-size: 18px;
}

.search-panel {
  grid-template-columns: minmax(260px, 1fr) 120px;
}

.search-results .movie-card {
  animation: rise 0.32s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.footer-grid,
.footer-copy {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 34px 0 24px;
}

.footer-grid p,
.footer-copy {
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a:hover {
  color: #fb923c;
}

.footer-copy {
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
}

@media (max-width: 920px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
    padding: 18px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .top-search {
    margin-left: 0;
  }

  .top-search input {
    width: 100%;
    flex: 1;
  }

  .hero,
  .hero-slide {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero-poster {
    display: none;
  }

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

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

  .detail-hero > .poster-frame {
    max-width: 320px;
  }

  .rank-item {
    grid-template-columns: 50px 70px 1fr;
  }

  .rank-score {
    grid-column: 2 / -1;
  }
}

@media (max-width: 620px) {
  .brand-text em {
    display: none;
  }

  .hero {
    border-radius: 24px;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .line {
    display: none;
  }

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

  .search-panel {
    grid-template-columns: 1fr;
  }
}
