:root {
  --night-900: #0a0d24;
  --night-800: #101538;
  --night-700: #171d46;
  --blueberry-400: #9d8df9;
  --blueberry-500: #7d60f5;
  --blueberry-600: #6d3eed;
  --sky-glow: #7d9aff;
  --text: #ffffff;
  --muted: #c9cbe3;
  --soft: #8b90b7;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.10);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 5%, rgba(125, 96, 245, 0.28), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(125, 154, 255, 0.20), transparent 30rem),
    linear-gradient(180deg, var(--night-900), #060816 72%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 80%);
  z-index: -1;
}

img {
  max-width: 100%;
}

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

button,
input,
select {
  font: inherit;
}

.glass-effect {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.card-hover {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(157, 141, 249, 0.58);
  box-shadow: var(--shadow);
}

.text-glow {
  text-shadow: 0 0 18px rgba(157, 141, 249, 0.8);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blueberry-400), var(--sky-glow));
  color: #050716;
  box-shadow: 0 0 28px rgba(125, 96, 245, 0.56);
}

.brand-name,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(90deg, var(--blueberry-400), var(--sky-glow));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link.active {
  color: var(--blueberry-400);
  text-shadow: 0 0 14px rgba(157, 141, 249, 0.72);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.filter-input,
.filter-select,
.search-center input {
  color: var(--text);
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}

.header-search input {
  width: 178px;
  padding: 9px 14px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-center button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: white;
  background: linear-gradient(135deg, var(--blueberry-500), var(--sky-glow));
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: white;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border-radius: 22px;
}

.mobile-nav,
.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.mobile-link,
.mobile-categories a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 780px;
  overflow: hidden;
  padding-top: 72px;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.58);
}

.hero-shade,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 13, 36, 0.92), rgba(10, 13, 36, 0.58) 48%, rgba(10, 13, 36, 0.88)),
    linear-gradient(0deg, var(--night-900) 0%, rgba(10, 13, 36, 0.1) 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 42px;
  padding-top: 28px;
}

.hero-copy {
  max-width: 760px;
  padding: 36px;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--blueberry-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-shadow: 0 0 24px rgba(125, 96, 245, 0.46);
}

.hero-line,
.detail-one-line {
  margin: 20px 0 12px;
  color: white;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
}

.hero-summary,
.page-hero p,
.detail-article p,
.category-body p {
  color: var(--muted);
  font-size: 16px;
}

.hero-tags,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(157, 141, 249, 0.36);
  border-radius: 999px;
  color: #e6e1ff;
  background: rgba(125, 96, 245, 0.16);
  font-size: 12px;
}

.hero-actions,
.detail-meta,
.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

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

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--blueberry-500), var(--sky-glow));
  box-shadow: 0 16px 40px rgba(125, 96, 245, 0.36);
}

.btn.ghost,
.btn.light {
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, 0.10);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  z-index: 8;
  right: calc((100% - min(1240px, calc(100% - 32px))) / 2);
  bottom: 122px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  width: 58px;
  background: linear-gradient(90deg, var(--blueberry-400), var(--sky-glow));
}

.hero-search {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: 38px;
  width: min(780px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.hero-search input,
.search-center input {
  flex: 1;
  padding: 13px 18px;
}

.hero-search button,
.search-center button {
  padding-inline: 22px;
  font-weight: 800;
}

.hero-quicklinks {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: 0;
  width: min(900px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.hero-quicklinks a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.10);
}

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

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-action,
.text-link {
  color: var(--blueberry-400);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.075);
}

.movie-card-large {
  display: grid;
  grid-template-columns: 45% 1fr;
  grid-column: span 2;
  min-height: 285px;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.06);
}

.movie-card-large .poster-wrap {
  aspect-ratio: auto;
  height: 100%;
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.category-visual:hover img {
  transform: scale(1.08);
}

.poster-gradient,
.category-cover {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 62%);
}

.badge {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(109, 62, 237, 0.86);
}

.top-badge {
  top: 12px;
  right: 12px;
}

.play-mini {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(125, 96, 245, 0.84);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mini {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  padding: 18px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--soft);
  font-size: 12px;
}

.movie-info h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.32;
}

.movie-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

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

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 24px;
}

.category-tile em {
  margin-top: 7px;
  color: var(--muted);
  font-style: normal;
}

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

.rank-row {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 20px;
  padding: 10px;
}

.rank-row img {
  width: 52px;
  height: 66px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-num {
  min-width: 38px;
  text-align: center;
  color: var(--blueberry-400);
  font-weight: 900;
}

.rank-text {
  min-width: 0;
  flex: 1;
}

.rank-text strong,
.rank-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text small {
  color: var(--soft);
}

.rank-row em {
  color: #ffd866;
  font-style: normal;
  font-weight: 900;
}

.sub-page {
  padding-top: 72px;
}

.page-hero {
  position: relative;
  padding: 84px 0 56px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 15%, rgba(125, 96, 245, 0.28), transparent 30rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.page-hero h1 {
  max-width: 900px;
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
}

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

.breadcrumb a {
  color: var(--blueberry-400);
}

.category-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 56px 0;
}

.category-card {
  overflow: hidden;
  border-radius: 26px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.category-visual {
  position: relative;
  overflow: hidden;
  min-height: 260px;
}

.category-visual img,
.category-visual span {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-visual img {
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-visual span {
  background: linear-gradient(90deg, transparent, rgba(10, 13, 36, 0.72));
}

.category-body {
  padding: 24px;
}

.category-body h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-sample {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.category-sample a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.category-sample span {
  color: var(--soft);
}

.filter-panel {
  display: flex;
  gap: 12px;
  margin: 34px 0;
  padding: 12px;
  border-radius: 24px;
}

.filter-input {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
}

.filter-select {
  min-width: 160px;
  padding: 12px 16px;
}

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

.category-movie-grid {
  padding-bottom: 64px;
}

.rank-featured {
  margin-top: 46px;
}

.full-rank-list {
  margin-bottom: 72px;
}

.search-center {
  max-width: 760px;
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding: 10px;
  border-radius: 999px;
}

.search-results-wrap {
  padding: 56px 0 72px;
}

.detail-hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  padding-top: 72px;
}

.detail-shell {
  position: relative;
  z-index: 2;
  padding: 60px 0 46px;
}

.detail-main {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 44px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy {
  max-width: 780px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.10);
}

.detail-play-link {
  margin-top: 28px;
}

.detail-content {
  margin-top: -86px;
  position: relative;
  z-index: 5;
}

.player-card {
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.14));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blueberry-500), var(--sky-glow));
  box-shadow: 0 0 46px rgba(125, 96, 245, 0.68);
  font-size: 34px;
}

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

.detail-article {
  margin-top: 28px;
  padding: 30px;
  border-radius: 28px;
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

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

.related-section {
  padding-bottom: 64px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 20, 0.72);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.4fr;
  gap: 28px;
  color: var(--muted);
}

.footer-inner p {
  margin: 12px 0 0;
}

.footer-links a,
.footer-cats a {
  color: var(--muted);
}

.footer-links,
.footer-cats {
  align-content: start;
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  body.nav-open .mobile-panel {
    display: block;
  }

  .hero-content,
  .detail-main,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .category-overview,
  .rank-list {
    grid-template-columns: 1fr;
  }
}

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

  .brand-name {
    font-size: 19px;
  }

  .hero {
    min-height: 760px;
    padding-top: 64px;
  }

  .hero-content {
    min-height: 620px;
    padding-top: 20px;
  }

  .hero-copy {
    padding: 24px;
    border-radius: 26px;
  }

  .hero-actions,
  .filter-panel,
  .search-center,
  .hero-search {
    flex-direction: column;
    border-radius: 26px;
  }

  .hero-controls {
    right: 16px;
    bottom: 150px;
  }

  .hero-quicklinks {
    justify-content: flex-start;
  }

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

  .movie-card-large {
    grid-column: span 2;
    grid-template-columns: 1fr;
  }

  .movie-info {
    padding: 14px;
  }

  .movie-info h3 {
    font-size: 16px;
  }

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

  .category-visual {
    min-height: 190px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-shell {
    padding-top: 44px;
  }

  .detail-poster {
    max-width: 260px;
  }

  .detail-content {
    margin-top: 0;
    padding-top: 20px;
  }

  .detail-article {
    padding: 22px;
  }

  .footer-inner {
    padding: 34px 0;
  }
}

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

  .movie-card-large {
    grid-column: span 1;
  }

  .rank-row {
    gap: 10px;
  }

  .rank-num {
    display: none;
  }
}
