:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-panel: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --orange: #fb923c;
  --orange-strong: #f97316;
  --red: #dc2626;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #111827 52%, #431407);
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 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 12px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
  transition: transform 0.25s ease;
}

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

.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fdba74, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-links a {
  color: var(--muted-2);
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--orange);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 290px;
}

.nav-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  outline: 0;
  padding: 10px 14px;
}

.nav-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}

.nav-search button,
.primary-btn,
.secondary-btn,
.section-more,
.category-pill,
.start-play {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.nav-search button,
.primary-btn,
.start-play {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-strong), var(--red));
  box-shadow: 0 15px 30px rgba(220, 38, 38, 0.22);
}

.nav-search button {
  padding: 10px 16px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.76);
  border-radius: 12px;
  padding: 8px 11px;
}

.main-content {
  padding-top: 64px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(249, 115, 22, 0.16), transparent 22rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 40%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, transparent 28%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 70px 0 56px;
}

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

.eyebrow,
.badge-line span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 12px;
}

.hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 640px;
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta,
.detail-meta,
.card-actions,
.category-strip,
.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.primary-btn,
.secondary-btn,
.section-more,
.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.section-more:hover,
.category-pill:hover,
.start-play:hover {
  transform: translateY(-2px);
}

.secondary-btn,
.section-more,
.category-pill {
  color: #fff;
  border: 1px solid rgba(251, 146, 60, 0.35);
  background: rgba(15, 23, 42, 0.72);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  padding: 0;
  opacity: 0.58;
}

.hero-dot.is-active {
  opacity: 1;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

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

.section {
  padding: 54px 0 18px;
}

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

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

.section-head p,
.page-title p,
.category-card p,
.detail-title p,
.detail-text p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-link:hover {
  transform: translateY(-8px);
  border-color: rgba(251, 146, 60, 0.48);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.poster-frame img {
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.card-link:hover img {
  transform: scale(1.08);
  opacity: 0.88;
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.3);
}

.movie-info {
  display: block;
  padding: 16px;
}

.movie-info strong {
  display: block;
  margin: 9px 0 6px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-info small,
.card-desc {
  display: block;
  color: var(--muted);
  line-height: 1.65;
}

.card-desc {
  margin-top: 10px;
  color: #cbd5e1;
}

.badge-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 25px;
}

.badge-line span {
  font-size: 12px;
  padding: 4px 9px;
  background: rgba(251, 146, 60, 0.22);
  border: 1px solid rgba(251, 146, 60, 0.22);
}

.category-strip {
  margin-top: 20px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(249, 115, 22, 0.22), transparent 12rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
}

.category-card span {
  display: inline-flex;
  margin-top: 18px;
  color: var(--orange);
  font-weight: 800;
}

.rank-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(5px);
  border-color: rgba(251, 146, 60, 0.44);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.rank-row strong,
.rank-row small {
  display: block;
}

.rank-row small {
  color: var(--muted);
  margin-top: 4px;
}

.rank-row em {
  color: #fdba74;
  font-style: normal;
  font-weight: 900;
}

.page-wrap {
  padding: 112px 0 42px;
}

.page-title {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 26px;
}

.page-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 14px;
  margin-bottom: 24px;
}

.detail-hero {
  padding-top: 64px;
  background:
    radial-gradient(circle at 82% 10%, rgba(249, 115, 22, 0.16), transparent 22rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 1));
}

.detail-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  padding: 48px 0 34px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow);
  background: #111827;
}

.detail-title {
  align-self: center;
}

.detail-title h1 {
  margin-bottom: 16px;
}

.detail-title p {
  max-width: 760px;
  font-size: 18px;
}

.detail-meta {
  margin: 20px 0 24px;
}

.meta-chip {
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(251, 146, 60, 0.22);
}

.player-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.26);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-frame video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.18), transparent 18rem),
    rgba(0, 0, 0, 0.42);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.24s ease;
}

.play-mask.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.start-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  font-size: 18px;
}

.detail-layout {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 20px 0 46px;
}

.detail-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
}

.detail-panel {
  padding: 26px;
}

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

.detail-text p {
  margin: 0 0 20px;
  color: #dbe4ef;
}

.side-panel {
  padding: 20px;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 9px;
  background: rgba(2, 6, 23, 0.34);
}

.side-thumb {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: #111827;
}

.side-list strong,
.side-list small {
  display: block;
}

.side-list small {
  color: var(--muted);
  margin-top: 4px;
}

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

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 26px;
}

.footer-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: start;
}

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

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

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.78);
}

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

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

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

  .category-cards,
  .rank-panel,
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .nav-shell {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 0 12px;
  }

  .site-header.is-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
  }

  .main-content,
  .detail-hero {
    padding-top: 64px;
  }

  .hero,
  .hero-inner {
    min-height: 620px;
  }

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

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

  .category-cards,
  .detail-shell,
  .page-tools {
    grid-template-columns: 1fr;
  }

  .detail-shell {
    padding-top: 30px;
  }

  .detail-poster {
    width: min(280px, 100%);
  }

  .footer-grid,
  .section-head {
    display: block;
  }

  .section-more {
    margin-top: 14px;
  }
}

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

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

  .rank-row em {
    grid-column: 2;
  }

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

  .hero-actions,
  .hero-meta,
  .detail-meta {
    align-items: stretch;
  }

  .primary-btn,
  .secondary-btn,
  .category-pill {
    width: 100%;
  }
}
