:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --orange: #f97316;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.16), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.17), transparent 34%),
    linear-gradient(180deg, #020617 0%, #07111f 46%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.35), transparent);
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

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

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

.brand-name,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(90deg, var(--amber), var(--orange), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark,
.brand-spark {
  color: var(--amber);
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.45));
  transition: transform 0.45s ease;
}

.brand:hover .brand-mark {
  transform: rotate(180deg);
}

.brand:hover .brand-spark {
  transform: rotate(-180deg);
}

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

.nav-link {
  color: #d1d5db;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #f8fafc;
}

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

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.85s ease, transform 1.15s ease;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.35) 100%),
    linear-gradient(0deg, #020617 0%, transparent 44%);
}

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

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  min-height: calc(70vh - 68px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 72px 0 86px;
}

.hero-copy {
  max-width: 660px;
}

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero h1 span,
.gradient-text {
  background: linear-gradient(90deg, #fbbf24, #fb923c, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p,
.page-hero p,
.detail-lead {
  max-width: 720px;
  margin: 0;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.detail-actions,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #111827;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.26);
}

.btn-secondary {
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  width: min(var(--max), calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 40px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--amber), var(--blue));
}

.main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 88px;
}

.page-hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 150px 0 44px;
}

.page-hero.compact {
  padding-bottom: 16px;
}

.section {
  margin-top: 58px;
}

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

.section-heading h2 {
  margin: 8px 0 4px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: var(--amber);
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card,
.category-card,
.detail-panel,
.player-panel,
.search-box,
.rank-list-item {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.58));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  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.34);
  box-shadow: 0 30px 78px rgba(0, 0, 0, 0.5);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.38), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.36), transparent 38%),
    linear-gradient(145deg, #0f172a, #020617);
}

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

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  font-size: 12px;
  font-weight: 900;
}

.movie-card-body {
  padding: 16px;
}

.card-meta,
.rank-info,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  position: relative;
}

.card-meta span + span::before,
.detail-meta span + span::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.64);
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h2 a:hover,
.rank-title:hover,
.breadcrumb a:hover {
  color: var(--amber);
}

.movie-card p {
  min-height: 50px;
  margin: 0;
  color: var(--soft);
  font-size: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.category-card {
  min-height: 196px;
  padding: 22px;
  border-radius: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.42);
}

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

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

.category-card .mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card .mini-links a {
  color: #dbeafe;
  font-size: 12px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: min(760px, 100%);
  padding: 12px;
  border-radius: 22px;
}

.search-input {
  min-height: 46px;
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  font-size: 15px;
}

.search-input::placeholder {
  color: #64748b;
}

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

.rank-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 15px 18px;
  border-radius: 18px;
}

.rank-title {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.list-rank {
  display: inline-flex;
  width: 36px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  font-size: 12px;
  font-weight: 900;
}

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

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #f8fafc;
  background:
    radial-gradient(circle at 50% 46%, rgba(245, 158, 11, 0.25), transparent 22%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.84));
  cursor: pointer;
}

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

.play-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.36);
  font-size: 30px;
}

.play-title {
  font-size: 15px;
  font-weight: 900;
}

.detail-panel {
  border-radius: 26px;
  padding: 22px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.38), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.36), transparent 38%),
    linear-gradient(145deg, #0f172a, #020617);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-panel h2,
.article-block h2 {
  margin: 22px 0 10px;
  font-size: 24px;
}

.detail-panel p,
.article-block p {
  margin: 0;
  color: var(--soft);
}

.article-block {
  margin-top: 26px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.54);
}

.breadcrumb {
  margin-bottom: 18px;
}

.filter-empty {
  display: none;
  margin: 28px 0 0;
  color: var(--muted);
}

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

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

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

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

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

  .detail-panel {
    order: 2;
  }
}

@media (max-width: 740px) {
  .main-nav {
    height: 62px;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .nav-link {
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
  }

  .nav-link:last-child {
    border-bottom: 0;
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    min-height: 572px;
    padding: 80px 0 76px;
  }

  .hero-actions,
  .detail-actions,
  .search-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

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

  .section-heading,
  .rank-list-item,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .page-hero {
    padding-top: 118px;
  }

  .main {
    padding-top: 44px;
  }
}
