:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.82);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --panel-border: rgba(255, 255, 255, 0.10);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-soft: #94a3b8;
  --brand: #f59e0b;
  --brand-light: #fde68a;
  --brand-strong: #ea580c;
  --blue: #2563eb;
  --blue-deep: #172554;
  --green: #22c55e;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.28);
  --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.18);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at 18% 8%, rgba(37, 99, 235, 0.26), transparent 34%),
    radial-gradient(circle at 82% 6%, rgba(245, 158, 11, 0.16), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.90), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

.navbar {
  width: min(1280px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand-light), var(--brand), var(--brand-strong));
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.46);
}

.brand-text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: transparent;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: #fff;
}

main {
  min-height: 70vh;
}

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

.section {
  padding: 68px 0 0;
}

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

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--brand-light);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h1,
.section h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.section h2,
.page-hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.section-subtitle,
.page-hero p,
.detail-intro {
  color: var(--text-muted);
  line-height: 1.9;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-track {
  position: relative;
  min-height: 650px;
}

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.48) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 52px;
  padding: 48px 0;
}

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

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.card-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.btn-primary,
.btn-secondary,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b, #fb923c);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.30);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
}

.btn-soft {
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.72);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-soft:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow-card);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.hero-card-info strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

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

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  background: var(--panel-bg);
  box-shadow: var(--shadow-card);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  outline: none;
  color: #fff;
  background: rgba(15, 23, 42, 0.86);
  padding: 0 14px;
}

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

.category-grid,
.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card,
.category-card,
.rank-row,
.related-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.92));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-row:hover,
.related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.35), 0 0 26px rgba(245, 158, 11, 0.12);
}

.poster {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.movie-card .poster img,
.related-card .poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster img,
.related-card:hover .poster img {
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #111827;
  background: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.heat {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-meta,
.card-meta,
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.movie-desc {
  min-height: 48px;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.category-card {
  min-height: 180px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.category-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.75;
}

.category-count {
  margin-top: 22px;
  color: var(--brand-light);
  font-weight: 900;
}

.page-hero {
  padding: 70px 0 36px;
}

.page-hero-box {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.48), rgba(15, 23, 42, 0.92));
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 6vw, 58px);
}

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

.rank-row {
  min-height: 132px;
  display: grid;
  grid-template-columns: 58px 92px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.rank-num {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-weight: 1000;
}

.rank-row img {
  width: 92px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-row h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

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

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

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow-card);
}

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

.detail-title {
  padding: 30px;
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-card);
}

.detail-title h1 {
  margin-top: 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
}

.detail-intro {
  margin: 18px 0 0;
  font-size: 18px;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow-card);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.16), rgba(2, 6, 23, 0.80)), var(--player-poster);
  background-size: cover;
  background-position: center;
}

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

.play-mark {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b, #fb923c);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.40);
  font-size: 34px;
  transform: translateZ(0);
}

.content-panel {
  padding: 30px;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-card);
}

.content-panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.content-panel p {
  margin: 0;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 2;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.75fr);
  gap: 24px;
}

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

.related-card .movie-body h3 {
  font-size: 15px;
}

.footer {
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.82);
}

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

.footer strong {
  color: #fff;
}

.no-results {
  display: none;
  padding: 26px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  color: var(--text-muted);
  background: var(--panel-bg);
  text-align: center;
}

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

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

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

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--panel-border);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
  }

  .nav-links.open {
    display: flex;
  }

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

  .hero-card {
    max-width: 360px;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .navbar,
  .container,
  .hero-content,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

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

  .hero-carousel,
  .hero-track,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    align-content: center;
    gap: 26px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 42px;
  }

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

  .rank-row {
    grid-template-columns: 46px 78px 1fr;
    gap: 12px;
  }

  .rank-row img {
    width: 78px;
    height: 98px;
  }

  .detail-title,
  .content-panel {
    padding: 22px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
