:root {
  color-scheme: dark;
  --twilight-950: #3b0764;
  --twilight-900: #4c1d95;
  --twilight-800: #5b21b6;
  --twilight-700: #7e22ce;
  --twilight-600: #9333ea;
  --twilight-500: #a855f7;
  --twilight-300: #d8b4fe;
  --dusk-600: #c026d3;
  --sunset-400: #fb923c;
  --sunset-300: #fdba74;
  --ink: #0f061d;
  --white-90: rgba(255, 255, 255, 0.9);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-55: rgba(255, 255, 255, 0.55);
  --white-35: rgba(255, 255, 255, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.22), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.16), transparent 30rem),
    linear-gradient(135deg, #12031f 0%, #3b0764 50%, #4a044e 100%);
  background-attachment: fixed;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(59, 7, 100, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.42);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--white-70);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--twilight-300);
}

.nav-search {
  position: relative;
  width: 260px;
}

.nav-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 11px 44px 11px 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-search input:focus {
  border-color: var(--twilight-300);
  background: rgba(255, 255, 255, 0.14);
}

.nav-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(147, 51, 234, 0.72);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

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

.mobile-menu.is-open {
  display: block;
}

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

.mobile-menu .nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  margin-bottom: 48px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(22, 4, 40, 0.95) 0%, rgba(59, 7, 100, 0.72) 42%, rgba(0, 0, 0, 0.1) 100%),
    linear-gradient(0deg, rgba(22, 4, 40, 0.95) 0%, transparent 56%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 72vh;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 110px 0 78px;
}

.hero-panel {
  max-width: 720px;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-badge,
.small-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 13px;
  color: #ffffff;
  background: rgba(147, 51, 234, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
}

.rating-badge {
  color: var(--sunset-300);
  background: rgba(0, 0, 0, 0.36);
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 950;
  text-shadow: 0 0 26px rgba(216, 180, 254, 0.28);
}

.hero-desc {
  max-width: 640px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--white-70);
  font-size: 14px;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 520px;
  margin-top: 26px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.hero-search input {
  min-width: 0;
  border: 0;
  color: #ffffff;
  padding: 16px 18px;
  background: transparent;
  outline: none;
}

.hero-search button {
  border: 0;
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  cursor: pointer;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--twilight-300), var(--sunset-300));
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 12px 34px rgba(168, 85, 247, 0.36);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(168, 85, 247, 0.5);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  color: var(--twilight-300);
  background: rgba(147, 51, 234, 0.14);
  border-color: rgba(168, 85, 247, 0.22);
}

.page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 80px;
}

.page-header {
  margin: 24px 0 34px;
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(112, 26, 117, 0.44), rgba(76, 29, 149, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

.page-header h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  letter-spacing: -0.04em;
}

.page-header p {
  max-width: 760px;
  margin: 0;
  color: var(--white-70);
  line-height: 1.8;
}

.section-block {
  margin-bottom: 58px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--white-55);
  line-height: 1.7;
}

.gradient-text {
  background: linear-gradient(90deg, var(--twilight-300), #f0abfc, var(--sunset-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-text {
  text-shadow: 0 0 30px rgba(216, 180, 254, 0.34);
}

.glass-effect,
.dusk-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}

.dusk-card {
  background: linear-gradient(135deg, rgba(112, 26, 117, 0.4), rgba(107, 33, 168, 0.34));
}

.veil-effect::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(139, 92, 246, 0.1), transparent);
  pointer-events: none;
}

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(216, 180, 254, 0.42);
  background: rgba(255, 255, 255, 0.12);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 60%);
  transition: opacity 0.25s ease;
}

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

.play-float {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: scale(1);
}

.play-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.88);
  box-shadow: 0 0 26px rgba(168, 85, 247, 0.5);
}

.card-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  border-radius: 999px;
  padding: 5px 8px;
  color: #1b0a24;
  background: linear-gradient(135deg, #fdba74, #fef3c7);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--white-55);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-title {
  min-height: 42px;
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  min-height: 40px;
  margin: 0 0 12px;
  color: var(--white-55);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag {
  border-radius: 999px;
  padding: 4px 8px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 26px;
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(216, 180, 254, 0.42);
}

.category-tile h2 {
  margin: 18px 0 10px;
  font-size: 27px;
}

.category-tile p {
  margin: 0;
  color: var(--white-70);
  line-height: 1.75;
}

.category-orb {
  position: absolute;
  right: -30px;
  bottom: -38px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(253, 186, 116, 0.34), transparent 68%);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 22px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--twilight-300);
}

.filter-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 14px;
  color: var(--white-70);
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 62px 112px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.12);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  font-weight: 950;
}

.rank-thumb {
  width: 112px;
  height: 68px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
}

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

.rank-info h3 {
  margin: 0 0 7px;
  font-size: 17px;
}

.rank-info p {
  margin: 0;
  color: var(--white-55);
  font-size: 13px;
  line-height: 1.6;
}

.rank-score {
  color: var(--sunset-300);
  font-weight: 900;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: var(--white-55);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--twilight-300);
}

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

.detail-title {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-lead {
  margin: 0 0 22px;
  color: var(--white-70);
  font-size: 18px;
  line-height: 1.8;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.26)),
    radial-gradient(circle at center, rgba(147, 51, 234, 0.35), transparent 60%);
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

.big-play {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 0 44px rgba(168, 85, 247, 0.58);
  font-size: 34px;
}

.player-cover span:last-child {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.detail-copy {
  margin-top: 28px;
  padding: 26px;
  border-radius: 26px;
}

.detail-copy h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-copy p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.9;
}

.side-card {
  position: sticky;
  top: 100px;
  overflow: hidden;
  border-radius: 28px;
}

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

.side-body {
  padding: 20px;
}

.side-body dl {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.side-body div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.side-body dt {
  color: var(--white-55);
  font-size: 13px;
}

.side-body dd {
  margin: 0;
  color: #ffffff;
  text-align: right;
  font-weight: 800;
}

.related-section {
  margin-top: 58px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 6, 29, 0.46);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-shell h3,
.footer-shell h4 {
  margin: 0 0 14px;
}

.footer-shell p,
.footer-shell a {
  color: var(--white-55);
  line-height: 1.8;
  font-size: 14px;
}

.footer-shell a:hover {
  color: var(--twilight-300);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.fade-in {
  animation: fadeIn 0.6s ease-out both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.is-hidden-by-filter {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 24px;
  color: var(--white-70);
  text-align: center;
}

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

@media (max-width: 1080px) {
  .nav-links,
  .nav-shell > .nav-search {
    display: none;
  }

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

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

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

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

  .side-card {
    position: static;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .hero-carousel,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    padding: 96px 0 70px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(22, 4, 40, 0.96) 0%, rgba(59, 7, 100, 0.76) 58%, rgba(0, 0, 0, 0.16) 100%);
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 26px;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .hero-search button {
    min-height: 48px;
  }

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

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

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

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

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

  .rank-score {
    grid-column: 3;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .rank-thumb {
    width: 88px;
    height: 58px;
  }

  .side-card {
    display: block;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .page-main,
  .hero-content,
  .mobile-menu,
  .footer-shell {
    width: min(100% - 24px, 1180px);
  }

  .page-header,
  .detail-copy {
    padding: 22px;
    border-radius: 22px;
  }

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

  .card-body {
    padding: 12px;
  }

  .tag-row .tag:nth-child(n + 3) {
    display: none;
  }
}
