:root {
  --bg: #0a0d24;
  --bg-deep: #050716;
  --panel: rgba(255, 255, 255, 0.10);
  --panel-strong: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #f3f4f6;
  --muted: #aeb7d8;
  --soft: #7882a8;
  --blueberry: #7d60f5;
  --blueberry-light: #9d8df9;
  --night: #7d9aff;
  --danger: #ff6d9a;
  --radius: 22px;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(93, 119, 255, 0.55) rgba(10, 13, 36, 0.55);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(125, 96, 245, 0.34), transparent 34rem),
    radial-gradient(circle at 85% 20%, rgba(77, 124, 254, 0.22), transparent 32rem),
    linear-gradient(180deg, #0a0d24 0%, #1a1a3e 50%, #0a0d24 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(10, 13, 36, 0.72);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(157, 141, 249, 0.72);
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blueberry-light), var(--blueberry));
  box-shadow: 0 0 26px rgba(125, 96, 245, 0.42);
}

.brand-text {
  font-size: 1.14rem;
  text-shadow: 0 0 12px rgba(93, 119, 255, 0.75);
}

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

.nav-link,
.mobile-link {
  color: #d8def5;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--blueberry-light);
  background: rgba(255, 255, 255, 0.08);
}

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

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

.mobile-link {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.75;
  pointer-events: none;
}

.hero::before {
  width: 220px;
  height: 220px;
  right: 12%;
  top: 12%;
  background: rgba(125, 96, 245, 0.28);
  animation: floatGlow 7s ease-in-out infinite;
}

.hero::after {
  width: 160px;
  height: 160px;
  left: 10%;
  bottom: 8%;
  background: rgba(125, 154, 255, 0.18);
  animation: floatGlow 8s ease-in-out infinite reverse;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.14) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 22, 0.92) 0%, rgba(5, 7, 22, 0.72) 42%, rgba(5, 7, 22, 0.42) 100%),
    linear-gradient(0deg, rgba(5, 7, 22, 0.94) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 42px;
  padding: 74px;
}

.eyebrow {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 8px 14px;
  border: 1px solid rgba(157, 141, 249, 0.45);
  border-radius: 999px;
  color: #ded9ff;
  background: rgba(125, 96, 245, 0.22);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 0 22px rgba(93, 119, 255, 0.72);
}

.hero-text {
  max-width: 780px;
  margin: 24px 0 0;
  color: #d9def3;
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #d9def3;
  background: rgba(255, 255, 255, 0.10);
}

.hero-tags span {
  padding: 8px 12px;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 0.78rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  transition: 0.2s ease;
}

.primary-btn {
  padding: 13px 22px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blueberry-light), var(--blueberry));
  box-shadow: 0 14px 34px rgba(125, 96, 245, 0.36);
}

.ghost-btn {
  padding: 12px 19px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #edf0ff;
  background: rgba(255, 255, 255, 0.09);
}

.small-btn {
  padding: 8px 13px;
  font-size: 0.88rem;
  color: #f2f4ff;
  background: rgba(125, 96, 245, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.small-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(157, 141, 249, 0.66);
  background-color: rgba(125, 96, 245, 0.32);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
}

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

.hero-poster span {
  display: block;
  padding: 14px 16px;
  color: #d9def3;
}

.hero-dots {
  position: absolute;
  left: 74px;
  bottom: 38px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  background: var(--blueberry-light);
  box-shadow: 0 0 16px rgba(157, 141, 249, 0.82);
}

.section {
  margin-top: 54px;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--blueberry-light);
  font-weight: 800;
}

.section h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  letter-spacing: -0.03em;
}

.section-desc,
.page-title p,
.detail-title p {
  max-width: 840px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card,
.category-card,
.info-panel,
.rank-item,
.search-panel,
.detail-panel,
.player-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.movie-card,
.category-card {
  overflow: hidden;
  transition: 0.25s ease;
}

.card-hover,
.movie-card:hover,
.category-card:hover {
  transition: 0.25s ease;
}

.card-hover:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(157, 141, 249, 0.42);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
}

.card-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.38s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.78));
}

.rank-badge,
.card-rating {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.rank-badge {
  left: 12px;
  top: 12px;
  padding: 7px 10px;
  background: linear-gradient(135deg, #ff8a3d, #ff4f8a);
}

.card-rating {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(10, 13, 36, 0.82);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.7em;
  color: #fff;
  font-size: 1.03rem;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.rank-title:hover,
.breadcrumb a:hover {
  color: var(--blueberry-light);
}

.card-meta,
.card-summary,
.rank-info p,
.category-card p,
.detail-meta,
.breadcrumb,
.prose p {
  color: var(--muted);
}

.card-meta {
  margin: 8px 0;
  font-size: 0.86rem;
}

.card-summary {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.6em;
  margin: 0 0 13px;
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.category-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: auto 24px 24px auto;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(157, 141, 249, 0.42), rgba(125, 154, 255, 0.22));
  filter: blur(1px);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 1.32rem;
}

.category-card p {
  position: relative;
  margin: 0 0 24px;
  line-height: 1.65;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 220px;
  gap: 14px;
  padding: 18px;
  margin: 28px 0 30px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  outline: 0;
}

.search-panel input {
  padding: 13px 16px;
}

.search-panel select {
  padding: 13px 14px;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--blueberry-light);
  box-shadow: 0 0 0 3px rgba(157, 141, 249, 0.14);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 92px 56px minmax(0, 1fr) 86px;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
}

.rank-cover img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rank-num {
  color: var(--blueberry-light);
  font-size: 1.35rem;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(93, 119, 255, 0.55);
}

.rank-title {
  display: inline-block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
}

.rank-info p {
  margin: 0 0 8px;
  line-height: 1.55;
}

.rank-score {
  justify-self: end;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blueberry-light), var(--blueberry));
  box-shadow: 0 0 28px rgba(125, 96, 245, 0.42);
}

.page-title {
  padding: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(14px);
}

.breadcrumb {
  margin-bottom: 14px;
  font-size: 0.92rem;
}

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

.player-panel {
  overflow: hidden;
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(125, 96, 245, 0.35), rgba(0, 0, 0, 0.46));
  transition: 0.25s ease;
}

.play-core {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--blueberry-light), var(--blueberry));
  box-shadow: 0 0 36px rgba(125, 96, 245, 0.62);
}

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

.player-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: var(--muted);
}

.detail-panel {
  padding: 24px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  margin-bottom: 18px;
}

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

.detail-title h1 {
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.prose {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.prose h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
}

.prose p {
  margin: 0;
  line-height: 1.9;
}

.no-results {
  display: none;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 18px;
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(10, 13, 36, 0.70);
  backdrop-filter: blur(14px);
}

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

.footer-brand {
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-footer p,
.site-footer a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.72;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--blueberry-light);
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-24px);
  }
}

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

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

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

  .hero-poster,
  .detail-panel {
    max-width: 420px;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

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

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

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 36px 24px 78px;
  }

  .hero-poster {
    display: none;
  }

  .hero-dots {
    left: 24px;
  }

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

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

  .rank-item {
    grid-template-columns: 74px minmax(0, 1fr) 50px;
  }

  .rank-num {
    display: none;
  }

  .rank-cover img {
    width: 74px;
  }

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

@media (max-width: 560px) {
  .main-shell {
    width: min(100% - 20px, 1280px);
    padding-top: 18px;
  }

  .header-inner,
  .mobile-nav,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 20px, 1280px);
  }

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

  .hero {
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .hero-text {
    font-size: 0.98rem;
  }

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

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

  .page-title {
    padding: 28px 20px;
  }

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

  .rank-score {
    justify-self: start;
    width: auto;
    height: auto;
    padding: 7px 10px;
    border-radius: 999px;
  }

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