:root {
  color-scheme: dark;
  --bg: #070312;
  --bg-2: #120724;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --line: rgba(216, 180, 254, 0.22);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --soft: rgba(233, 213, 255, 0.76);
  --brand: #d8b4fe;
  --brand-2: #f9a8d4;
  --gold: #fde68a;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.25), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(236, 72, 153, 0.22), transparent 30rem),
    linear-gradient(135deg, #05010d 0%, #160728 45%, #080314 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(168, 85, 247, 0.24);
  background: linear-gradient(90deg, rgba(49, 46, 129, 0.96), rgba(88, 28, 135, 0.96), rgba(131, 24, 67, 0.96));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #facc15, #f472b6 48%, #a855f7);
  box-shadow: 0 0 28px rgba(244, 114, 182, 0.5);
}

.logo-text {
  background: linear-gradient(90deg, #fef3c7, #fbcfe8, #ddd6fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.nav-link {
  padding: 10px 13px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.search-form {
  position: relative;
  width: min(260px, 26vw);
}

.search-form input,
.filter-input,
.select-field {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  outline: none;
  transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
  padding: 0 18px 0 42px;
}

.search-form::before {
  content: "⌕";
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-53%);
  color: rgba(233, 213, 255, 0.72);
  font-size: 18px;
}

.search-form input::placeholder,
.filter-input::placeholder {
  color: rgba(233, 213, 255, 0.60);
}

.search-form input:focus,
.filter-input:focus,
.select-field:focus {
  border-color: rgba(250, 204, 21, 0.62);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 4px rgba(216, 180, 254, 0.13);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
}

.mobile-menu {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 10px;
}

.mobile-menu .nav-link,
.mobile-menu .search-form {
  width: 100%;
}

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

.hero {
  position: relative;
  margin: 28px auto 48px;
  overflow: hidden;
  border: 1px solid rgba(216, 180, 254, 0.22);
  border-radius: 34px;
  min-height: clamp(560px, 72vh, 760px);
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.65), rgba(15, 23, 42, 0.84));
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  gap: clamp(24px, 5vw, 62px);
  align-items: center;
  padding: clamp(28px, 6vw, 78px);
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.65s ease, transform 0.65s ease;
  pointer-events: none;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 3, 18, 0.94) 0%, rgba(7, 3, 18, 0.68) 45%, rgba(7, 3, 18, 0.34) 100%),
    var(--hero-bg, linear-gradient(135deg, #581c87, #0f172a));
  background-size: cover;
  background-position: center;
  filter: saturate(1.15);
  z-index: -2;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(250, 204, 21, 0.22), transparent 22rem),
    radial-gradient(circle at 80% 24%, rgba(244, 114, 182, 0.22), transparent 24rem),
    linear-gradient(180deg, transparent 50%, rgba(7, 3, 18, 0.88) 100%);
  z-index: -1;
}

.hero-kicker,
.section-kicker,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border: 1px solid rgba(253, 230, 138, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #fde68a;
  font-size: 13px;
  font-weight: 800;
}

.hero-kicker,
.section-kicker {
  padding: 8px 12px;
  margin-bottom: 18px;
}

.badge {
  padding: 5px 9px;
}

.hero-title {
  max-width: 850px;
  font-size: clamp(42px, 7.6vw, 88px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.06em;
  margin: 0 0 18px;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.hero-title span,
.gradient-text {
  background: linear-gradient(90deg, #fef3c7, #fbcfe8, #ddd6fe, #bae6fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.85;
}

.hero-meta,
.meta-row,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-meta {
  margin: 22px 0 28px;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  font-weight: 850;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 42px rgba(168, 85, 247, 0.22);
}

.btn-primary {
  color: #2e1065;
  background: linear-gradient(135deg, #fde68a, #f9a8d4 48%, #c4b5fd);
  box-shadow: 0 18px 48px rgba(244, 114, 182, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fef3c7, #fbcfe8, #ddd6fe);
}

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.72), rgba(236, 72, 153, 0.32));
}

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

.hero-poster-caption {
  position: absolute;
  inset: auto 16px 16px 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(7, 3, 18, 0.68);
  backdrop-filter: blur(16px);
}

.hero-controls {
  position: absolute;
  left: clamp(26px, 6vw, 78px);
  right: clamp(26px, 6vw, 78px);
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, #fde68a, #f9a8d4);
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.quick-cats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: -24px 0 44px;
  position: relative;
  z-index: 3;
}

.quick-cat,
.category-card,
.movie-card,
.rank-card,
.info-panel,
.related-card,
.toolbar,
.player-panel {
  border: 1px solid rgba(216, 180, 254, 0.18);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.quick-cat {
  min-height: 118px;
  padding: 18px;
  border-radius: 24px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.quick-cat:hover,
.category-card:hover,
.movie-card:hover,
.rank-card:hover,
.related-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.12);
}

.quick-cat strong,
.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.quick-cat span,
.category-card span,
.card-summary,
.muted {
  color: var(--muted);
}

.section {
  margin: 54px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 10px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.movie-card a {
  display: block;
  height: 100%;
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(253, 230, 138, 0.30), transparent 10rem),
    linear-gradient(135deg, rgba(79, 70, 229, 0.72), rgba(168, 85, 247, 0.56), rgba(236, 72, 153, 0.38));
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(7, 3, 18, 0.96) 100%);
}

.card-ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #2e1065;
  background: linear-gradient(90deg, #fde68a, #f9a8d4);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 15px;
}

.card-title {
  min-height: 48px;
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 900;
}

.card-meta {
  color: rgba(233, 213, 255, 0.78);
  font-size: 12px;
  margin-bottom: 10px;
}

.card-summary {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.65;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px;
  gap: 12px;
  align-items: center;
  margin: 0 0 20px;
  padding: 14px;
  border-radius: 22px;
}

.filter-input {
  padding: 0 16px;
}

.select-field {
  padding: 0 14px;
}

.select-field option {
  color: #111827;
}

.filter-empty {
  display: none;
  padding: 28px;
  border: 1px solid rgba(216, 180, 254, 0.20);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  text-align: center;
}

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

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  border-radius: 22px;
  padding: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-num {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #2e1065;
  background: linear-gradient(135deg, #fde68a, #f9a8d4);
  font-weight: 950;
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.62), rgba(236, 72, 153, 0.36));
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-content h3 {
  margin: 4px 0 8px;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 900;
}

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

.category-card {
  min-height: 128px;
  padding: 20px;
  border-radius: 24px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-group {
  margin-bottom: 38px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: start;
  padding: clamp(24px, 4vw, 42px);
  margin: 28px 0 34px;
  border: 1px solid rgba(216, 180, 254, 0.22);
  border-radius: 32px;
  background:
    radial-gradient(circle at 15% 5%, rgba(250, 204, 21, 0.15), transparent 18rem),
    linear-gradient(135deg, rgba(88, 28, 135, 0.48), rgba(15, 23, 42, 0.76));
  box-shadow: var(--shadow);
}

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

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 46%, rgba(244, 114, 182, 0.22), transparent 18rem),
    linear-gradient(180deg, rgba(7, 3, 18, 0.20), rgba(7, 3, 18, 0.76));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: #2e1065;
  background: linear-gradient(135deg, #fde68a, #f9a8d4, #c4b5fd);
  box-shadow: 0 22px 60px rgba(244, 114, 182, 0.35);
  font-size: 34px;
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.player-caption {
  padding: 15px 18px;
  color: var(--soft);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 3, 18, 0.72);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(233, 213, 255, 0.76);
  font-size: 14px;
  margin-bottom: 18px;
}

.detail-title {
  margin: 0 0 14px;
  font-size: clamp(34px, 5.6vw, 66px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.detail-meta {
  margin: 16px 0 22px;
}

.detail-line {
  color: rgba(255, 255, 255, 0.83);
  line-height: 1.85;
  font-size: 18px;
}

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 22px;
}

.info-panel {
  padding: clamp(20px, 3vw, 30px);
  border-radius: 26px;
}

.info-panel h2,
.info-panel h3 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 930;
}

.info-panel p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.95;
  margin: 0 0 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.text-tag {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid rgba(216, 180, 254, 0.24);
  border-radius: 999px;
  color: rgba(233, 213, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.related-thumb {
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.68), rgba(236, 72, 153, 0.38));
}

.related-card h3 {
  min-height: 42px;
  margin: 0;
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 850;
}

.footer {
  margin-top: 68px;
  border-top: 1px solid rgba(216, 180, 254, 0.18);
  background: rgba(5, 1, 13, 0.46);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  color: rgba(255, 255, 255, 0.68);
}

.footer strong {
  display: block;
  color: #fff;
  margin-bottom: 8px;
  font-size: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.footer-links a {
  color: rgba(233, 213, 255, 0.86);
}

.footer-links a:hover {
  color: #fde68a;
}

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

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

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

@media (max-width: 900px) {
  .header-actions {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero {
    min-height: 820px;
  }

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

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

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

  .toolbar {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .header-inner {
    height: 64px;
  }

  .logo {
    font-size: 20px;
  }

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

  .hero-slide {
    padding: 26px 20px 88px;
  }

  .hero-controls {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 14px;
  }

  .rank-grid,
  .category-grid,
  .related-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .play-button {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }
}
