:root {
  --twilight-950: #240333;
  --twilight-900: #3b0764;
  --twilight-800: #581c87;
  --twilight-700: #7e22ce;
  --twilight-600: #9333ea;
  --twilight-500: #a855f7;
  --twilight-300: #d8b4fe;
  --dusk-600: #c026d3;
  --sunset-400: #fb923c;
  --sunset-300: #fdba74;
  --ink: #0a0612;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --soft: rgba(255, 255, 255, 0.10);
  --line: rgba(255, 255, 255, 0.15);
  --glass: rgba(255, 255, 255, 0.10);
  --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 20% 0%, rgba(168, 85, 247, 0.22), transparent 34rem),
    radial-gradient(circle at 80% 16%, rgba(192, 38, 211, 0.16), transparent 30rem),
    linear-gradient(135deg, #0b0612 0%, var(--twilight-950) 45%, #4a044e 100%);
  background-attachment: fixed;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(36, 3, 51, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

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

.brand-text,
.footer-brand {
  font-size: 1.35rem;
  background: linear-gradient(90deg, #d8b4fe, #f0abfc, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 8px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.header-search {
  margin-left: auto;
  width: min(360px, 34vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.filter-input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  padding: 8px 13px;
  background: linear-gradient(90deg, var(--twilight-600), var(--dusk-600));
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.10);
}

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

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

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-links,
.mobile-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.mobile-sub-link {
  color: rgba(255, 255, 255, 0.76);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  min-height: 78vh;
  margin-top: -1px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg,
.hero-bg img,
.hero-overlay,
.hero-veil {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.08);
}

.hero-overlay {
  background:
    linear-gradient(to top, var(--twilight-950) 0%, rgba(36, 3, 51, 0.86) 32%, rgba(36, 3, 51, 0.22) 100%),
    linear-gradient(to right, rgba(5, 2, 10, 0.82), rgba(5, 2, 10, 0.20) 62%, rgba(5, 2, 10, 0.78));
}

.hero-veil {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(192, 38, 211, 0.12) 48%, transparent 68%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 78vh;
  margin: 0 auto;
  padding: 150px 0 92px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 1180px;
}

.hero-content > * {
  max-width: 720px;
}

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

.hero-kicker span,
.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.90);
  background: rgba(147, 51, 234, 0.36);
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.7rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 0 34px rgba(168, 85, 247, 0.48);
}

.hero p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2.1vw, 1.35rem);
  line-height: 1.75;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary,
.btn-ghost,
.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  padding: 0 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 16px 46px rgba(192, 38, 211, 0.32);
}

.btn-primary:hover,
.btn-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(192, 38, 211, 0.44);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.btn-small {
  min-height: 38px;
  padding: 0 14px;
  color: #fff;
  background: rgba(147, 51, 234, 0.60);
}

.hero-panel {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 86px;
  width: 278px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.panel-label {
  margin: 0 0 12px;
  color: var(--twilight-300);
  font-weight: 800;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.2s ease, color 0.2s ease;
}

.hero-mini-card.is-active,
.hero-mini-card:hover {
  color: #fff;
  background: rgba(147, 51, 234, 0.34);
}

.hero-mini-card img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.hero-mini-card span {
  font-size: 0.94rem;
  font-weight: 750;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

.page-shell {
  padding: 116px 0 72px;
}

.home-sections {
  padding: 34px 0 78px;
}

.content-section {
  margin-top: 56px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--twilight-300);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-heading h1,
.section-heading h2,
.page-title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.8rem);
  line-height: 1.05;
}

.section-more {
  flex: 0 0 auto;
  color: var(--twilight-300);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

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

.poster-wrap:hover img {
  transform: scale(1.07);
  filter: brightness(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent 58%);
  opacity: 0.82;
}

.score-pill,
.rank-badge,
.play-float {
  position: absolute;
  z-index: 2;
}

.score-pill {
  right: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(249, 115, 22, 0.92);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
}

.play-float {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(147, 51, 234, 0.72);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-wrap:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 12px 2px 0;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.75em;
  color: #fff;
  font-weight: 850;
  line-height: 1.36;
  transition: color 0.2s ease;
}

.card-title:hover {
  color: var(--twilight-300);
}

.card-meta,
.card-desc {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
  line-height: 1.55;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-tile,
.category-box {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.category-tile img,
.category-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-tile:hover img,
.category-box:hover img {
  transform: scale(1.08);
  opacity: 0.68;
}

.category-tile::after,
.category-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(36, 3, 51, 0.84), rgba(147, 51, 234, 0.42));
}

.category-tile span,
.category-box span,
.category-box strong {
  position: relative;
  z-index: 1;
}

.category-tile span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-box {
  min-height: 170px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-box strong {
  font-size: 1.6rem;
}

.category-box span {
  color: rgba(255, 255, 255, 0.72);
  margin-top: 6px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 86px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.rank-row img {
  width: 86px;
  height: 118px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-number {
  font-size: 1.5rem;
  font-weight: 950;
  color: var(--sunset-300);
  text-align: center;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-score {
  color: var(--sunset-300);
  font-size: 1.4rem;
  font-weight: 950;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin: 26px 0 24px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.filter-input,
.filter-select {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.filter-select option {
  color: #111;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.glass-panel,
.player-card,
.info-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

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

.video-shell video,
.video-poster,
.player-dim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-shell video {
  object-fit: contain;
}

.video-poster {
  object-fit: cover;
  opacity: 0.58;
}

.player-dim {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.18));
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
}

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

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 18px 52px rgba(147, 51, 234, 0.46);
}

.player-status {
  position: absolute;
  z-index: 3;
  left: 18px;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.80);
}

.detail-main {
  padding: 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.92rem;
}

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

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.1;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.detail-section p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.9;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.info-card {
  position: sticky;
  top: 100px;
  padding: 22px;
}

.info-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  margin-bottom: 18px;
}

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

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.info-list dt {
  color: rgba(255, 255, 255, 0.58);
}

.info-list dd {
  margin: 0;
  color: #fff;
  font-weight: 750;
  text-align: right;
}

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

.search-empty {
  padding: 32px;
  color: var(--muted);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 6, 18, 0.54);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.footer-inner p {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.7;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.66);
}

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

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

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

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

  .hero-panel {
    display: none;
  }

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

  .info-card {
    position: static;
  }
}

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

  .main-nav,
  .header-search {
    display: none;
  }

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

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

  .hero,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    padding-top: 116px;
    padding-bottom: 78px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 13vw, 4.2rem);
  }

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

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

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

  .rank-row {
    grid-template-columns: 42px 72px 1fr;
  }

  .rank-score {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

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

@media (max-width: 560px) {
  .page-shell {
    padding-top: 96px;
  }

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

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

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

  .detail-main {
    padding: 20px;
  }

  .card-desc {
    display: none;
  }
}
