:root {
  color-scheme: dark;
  --page-bg: #070812;
  --panel-bg: rgba(255, 255, 255, 0.10);
  --panel-border: rgba(255, 255, 255, 0.20);
  --soft-border: rgba(255, 255, 255, 0.12);
  --text-main: #ffffff;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --blueberry-300: #beb6fd;
  --blueberry-400: #9d8df9;
  --blueberry-500: #7d60f5;
  --blueberry-600: #6d3eed;
  --night-400: #69d3ff;
  --warm-star: #facc15;
  --radius-xl: 22px;
  --radius-2xl: 30px;
  --shadow-heavy: 0 25px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(109, 62, 237, 0.36), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(105, 211, 255, 0.20), transparent 30%),
    linear-gradient(135deg, #080915 0%, #101328 45%, #06070f 100%);
  color: var(--text-main);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 82%);
}

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

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

button,
input,
select {
  font: inherit;
}

.glass-effect {
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-heavy);
}

.logo-orb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blueberry-500), var(--night-400));
  color: #ffffff;
  box-shadow: 0 0 24px rgba(157, 141, 249, 0.62);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 8, 18, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--blueberry-400), var(--night-400));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 12px rgba(93, 119, 255, 0.35);
}

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

.nav-link {
  color: var(--text-soft);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blueberry-400);
  text-shadow: 0 0 10px rgba(93, 119, 255, 0.80);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.header-search input {
  width: 170px;
  border: 0;
  outline: none;
  padding: 7px 10px;
  background: transparent;
  color: var(--text-main);
}

.header-search input::placeholder,
.filter-row input::placeholder {
  color: rgba(209, 213, 219, 0.68);
}

.header-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.header-search button,
.primary-btn {
  padding: 9px 16px;
  background: linear-gradient(135deg, var(--blueberry-500), var(--blueberry-600));
  color: #ffffff;
  font-weight: 700;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-weight: 700;
}

.primary-btn:hover,
.ghost-btn:hover,
.header-search button:hover {
  transform: translateY(-2px);
}

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

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}

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

.hero-slider {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  margin: 14px 0 56px;
}

.star-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.8;
}

.star-field span {
  position: absolute;
  border-radius: 999px;
  background: #ffffff;
  animation: twinkle 3.8s ease-in-out infinite;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: 42px;
  padding: 54px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.99);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-image {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

.hero-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.78));
}

.hero-image img {
  width: 100%;
  height: 100%;
  min-height: 410px;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--blueberry-300);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.05;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 6vw, 4.9rem);
  background: linear-gradient(90deg, var(--blueberry-400), var(--night-400));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-copy h2 {
  margin-top: 12px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.hero-copy p,
.page-hero p,
.lead-text {
  color: var(--text-soft);
  font-size: 1.05rem;
}

.hero-meta,
.detail-meta,
.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-meta-line span {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-soft);
  font-size: 0.85rem;
}

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

.hero-dots {
  position: absolute;
  right: 34px;
  bottom: 28px;
  display: flex;
  gap: 9px;
  z-index: 4;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--blueberry-400);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.section-title.tight {
  margin-bottom: 14px;
}

.section-title span {
  color: var(--blueberry-400);
  text-shadow: 0 0 12px rgba(93, 119, 255, 0.65);
}

.section-title h2 {
  flex: 1;
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.section-title a {
  color: var(--blueberry-300);
  font-weight: 700;
}

.movie-grid,
.featured-grid,
.category-grid,
.category-page-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-7px) scale(1.02);
  border-color: rgba(157, 141, 249, 0.58);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.38);
}

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

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.movie-card-small .movie-poster {
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .movie-poster img {
  transform: scale(1.10);
  filter: brightness(0.82);
}

.movie-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.72));
}

.movie-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(109, 62, 237, 0.88);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(125, 96, 245, 0.90);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
  padding: 15px;
}

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 2.9em;
  margin: 0 0 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-small .movie-card-body p,
.movie-card-small .movie-tags {
  display: none;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.movie-tags span,
.detail-tags span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--blueberry-300);
  font-size: 0.78rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

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

.ranking-panel,
.rank-page-panel,
.filter-panel,
.page-hero,
.detail-text {
  border-radius: var(--radius-xl);
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.rank-row img {
  width: 64px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-num {
  color: var(--blueberry-300);
  font-weight: 900;
}

.rank-main {
  min-width: 0;
}

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

.rank-main em {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-style: normal;
}

.rank-score {
  color: var(--warm-star);
  font-weight: 800;
}

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

.category-tile,
.category-card {
  display: grid;
  align-content: start;
  gap: 12px;
  border-radius: var(--radius-xl);
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(157, 141, 249, 0.58);
}

.category-tile span,
.category-card-title {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 900;
}

.category-tile p,
.category-card p {
  margin: 0;
  color: var(--text-soft);
}

.category-tile em {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-style: normal;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a {
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--blueberry-300);
  font-size: 0.82rem;
}

.small-hero {
  margin-bottom: 32px;
  background:
    radial-gradient(circle at 8% 18%, rgba(125, 96, 245, 0.34), transparent 32%),
    rgba(255, 255, 255, 0.10);
}

.page-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 190px));
  gap: 12px;
  margin-bottom: 24px;
}

.rank-filter {
  grid-template-columns: minmax(240px, 1fr);
}

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

.filter-row select option {
  background: #101328;
  color: #ffffff;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  color: var(--text-soft);
  text-align: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--text-muted);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  border-radius: var(--radius-2xl);
  padding: 24px;
  margin-bottom: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
  color: #ffffff;
  cursor: pointer;
}

.play-cover span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(125, 96, 245, 0.92);
  box-shadow: 0 0 40px rgba(125, 96, 245, 0.7);
  font-size: 2rem;
}

.player-box.is-playing .play-cover {
  display: none;
}

.detail-info h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.detail-info .ghost-btn {
  margin-top: 22px;
}

.detail-text {
  margin-bottom: 28px;
}

.detail-text h2 {
  margin: 0 0 12px;
}

.detail-text p {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.02rem;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 8, 18, 0.70);
}

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

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

.footer-inner p,
.footer-inner a,
.footer-inner span {
  display: block;
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-inner a:hover {
  color: var(--blueberry-300);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 18px 0 28px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.28;
  }
}

@media (max-width: 1060px) {
  .featured-grid,
  .movie-grid,
  .category-movie-grid,
  .search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .split-section,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    padding: 16px;
    background: rgba(7, 8, 18, 0.96);
  }

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

  .header-search,
  .header-search input {
    width: 100%;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .hero-image,
  .hero-image img {
    min-height: 270px;
  }

  .hero-dots {
    position: static;
    justify-content: center;
    padding-bottom: 20px;
  }

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

@media (max-width: 620px) {
  .page-main {
    width: min(100% - 24px, 1180px);
    padding-top: 22px;
  }

  .hero-slider {
    min-height: auto;
    margin-top: 0;
  }

  .featured-grid,
  .movie-grid,
  .compact-grid,
  .four-grid,
  .category-grid,
  .category-page-grid,
  .category-movie-grid,
  .search-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-score {
    display: none;
  }

  .detail-hero,
  .ranking-panel,
  .rank-page-panel,
  .filter-panel,
  .page-hero,
  .detail-text {
    padding: 18px;
  }

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