:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(127, 29, 29, 0.42);
  --line-soft: rgba(148, 163, 184, 0.14);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --amber-soft: #fde68a;
  --red: #dc2626;
  --red-dark: #7f1d1d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(127, 29, 29, 0.35), transparent 34rem),
    radial-gradient(circle at 82% 10%, rgba(245, 158, 11, 0.13), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: clamp(1.06rem, 2vw, 1.42rem);
  color: var(--amber-soft);
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--red));
  color: #fff;
  box-shadow: 0 12px 34px rgba(220, 38, 38, 0.32);
  transform: translateZ(0);
  transition: transform 220ms ease;
}

.brand:hover .brand-mark {
  transform: rotate(10deg) scale(1.04);
}

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

.desktop-nav a,
.mobile-nav a {
  color: #e5e7eb;
  font-weight: 700;
  transition: color 180ms ease, transform 180ms ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--amber);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  padding: 10px 24px 18px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.94);
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

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

.hero-track {
  position: relative;
  height: 72vh;
  min-height: 620px;
}

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

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

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

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 72% 22%, rgba(245, 158, 11, 0.23), transparent 30rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.6) 100%);
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 0 0 92px;
}

.hero-panel {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px;
  margin-bottom: 18px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
  color: var(--amber-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero h1,
.hero h2,
.page-head h1,
.detail-title h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 860px;
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  text-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
}

.hero h2 {
  margin-top: 16px;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  color: var(--amber-soft);
}

.hero p {
  max-width: 730px;
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.22rem);
}

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

.primary-button,
.secondary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.primary-button {
  background: linear-gradient(90deg, var(--amber), var(--red));
  color: #fff;
  box-shadow: 0 18px 46px rgba(220, 38, 38, 0.34);
}

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

.primary-button:hover {
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.28);
}

.secondary-button {
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  border: 1px solid rgba(245, 158, 11, 0.26);
}

.ghost-button {
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  border: 1px solid var(--line-soft);
}

.text-button {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--amber-soft);
}

.hero-search {
  display: flex;
  width: min(100%, 620px);
  margin-top: 24px;
  padding: 6px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 0 18px;
}

.hero-search button {
  white-space: nowrap;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 180ms ease, transform 180ms ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.82);
  transform: translateY(-50%) scale(1.04);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: var(--amber);
}

.main-content {
  padding: 64px 0 88px;
}

.section {
  margin-bottom: 76px;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--amber);
  font-weight: 900;
}

.section-heading h2,
.section-title {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.15;
}

.section-heading p,
.page-head p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

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

.movie-card-link {
  display: grid;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.movie-card-link:hover {
  transform: translateY(-5px);
  background: var(--bg-card-strong);
  border-color: rgba(245, 158, 11, 0.28);
  box-shadow: 0 28px 70px rgba(127, 29, 29, 0.28);
}

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(127, 29, 29, 0.6));
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

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

.movie-poster::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent);
  pointer-events: none;
}

.duration-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  bottom: auto;
  top: 10px;
  background: linear-gradient(135deg, var(--amber), var(--red));
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-card-topline,
.movie-card-footer,
.detail-meta,
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 0.86rem;
}

.movie-card-topline span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.movie-card h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.08rem;
  line-height: 1.38;
  display: -webkit-box;
  min-height: 2.76em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 180ms ease;
}

.movie-card-link:hover h3 {
  color: var(--amber-soft);
}

.movie-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.62;
  display: -webkit-box;
  min-height: 4.48em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.movie-card-footer {
  justify-content: space-between;
  color: #e2e8f0;
}

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

.tag-row span,
.info-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.11);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.16);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.category-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 82% 16%, rgba(245, 158, 11, 0.16), transparent 12rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, border-color 180ms ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1.18rem;
  color: #fff;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.mini-grid {
  display: grid;
  gap: 12px;
}

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mini-card:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(30, 41, 59, 0.88);
}

.mini-card img {
  width: 116px;
  height: 74px;
  object-fit: cover;
  background: rgba(127, 29, 29, 0.3);
}

.mini-card-body {
  min-width: 0;
  padding: 10px 10px 10px 0;
}

.mini-card strong,
.mini-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card strong {
  color: #fff;
  font-size: 0.95rem;
}

.mini-card em {
  margin-top: 4px;
  color: var(--subtle);
  font-style: normal;
  font-size: 0.8rem;
}

.mini-rank {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  min-width: 28px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--red));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.page-head {
  padding: 60px 0 34px;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 18% 10%, rgba(127, 29, 29, 0.25), transparent 26rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.42), transparent);
}

.page-head h1 {
  max-width: 900px;
  font-size: clamp(2rem, 5vw, 4.1rem);
}

.breadcrumb {
  margin-bottom: 16px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
}

.filter-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
}

.filter-field input,
.filter-field select {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  outline: 0;
  background: rgba(2, 6, 23, 0.76);
  color: #fff;
  padding: 0 16px;
}

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

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

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

.player-card,
.detail-side,
.content-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.3)),
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.22), transparent 28rem);
  color: #fff;
  cursor: pointer;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-ring {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 20px 60px rgba(220, 38, 38, 0.42);
  font-size: 2rem;
}

.player-card-body,
.detail-side,
.content-card {
  padding: 24px;
}

.detail-title h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.detail-title p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.detail-meta {
  margin-top: 18px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

.info-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.info-row span {
  color: var(--subtle);
}

.info-row strong {
  color: #fff;
  font-weight: 800;
}

.prose-grid {
  display: grid;
  gap: 24px;
  margin-top: 36px;
}

.content-card h2 {
  margin: 0 0 12px;
  color: var(--amber-soft);
  font-size: 1.38rem;
}

.content-card p {
  margin: 0;
  color: #e2e8f0;
}

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

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.8fr 1fr;
  gap: 28px;
  padding: 48px 0 34px;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  margin: 0;
  color: var(--subtle);
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--amber-soft);
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.footer-bottom {
  padding: 18px 0 26px;
  color: var(--subtle);
  text-align: center;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid.compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

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

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

  .menu-button {
    display: block;
  }

  .hero-track {
    min-height: 660px;
  }

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

  .hero-control {
    display: none;
  }

  .hero-search {
    border-radius: 24px;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 44px;
  }

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

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, var(--container));
  }

  .header-inner {
    height: 62px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .hero-track {
    height: 76vh;
    min-height: 610px;
  }

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

  .hero-actions,
  .detail-actions {
    display: grid;
  }

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

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

  .movie-card p {
    min-height: auto;
  }

  .mini-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .mini-card img {
    width: 104px;
    height: 70px;
  }

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

  .player-card-body,
  .detail-side,
  .content-card {
    padding: 18px;
  }

  .play-ring {
    width: 72px;
    height: 72px;
  }
}
