:root {
  --bg: #070b18;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #aab4c6;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #facc15;
  --accent-strong: #f59e0b;
  --purple: #6d28d9;
  --radius: 22px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(124, 58, 237, 0.35), transparent 34rem),
    radial-gradient(circle at 90% 8%, rgba(250, 204, 21, 0.16), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #090d1a 45%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner,
main,
.hero-stage,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 74px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), #fff7aa);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(250, 204, 21, 0.24);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  color: #cbd5e1;
  font-style: normal;
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  color: #e2e8f0;
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111827;
  background: var(--accent);
}

.top-search,
.inline-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.inline-filter input {
  width: 230px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  padding: 11px 16px;
}

.top-search input:focus,
.inline-filter input:focus {
  border-color: rgba(250, 204, 21, 0.75);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.14);
}

.top-search button,
.inline-filter button,
.btn {
  border: 0;
  cursor: pointer;
  color: #111827;
  background: var(--accent);
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  transition: 0.25s ease;
}

.top-search button:hover,
.inline-filter button:hover,
.btn:hover {
  transform: translateY(-2px);
  background: #fde047;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 30px 0 18px;
}

.hero-stage {
  position: relative;
  min-height: 610px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(32, 13, 64, 0.72), rgba(2, 6, 23, 0.50)),
    var(--hero-image) center / cover no-repeat;
  transform: scale(1.04);
  filter: saturate(1.1);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(250, 204, 21, 0.20), transparent 22rem),
    radial-gradient(circle at 78% 58%, rgba(124, 58, 237, 0.30), transparent 24rem);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 46px;
  align-items: center;
  padding: 62px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: #111827;
  background: linear-gradient(90deg, #fde68a, var(--accent));
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.85;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  color: #fde68a;
  background: rgba(250, 204, 21, 0.11);
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

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

.btn.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  color: #111827;
  background: rgba(250, 204, 21, 0.92);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 16px 50px rgba(250, 204, 21, 0.25);
}

.hero-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 16px 0 4px;
}

.hero-prev,
.hero-next,
.hero-dot {
  cursor: pointer;
  border: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  transition: 0.25s ease;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 26px;
  height: 8px;
  border-radius: 999px;
}

.hero-dot.active,
.hero-prev:hover,
.hero-next:hover {
  color: #111827;
  background: var(--accent);
}

.content-section,
.page-hero,
.detail-hero,
.player-section,
.detail-text,
.breadcrumb {
  margin-top: 34px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-text h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-text p,
.footer-inner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--accent);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  background: var(--panel-strong);
  border-color: rgba(250, 204, 21, 0.32);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
  opacity: 0;
  transition: opacity 0.25s ease;
  font-weight: 800;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #111827;
  background: var(--accent);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 12px;
  margin-bottom: 12px;
}

.meta-line span {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

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

.category-tile,
.category-panel,
.page-hero,
.detail-hero,
.player-section,
.detail-text {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.045));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.category-tile {
  padding: 22px;
  min-height: 148px;
  transition: 0.25s ease;
}

.category-tile:hover,
.category-panel:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 204, 21, 0.35);
}

.category-tile span,
.category-panel span {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #fde68a;
}

.category-tile em,
.category-panel p {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
  font-size: 14px;
}

.category-panel {
  overflow: hidden;
  padding: 0 0 18px;
}

.category-panel img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 16px;
}

.category-panel span,
.category-panel p {
  padding: 0 18px;
}

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

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

.movie-card.compact {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  align-items: stretch;
}

.movie-card.compact .poster {
  aspect-ratio: auto;
  min-height: 170px;
}

.movie-card.compact .card-body p {
  min-height: unset;
}

.page-main {
  padding-bottom: 36px;
}

.page-hero {
  padding: 42px;
}

.small-hero {
  min-height: 240px;
  background:
    radial-gradient(circle at 15% 20%, rgba(250, 204, 21, 0.18), transparent 24rem),
    radial-gradient(circle at 90% 30%, rgba(124, 58, 237, 0.26), transparent 24rem),
    rgba(255, 255, 255, 0.07);
}

.inline-filter {
  margin-top: 22px;
}

.inline-filter input {
  width: min(520px, 100%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #fde68a;
}

.detail-main {
  padding-bottom: 42px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 32px;
  padding: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info .lead {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-section,
.detail-text {
  padding: 30px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  color: #111827;
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 22px 60px rgba(250, 204, 21, 0.28);
  cursor: pointer;
  font-size: 32px;
}

.detail-text p {
  margin-bottom: 24px;
  font-size: 17px;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 30px;
  padding: 38px 0;
}

.footer-inner strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  color: #fde68a;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  padding: 8px 12px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.footer-bottom {
  padding: 16px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: none;
  width: 44px;
  height: 44px;
  color: #111827;
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 90;
}

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

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1024px) {
  .top-search {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 42px;
  }

  .hero-poster {
    width: min(330px, 100%);
  }

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

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

@media (max-width: 760px) {
  .header-inner,
  .footer-inner,
  main,
  .hero-stage,
  .detail-main {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    min-height: 66px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    margin: 0;
    padding-bottom: 8px;
  }

  .site-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-link {
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
  }

  .hero-stage {
    min-height: 680px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 26px;
    gap: 26px;
  }

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

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions,
  .inline-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-panels,
  .rank-list,
  .full-rank {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .movie-card.compact .poster {
    min-height: 150px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .detail-poster {
    max-width: 310px;
  }

  .page-hero,
  .player-section,
  .detail-text {
    padding: 24px;
  }

  .section-head,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
