:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(245, 158, 11, 0.22);
  --muted-line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --soft: #cbd5e1;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --amber-deep: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.12), transparent 28rem),
    radial-gradient(circle at 82% 8%, rgba(59, 130, 246, 0.10), transparent 24rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark,
.footer-brand span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  border-radius: 999px;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.48);
}

.brand-text {
  font-size: 26px;
  background: linear-gradient(90deg, #fbbf24, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--soft);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.74);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fbbf24;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-links {
  display: grid;
  gap: 12px;
  padding: 18px 0 22px;
}

.mobile-links a {
  color: var(--soft);
  font-weight: 700;
}

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

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  transition: transform 4.8s ease;
}

.hero-slide.active .hero-backdrop {
  transform: scale(1);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.38) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 72vh;
  padding: 8rem 0 5.5rem;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-kicker span,
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 999px;
  padding: 7px 12px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 30px;
  color: var(--soft);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  font-weight: 900;
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.26);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 48px rgba(245, 158, 11, 0.35);
}

.btn.ghost {
  border: 1px solid var(--line);
  color: #fbbf24;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: none;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

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

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

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

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.6);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 38px;
  background: var(--amber);
}

.content-section {
  padding: 72px 0 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  background: linear-gradient(90deg, #fbbf24, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-heading p {
  margin: 8px 0 0;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
}

.section-heading span {
  flex: 1;
  height: 4px;
  min-width: 80px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.55), transparent);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--muted-line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.16);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.56);
  box-shadow: 0 22px 58px rgba(245, 158, 11, 0.13);
}

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

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

.movie-card:hover img,
.rail-card:hover img,
.category-card:hover img {
  transform: scale(1.07);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.03) 58%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: var(--amber);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.type-chip,
.year-chip,
.rank-badge {
  position: absolute;
  z-index: 4;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
}

.type-chip {
  left: 12px;
  top: 12px;
  background: rgba(245, 158, 11, 0.88);
}

.year-chip {
  right: 12px;
  top: 12px;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  min-width: 34px;
  text-align: center;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 19px;
  line-height: 1.32;
}

.card-body h2 a:hover {
  color: #fbbf24;
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  margin: 0 0 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(16px);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  padding: 0 14px;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.68);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border: 1px solid var(--muted-line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.45s ease;
}

.category-card div {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 210px;
  padding: 22px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.18));
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

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

.rail-wrap {
  position: relative;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  overflow: hidden;
  border: 1px solid var(--muted-line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.rail-card img {
  width: 100%;
  height: 146px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rail-card strong,
.rail-card span {
  display: block;
  padding: 0 14px;
}

.rail-card strong {
  padding-top: 14px;
  color: #fff;
  font-size: 17px;
}

.rail-card span {
  padding-top: 8px;
  padding-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.rail-btn {
  position: absolute;
  top: 46%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  cursor: pointer;
}

.rail-btn.left {
  left: -12px;
}

.rail-btn.right {
  right: -12px;
}

.page-banner {
  padding: 72px 0 36px;
  background:
    radial-gradient(circle at 14% 0%, rgba(245, 158, 11, 0.16), transparent 26rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0));
}

.page-banner h1 {
  max-width: 880px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-banner p {
  max-width: 780px;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.crumbs {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.crumbs a {
  color: #fbbf24;
}

.detail-hero {
  padding: 46px 0 0;
}

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

.player-card,
.detail-panel,
.text-panel {
  overflow: hidden;
  border: 1px solid var(--muted-line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.player-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16), rgba(2, 6, 23, 0.28));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.42);
  font-size: 34px;
}

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

.player-caption {
  padding: 18px 20px;
  color: var(--soft);
}

.detail-panel {
  padding: 24px;
}

.detail-panel img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-panel h1 {
  margin: 20px 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.13);
  font-size: 13px;
  font-weight: 700;
}

.text-panel {
  margin-top: 26px;
  padding: 26px;
}

.text-panel h2 {
  margin: 0 0 14px;
  color: #fbbf24;
  font-size: 26px;
}

.text-panel p {
  margin: 0 0 22px;
  color: var(--soft);
  line-height: 1.92;
  font-size: 17px;
}

.text-panel p:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 88px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-brand {
  color: #fbbf24;
  font-size: 22px;
}

.site-footer p {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fbbf24;
  font-size: 19px;
}

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

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

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

.footer-bottom {
  padding: 18px 0 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.28);
}

.back-top.show {
  display: grid;
}

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

@media (max-width: 1080px) {
  .movie-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;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-panel.open {
    display: block;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .section-heading span {
    width: 100%;
  }
}

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

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

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    padding-bottom: 4.5rem;
  }

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

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

  .rail-card {
    flex-basis: 220px;
  }

  .page-banner {
    padding-top: 48px;
  }
}
