:root {
  --bg: #070b18;
  --bg-2: #0d1430;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #f7f9ff;
  --muted: #a9b5d6;
  --line: rgba(255, 255, 255, 0.13);
  --brand: #7c5cff;
  --brand-2: #17d1ff;
  --gold: #ffd166;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 92, 255, 0.28), transparent 32rem),
    radial-gradient(circle at 85% 12%, rgba(23, 209, 255, 0.18), transparent 28rem),
    linear-gradient(180deg, #050814 0%, var(--bg) 50%, #090d1d 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, black, transparent 76%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(5, 8, 20, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.35);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
}

.brand-slogan {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.nav-active {
  color: #fff;
  background: var(--panel-strong);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

.search-form input {
  width: 190px;
  padding: 10px 14px;
}

.search-form button,
.mobile-search button,
.search-hero button,
.menu-toggle,
.btn,
.filter-btn {
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  transition: 0.2s ease;
}

.search-form button,
.menu-toggle {
  width: 40px;
  height: 40px;
  background: var(--panel-strong);
}

.menu-toggle {
  display: none;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
  background: rgba(5, 8, 20, 0.94);
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: var(--muted);
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: -60px;
  opacity: 0.45;
  filter: blur(10px);
}

.hero-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(5, 8, 20, 0.98), rgba(5, 8, 20, 0.58), rgba(5, 8, 20, 0.95));
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  align-items: center;
  min-height: 640px;
  padding: 70px 0;
}

.hero-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  color: #dce5ff;
  font-size: 18px;
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.hero-meta,
.detail-meta,
.card-foot,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.card-foot span,
.card-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 30px rgba(23, 209, 255, 0.22);
}

.btn-soft {
  background: rgba(255, 255, 255, 0.12);
  color: #e8edff;
}

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

.hero-side {
  display: grid;
  gap: 12px;
}

.hero-mini {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-mini.is-active,
.hero-mini:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-mini strong {
  display: block;
}

.hero-controls {
  position: absolute;
  bottom: 34px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
  background: #fff;
}

.main-section {
  padding: 52px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-icon {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 26px;
}

.section-link {
  color: var(--brand-2);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
  transition: 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.11);
}

.poster-link {
  position: relative;
  display: block;
}

.poster-art {
  position: relative;
  display: grid;
  place-content: end start;
  width: 100%;
  aspect-ratio: 2 / 3;
  min-height: 210px;
  overflow: hidden;
  padding: 18px;
  isolation: isolate;
}

.poster-art::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background: radial-gradient(circle at 30% 15%, rgba(255, 255, 255, 0.35), transparent 20rem), var(--poster-bg);
}

.poster-art::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.68) 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 13px);
}

.poster-mark {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  font-size: 20px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.poster-title {
  display: block;
  max-width: 100%;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.16;
}

.poster-category {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.poster-tone-0 { --poster-bg: linear-gradient(135deg, #5f2c82, #49a09d); }
.poster-tone-1 { --poster-bg: linear-gradient(135deg, #0f2027, #2c5364); }
.poster-tone-2 { --poster-bg: linear-gradient(135deg, #ee0979, #ff6a00); }
.poster-tone-3 { --poster-bg: linear-gradient(135deg, #42275a, #734b6d); }
.poster-tone-4 { --poster-bg: linear-gradient(135deg, #141e30, #243b55); }
.poster-tone-5 { --poster-bg: linear-gradient(135deg, #1d4350, #a43931); }
.poster-tone-6 { --poster-bg: linear-gradient(135deg, #000428, #004e92); }
.poster-tone-7 { --poster-bg: linear-gradient(135deg, #2b5876, #4e4376); }
.poster-tone-8 { --poster-bg: linear-gradient(135deg, #3a1c71, #d76d77, #ffaf7b); }
.poster-tone-9 { --poster-bg: linear-gradient(135deg, #232526, #414345); }
.poster-tone-10 { --poster-bg: linear-gradient(135deg, #0b486b, #f56217); }
.poster-tone-11 { --poster-bg: linear-gradient(135deg, #1f1c2c, #928dab); }

.duration-badge,
.play-float {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(8px);
}

.duration-badge {
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  font-size: 12px;
}

.play-float {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.card-body {
  padding: 16px;
}

.card-category {
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 800;
}

.card-body h3 {
  margin: 6px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.card-body p {
  display: -webkit-box;
  min-height: 4.95em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-foot {
  font-size: 12px;
}

.featured-card {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 30px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
}

.featured-image {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}

.featured-poster {
  min-height: 440px;
}

.featured-play {
  position: absolute;
  left: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.featured-copy {
  align-self: center;
}

.featured-copy h2 {
  margin: 12px 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.06;
}

.featured-copy p {
  color: #dce5ff;
}

.feature-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #eaf0ff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

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

.list-stack .movie-card {
  display: grid;
  grid-template-columns: 210px 1fr;
}

.list-stack .poster-art {
  min-height: 220px;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.category-tile::after,
.category-card::after {
  position: absolute;
  right: -30px;
  bottom: -44px;
  content: "";
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.16);
}

.category-icon {
  position: relative;
  z-index: 2;
  display: inline-flex;
  margin-bottom: 12px;
  font-size: 30px;
}

.category-tile h3,
.category-card h2 {
  position: relative;
  z-index: 2;
  margin: 0 0 8px;
}

.category-tile p,
.category-card p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--muted);
}

.category-card ul {
  position: relative;
  z-index: 2;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.category-card li + li {
  margin-top: 6px;
}

.category-card li a {
  color: #dce5ff;
}

.page-hero {
  padding: 80px 0 48px;
  background: radial-gradient(circle at 15% 20%, rgba(124, 92, 255, 0.24), transparent 28rem);
}

.page-hero.blue {
  background: radial-gradient(circle at 80% 10%, rgba(23, 209, 255, 0.24), transparent 30rem);
}

.page-hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #dce5ff;
  font-size: 18px;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

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

.sticky-side {
  position: sticky;
  top: 96px;
}

.side-section,
.detail-section,
.player-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.17);
}

.side-section {
  padding: 18px;
}

.side-section h2,
.detail-section h2 {
  margin: 0 0 14px;
}

.player-panel {
  overflow: hidden;
  margin-bottom: 18px;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #02040a;
}

.player-box .poster-art {
  aspect-ratio: 16 / 8;
  min-height: 390px;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.52));
}

.player-panel.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

.player-start-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-weight: 900;
}

.player-start-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.player-info,
.detail-section {
  padding: 20px;
}

.player-info h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.player-info p,
.detail-section p {
  color: #dce5ff;
}

.detail-dl {
  margin: 0 0 22px;
}

.detail-dl div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-dl dt {
  color: var(--muted);
}

.detail-dl dd {
  margin: 0;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
}

.side-poster,
.rank-poster,
.hero-mini-poster {
  min-height: 0;
  aspect-ratio: 1;
  border-radius: 12px;
  padding: 8px;
}

.side-poster .poster-mark,
.side-poster .poster-category,
.rank-poster .poster-mark,
.rank-poster .poster-category,
.hero-mini-poster .poster-mark,
.hero-mini-poster .poster-category {
  display: none;
}

.side-poster .poster-title,
.rank-poster .poster-title,
.hero-mini-poster .poster-title {
  font-size: 11px;
}

.side-card strong {
  display: block;
  font-size: 14px;
}

.side-card span span {
  color: var(--muted);
  font-size: 12px;
}

.rank-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.rank-row {
  display: grid;
  grid-template-columns: 50px 70px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-no {
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
}

.rank-title {
  display: block;
}

.rank-sub {
  color: var(--muted);
  font-size: 13px;
}

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

.small-rank .rank-row {
  grid-template-columns: 36px 54px 1fr;
}

.small-rank .rank-score {
  display: none;
}

.search-hero {
  display: flex;
  gap: 10px;
  max-width: 760px;
  margin-top: 24px;
}

.search-hero input {
  flex: 1;
  padding: 15px 18px;
  font-size: 16px;
}

.search-hero button {
  padding: 0 24px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
}

.search-status {
  margin-top: 0;
  color: var(--muted);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-btn {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.1);
}

.filter-btn.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(2, 4, 10, 0.62);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.footer-grid h3 {
  margin: 0 0 12px;
}

.footer-grid a,
.footer-grid p {
  display: block;
  margin: 7px 0;
  color: var(--muted);
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

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

  .sticky-side {
    position: static;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-slogan {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.is-active {
    display: block;
  }

  .hero-content {
    min-height: 620px;
    padding: 42px 0 70px;
  }

  .hero-side,
  .card-grid-wrap,
  .category-grid,
  .category-overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .list-stack .movie-card,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-poster {
    width: 72px;
  }

  .featured-poster,
  .player-box .poster-art {
    min-height: 280px;
  }

  .search-hero {
    flex-direction: column;
  }
}
