:root {
  color-scheme: dark;
  --bg: #080b16;
  --bg-2: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(168, 85, 247, 0.22);
  --text: #f8fafc;
  --muted: #c4b5fd;
  --muted-2: #94a3b8;
  --gold: #fbbf24;
  --pink: #f472b6;
  --violet: #a855f7;
  --cyan: #38bdf8;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(168, 85, 247, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(244, 114, 182, 0.18), transparent 28rem),
    linear-gradient(135deg, #080b16 0%, #111827 44%, #1e1b4b 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  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, rgba(0, 0, 0, 0.8), transparent 80%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  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: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--pink), var(--violet));
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.24);
}

.brand-text {
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--gold), var(--pink), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-links a,
.hero-actions a,
.button-link,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 999px;
  color: #ede9fe;
  background: rgba(15, 23, 42, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-links a:hover,
.hero-actions a:hover,
.button-link:hover,
.filter-button:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.66);
  background: rgba(88, 28, 135, 0.5);
  box-shadow: 0 16px 34px rgba(168, 85, 247, 0.16);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

main {
  position: relative;
  z-index: 1;
}

.section,
.hero,
.page-hero,
.detail-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  align-items: center;
  padding: 42px 0 34px;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 38px;
  align-items: center;
  padding: clamp(28px, 5vw, 72px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.015);
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 30%, rgba(244, 114, 182, 0.22), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(88, 28, 135, 0.5));
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(8, 11, 22, 0.92), rgba(8, 11, 22, 0.45), rgba(8, 11, 22, 0.84));
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 7px 12px;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
  font-size: 0.88rem;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  max-width: 880px;
}

.gradient-text {
  background: linear-gradient(90deg, #fff7ed, var(--gold), var(--pink), #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p,
.page-hero p,
.detail-title p {
  color: #ddd6fe;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.85;
  max-width: 720px;
}

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

.hero-actions a:first-child,
.primary-button {
  border-color: rgba(251, 191, 36, 0.65);
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  font-weight: 800;
}

.hero-media {
  position: relative;
  z-index: 2;
}

.hero-media a {
  display: block;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(1.2deg);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.hero-dots {
  position: absolute;
  left: clamp(28px, 5vw, 72px);
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 42px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
}

.hero-dots button.active {
  background: linear-gradient(90deg, var(--gold), var(--pink));
}

.page-hero {
  padding: 56px 0 26px;
}

.page-hero-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: clamp(26px, 5vw, 54px);
  background:
    radial-gradient(circle at 80% 10%, rgba(244, 114, 182, 0.18), transparent 28rem),
    rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.section {
  padding: 28px 0;
}

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

.section-head h2,
.detail-section h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.4rem);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 28px 72px rgba(168, 85, 247, 0.16);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.14), rgba(251, 191, 36, 0.08));
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .poster img {
  transform: scale(1.08);
  filter: saturate(1.1) brightness(1.06);
}

.score {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), #fde68a);
  font-weight: 900;
  font-size: 0.84rem;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.4;
}

.card-body p {
  min-height: 3.1em;
  margin: 10px 0;
  color: var(--muted-2);
  line-height: 1.55;
  font-size: 0.94rem;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.meta-row span,
.tag-row span,
.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #ddd6fe;
  background: rgba(168, 85, 247, 0.13);
  font-size: 0.82rem;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
}

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

.category-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(15, 23, 42, 0.72));
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.5);
}

.category-card strong {
  font-size: 1.28rem;
}

.category-card p {
  color: var(--muted-2);
  line-height: 1.7;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(251, 191, 36, 0.55);
}

.rank-no {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 780;
}

.rank-meta {
  color: var(--muted-2);
  font-size: 0.9rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 12px;
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(8, 11, 22, 0.62);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(251, 191, 36, 0.7);
}

.detail-shell {
  padding: 36px 0 28px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(18px, 4vw, 34px);
  background:
    radial-gradient(circle at 90% 10%, rgba(244, 114, 182, 0.2), transparent 28rem),
    rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

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

.detail-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-title h1 {
  margin-bottom: 18px;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.info-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #f5f3ff;
  background: rgba(168, 85, 247, 0.15);
}

.player-card,
.detail-section {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(18px, 3vw, 28px);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #030712;
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #030712;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.22), rgba(0, 0, 0, 0.52));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 0 60px rgba(251, 191, 36, 0.36);
}

.detail-section p {
  color: #d8b4fe;
  line-height: 1.9;
}

.hidden-card {
  display: none !important;
}

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

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

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

  .hero-frame {
    min-height: 760px;
  }

  .hero-media a {
    max-width: 360px;
    transform: none;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-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(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
  }

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

  .hero {
    min-height: auto;
  }

  .hero-frame {
    min-height: 820px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 26px;
    align-content: start;
  }

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

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

  .rank-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 2;
  }

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

  .detail-poster img {
    min-height: 360px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .brand-text {
    font-size: 1.08rem;
  }

  .hero-frame {
    min-height: 900px;
  }
}
