* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #1a1f2e;
  --bg-deep: #111827;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(36, 59, 83, 0.78);
  --line: rgba(255, 255, 255, 0.10);
  --text: #f8fafc;
  --muted: #aeb7c4;
  --soft: #6b7280;
  --brand: #e8a84d;
  --brand-strong: #d4941f;
  --brand-soft: #eec078;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 14% 8%, rgba(232, 168, 77, 0.20), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(51, 78, 104, 0.36), transparent 34%),
    linear-gradient(180deg, #1a1f2e 0%, #111827 45%, #0b1020 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  box-shadow: 0 10px 32px rgba(232, 168, 77, 0.28);
}

.brand-text {
  font-size: clamp(22px, 3vw, 30px);
  background: linear-gradient(90deg, var(--brand), #f8e0b4, var(--brand-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #d4d9e2;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover {
  color: var(--brand);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 8px 16px 16px;
  background: rgba(17, 24, 39, 0.92);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.03);
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.08);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.74) 46%, rgba(17, 24, 39, 0.36) 78%),
    linear-gradient(0deg, rgba(17, 24, 39, 1) 0%, rgba(17, 24, 39, 0.10) 52%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1280px) / 2));
  padding-top: 108px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(232, 168, 77, 0.34);
  color: var(--brand-soft);
  border-radius: 999px;
  background: rgba(232, 168, 77, 0.10);
  font-weight: 700;
  font-size: 14px;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-lead {
  color: #d4d9e2;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-primary {
  color: #111827;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  box-shadow: 0 16px 34px rgba(232, 168, 77, 0.25);
}

.hero-meta,
.meta-line,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hero-meta span,
.meta-line span,
.breadcrumb a,
.breadcrumb span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.58);
  backdrop-filter: blur(14px);
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--brand);
}

.section {
  padding: 72px 0 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card,
.category-card,
.horizontal-card,
.info-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(232, 168, 77, 0.45);
  background: rgba(255, 255, 255, 0.09);
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--panel-strong);
}

.compact-card .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

.movie-card:hover img,
.horizontal-card:hover img {
  transform: scale(1.08);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.86) 100%);
}

.play-ring {
  position: absolute;
  inset: auto 16px 16px auto;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: var(--brand);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-ring {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge,
.list-rank {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h2,
.horizontal-card h2,
.category-card h2,
.info-panel h2 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p,
.horizontal-card p,
.category-card p,
.info-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #e7ebf2;
  background: rgba(36, 59, 83, 0.72);
  font-size: 12px;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 280px);
  gap: 20px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.rail > * {
  scroll-snap-align: start;
}

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

.category-card {
  display: block;
  padding: 22px;
  min-height: 184px;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(232, 168, 77, 0.42);
  background: rgba(255, 255, 255, 0.09);
}

.category-card strong {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
}

.page-hero,
.detail-hero {
  padding: 84px 0 34px;
}

.page-hero-inner,
.detail-hero-inner {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 54px);
  background:
    radial-gradient(circle at 78% 0%, rgba(232, 168, 77, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(36, 59, 83, 0.72), rgba(17, 24, 39, 0.64));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 200px;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 650;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(17, 24, 39, 0.72);
  padding: 12px 14px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(232, 168, 77, 0.62);
}

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

.horizontal-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.horizontal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 168, 77, 0.45);
}

.horizontal-card a {
  display: grid;
  grid-template-columns: 146px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.horizontal-card img {
  width: 146px;
  height: 92px;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.3s ease;
}

.horizontal-card .list-rank {
  position: static;
  grid-row: 1;
  align-self: start;
}

.player-section {
  padding-top: 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1px) brightness(0.58);
}

.player-button {
  position: relative;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  padding: 16px 28px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 20px 44px rgba(232, 168, 77, 0.30);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #fff;
  background: rgba(17, 24, 39, 0.82);
}

.player-message.is-visible {
  display: block;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.detail-panel {
  padding: 26px;
}

.detail-panel p {
  color: #d4d9e2;
  line-height: 1.9;
}

.detail-side {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 18px;
}

.detail-side .movie-card .poster-wrap {
  aspect-ratio: 16 / 9;
}

.no-results {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: var(--panel);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.78);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0 28px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-grid p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

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

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

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

  .detail-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .menu-button {
    display: inline-flex;
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    padding-top: 88px;
  }

  .hero-slide::before {
    background:
      linear-gradient(0deg, rgba(17, 24, 39, 1) 0%, rgba(17, 24, 39, 0.72) 52%, rgba(17, 24, 39, 0.28) 100%);
  }

  .card-grid,
  .category-grid,
  .footer-grid,
  .filter-bar,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .horizontal-card a {
    grid-template-columns: 116px 1fr;
    gap: 12px;
  }

  .horizontal-card img {
    width: 116px;
    height: 84px;
  }
}

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

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

  .card-grid {
    gap: 16px;
  }

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

  .btn {
    width: 100%;
  }
}
