:root {
  color-scheme: dark;
  --bg: #090814;
  --bg-soft: #121021;
  --panel: rgba(23, 20, 38, 0.78);
  --panel-strong: rgba(33, 28, 54, 0.92);
  --text: #fff7ed;
  --muted: #b8aecb;
  --line: rgba(255, 255, 255, 0.12);
  --pink: #fb4ca0;
  --purple: #8b5cf6;
  --cyan: #38d5d6;
  --amber: #f8c24e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(251, 76, 160, 0.22), transparent 32rem),
    radial-gradient(circle at 88% 6%, rgba(56, 213, 214, 0.18), transparent 28rem),
    linear-gradient(135deg, #090814 0%, #141026 45%, #201235 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img.is-missing {
  opacity: 0;
}

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

#ambientCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.42;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(71, 23, 90, 0.82), rgba(12, 18, 42, 0.82));
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  color: #211024;
  background: linear-gradient(135deg, var(--amber), var(--pink));
  box-shadow: 0 12px 30px rgba(251, 76, 160, 0.35);
}

.brand-text {
  font-size: clamp(18px, 2vw, 24px);
  background: linear-gradient(90deg, #fff, #ffd66d, #ff73bd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 22px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  flex-wrap: wrap;
}

.hero-slider {
  position: relative;
  min-height: 690px;
  margin: 28px 0 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-stage {
  position: relative;
  min-height: 610px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 36px;
  padding: clamp(28px, 6vw, 72px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  filter: blur(3px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.28;
  background: linear-gradient(135deg, rgba(251, 76, 160, 0.3), rgba(56, 213, 214, 0.22));
}

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(9, 8, 20, 0.98) 0%, rgba(9, 8, 20, 0.66) 48%, rgba(9, 8, 20, 0.86) 100%),
    radial-gradient(circle at 28% 22%, rgba(251, 76, 160, 0.28), transparent 32rem);
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 22px 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #f8e7ff;
  background: rgba(255, 255, 255, 0.09);
  font-size: 13px;
  font-weight: 800;
}

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

.btn,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover,
.search-form button:hover {
  transform: translateY(-2px);
}

.btn.primary,
.search-form button {
  color: #241022;
  background: linear-gradient(135deg, var(--amber), #ff68b3);
  box-shadow: 0 16px 36px rgba(251, 76, 160, 0.33);
}

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

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(251, 76, 160, 0.28), rgba(56, 213, 214, 0.22));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
}

.hero-poster::before {
  position: absolute;
  inset: 16px;
  z-index: 2;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  pointer-events: none;
}

.hero-dots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 0 24px 24px;
}

.hero-dot {
  min-height: 56px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  overflow: hidden;
}

.hero-dot span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-dot.active,
.hero-dot:hover {
  color: #fff;
  border-color: rgba(248, 194, 78, 0.58);
  background: rgba(248, 194, 78, 0.16);
}

.panel,
.movie-card,
.category-card,
.category-overview-card,
.library-group,
.detail-hero,
.player-shell,
.page-hero {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 24px;
  margin-bottom: 48px;
  padding: 28px;
  border-radius: 28px;
}

.quick-search h2,
.section-head h2,
.category-overview-body h2,
.library-group-head h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.search-form {
  display: flex;
  gap: 12px;
}

.search-form input,
.inline-filter input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  padding: 0 18px;
  font-size: 15px;
}

.search-form input:focus,
.inline-filter input:focus {
  border-color: rgba(251, 76, 160, 0.72);
  box-shadow: 0 0 0 4px rgba(251, 76, 160, 0.13);
}

.content-section {
  margin: 54px 0;
}

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

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

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

.category-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 26px;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 194, 78, 0.45);
}

.category-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  height: 96px;
}

.category-stack img,
.category-cover img {
  min-width: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(251, 76, 160, 0.25), rgba(56, 213, 214, 0.2));
}

.category-card h2,
.movie-card h2 {
  margin: 0;
  font-size: 20px;
}

.category-card p,
.movie-card p,
.category-overview-body p,
.detail-text p {
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(251, 76, 160, 0.24), rgba(139, 92, 246, 0.25), rgba(56, 213, 214, 0.18));
}

.poster-frame img {
  transition: transform 0.38s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.year-badge {
  right: 10px;
  bottom: 10px;
  min-height: 28px;
  padding: 4px 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  color: #2c1027;
  background: linear-gradient(135deg, var(--amber), #ff71b8);
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 10px;
}

.card-body h2 a:hover,
.category-overview-body h2 a:hover,
.library-item:hover strong {
  color: var(--amber);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #f7eefe;
  background: rgba(251, 76, 160, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
}

.ranking-panel,
.content-section.panel,
.detail-text.panel {
  padding: 24px;
  border-radius: 28px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
}

.rank-row span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #241022;
  background: var(--amber);
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.movie-card.compact .card-body {
  padding: 12px;
}

.movie-card.compact p,
.movie-card.compact .tag-row {
  display: none;
}

.movie-card.compact h2 {
  font-size: 15px;
  line-height: 1.35;
}

.page-hero {
  margin: 28px 0 36px;
  padding: clamp(28px, 5vw, 54px);
  border-radius: 34px;
}

.compact-hero h1 {
  max-width: 920px;
  font-size: clamp(38px, 6vw, 68px);
}

.compact-hero p {
  max-width: 860px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.filter-btn.active,
.filter-btn:hover {
  color: #241022;
  background: var(--amber);
}

.category-overview-grid {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border-radius: 30px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  min-height: 220px;
}

.category-overview-body {
  display: grid;
  align-content: center;
}

.category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.category-links a,
.library-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.category-links span,
.library-item span {
  color: var(--muted);
  font-size: 13px;
}

.library-wrap {
  display: grid;
  gap: 24px;
}

.library-group {
  padding: 22px;
  border-radius: 28px;
}

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

.library-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
  padding: clamp(24px, 5vw, 54px);
  border-radius: 34px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(251, 76, 160, 0.24), rgba(56, 213, 214, 0.2));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
  font-size: clamp(34px, 5.5vw, 72px);
}

.detail-meta {
  margin-top: 18px;
}

.tag-row.large span {
  padding: 7px 11px;
  font-size: 13px;
}

.player-section {
  margin: 36px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #05050d;
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05050d;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #2c1027;
  background: linear-gradient(180deg, rgba(9, 8, 20, 0.18), rgba(9, 8, 20, 0.72));
  cursor: pointer;
}

.player-start span {
  display: grid;
  width: clamp(78px, 11vw, 116px);
  height: clamp(78px, 11vw, 116px);
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), #ff68b3);
  box-shadow: 0 18px 50px rgba(251, 76, 160, 0.35);
  font-size: clamp(30px, 5vw, 46px);
  transform: translateX(3px);
}

.player-start.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-text h2 + p {
  margin-top: 12px;
}

.detail-text p + h2 {
  margin-top: 28px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(5, 5, 13, 0.68);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 28px;
  padding: 40px 0;
}

.footer-grid p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.7;
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
  border-top: 1px solid var(--line);
  text-align: center;
}

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

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

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

@media (max-width: 860px) {
  main,
  .nav-wrap,
  .mobile-nav,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 720px);
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .hero-slider {
    min-height: auto;
    border-radius: 26px;
  }

  .hero-stage {
    min-height: 660px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 28px;
  }

  .hero-poster {
    width: min(72vw, 280px);
    margin: 0 auto;
  }

  .hero-dots {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-search,
  .split-section,
  .detail-hero,
  .category-overview-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-row em {
    grid-column: 2;
  }
}

@media (max-width: 540px) {
  .hero-stage {
    min-height: 620px;
  }

  .hero-dots,
  .movie-grid,
  .category-grid,
  .library-list,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .search-form {
    flex-direction: column;
  }

  .category-cover {
    min-height: 180px;
  }
}
