:root {
  --bg: #080916;
  --panel: rgba(18, 22, 42, 0.82);
  --panel-strong: #12162a;
  --text: #f7f8ff;
  --muted: #a7acc2;
  --line: rgba(255, 255, 255, 0.1);
  --brand: #7c3aed;
  --brand-2: #06b6d4;
  --accent: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.28), transparent 34rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 32rem),
    linear-gradient(180deg, #0b1024 0%, #080916 50%, #060710 100%);
}

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

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

button,
input {
  font: inherit;
}

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

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

.logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #ffffff, #a78bfa 50%, #67e8f9);
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

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

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  flex-wrap: wrap;
}

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

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  padding: 36px 0 24px;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: var(--panel-strong);
}

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

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

.hero-slide > img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 18, 0.94), rgba(5, 7, 18, 0.58), rgba(5, 7, 18, 0.14)),
    linear-gradient(0deg, rgba(5, 7, 18, 0.88), transparent 48%);
}

.hero-content {
  position: absolute;
  left: clamp(22px, 6vw, 72px);
  bottom: clamp(32px, 8vw, 86px);
  width: min(680px, calc(100% - 44px));
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 18px 0 0;
  font-size: clamp(24px, 3vw, 42px);
}

.hero p,
.page-hero p,
.lead-text {
  max-width: 760px;
  color: #d5d9ec;
  font-size: 17px;
  line-height: 1.8;
}

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

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

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 36px rgba(124, 58, 237, 0.35);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.hero-dots {
  position: absolute;
  left: clamp(22px, 6vw, 72px);
  bottom: 24px;
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  background: white;
}

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

.search-panel,
.hero-category-strip,
.story-card,
.category-large-card,
.page-hero {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel {
  padding: 24px;
}

.search-panel span {
  display: block;
  margin-bottom: 14px;
  font-weight: 900;
  font-size: 20px;
}

.search-panel form,
.inline-search,
.search-large {
  display: flex;
  gap: 10px;
}

.search-panel input,
.inline-search input,
.search-large input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.search-panel button,
.inline-search button,
.search-large button {
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  cursor: pointer;
}

.hero-category-strip {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  transition: 0.2s ease;
}

.hero-mini-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

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

.content-section {
  padding: 42px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  padding: 11px 16px;
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.14);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.16);
  transition: 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.movie-info {
  padding: 16px;
}

.movie-meta {
  display: flex;
  gap: 8px;
  color: #93c5fd;
  font-size: 12px;
}

.movie-info h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-card.compact .movie-info p {
  display: none;
}

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

.category-card,
.category-large-card {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.06);
  transition: 0.2s ease;
}

.category-card:hover,
.category-large-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.45);
}

.category-thumbs,
.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.category-thumbs img,
.category-cover img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.category-card span,
.category-large-card p {
  color: var(--muted);
  line-height: 1.7;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 54px minmax(0, 1fr) minmax(120px, 240px) 60px;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  transition: 0.2s ease;
}

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

.rank-number {
  color: #fde68a;
  font-weight: 900;
  font-size: 18px;
}

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

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-tags {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #67e8f9;
  font-weight: 900;
}

.page-hero {
  margin-top: 34px;
  padding: clamp(28px, 6vw, 64px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.08)),
    var(--panel);
}

.category-list-section {
  display: grid;
  gap: 18px;
}

.category-large-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: center;
}

.inline-movie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.inline-movie-links a {
  padding: 8px 10px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.chip.active,
.chip:hover {
  color: white;
  border-color: rgba(124, 58, 237, 0.55);
  background: rgba(124, 58, 237, 0.24);
}

.search-large {
  max-width: 720px;
  margin-top: 24px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 0 0 34px 34px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #080916 0%, rgba(8, 9, 22, 0.82) 44%, rgba(8, 9, 22, 0.4) 100%);
}

.detail-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
  min-height: 620px;
  padding: 42px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.breadcrumb a {
  color: #93c5fd;
}

.player-section {
  padding: 38px 0 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.44));
  cursor: pointer;
  transition: 0.2s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 50px rgba(124, 58, 237, 0.45);
  font-size: 38px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.story-card {
  padding: 24px;
}

.story-card h2 {
  margin: 0 0 14px;
}

.story-card p {
  margin: 0;
  color: #d5d9ec;
  line-height: 1.9;
}

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

.info-table div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
}

.info-table dt {
  color: var(--muted);
}

.info-table dd {
  margin: 0;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: 34px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 28px;
}

.footer-grid strong {
  display: block;
  margin-bottom: 12px;
  color: white;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #bfdbfe;
}

.copyright {
  margin-top: 24px;
  font-size: 13px;
}

.is-filter-hidden,
.is-search-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-slider {
    min-height: 560px;
  }

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

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

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

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

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

  .hero-slider {
    min-height: 640px;
  }

  .hero-content {
    bottom: 54px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .hero-side,
  .hero-category-strip,
  .category-large-card,
  .detail-wrap,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 14px;
  }

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

  .rank-tags {
    display: none;
  }

  .detail-wrap {
    min-height: auto;
    padding-top: 34px;
  }

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

@media (max-width: 520px) {
  main,
  .nav-wrap,
  .mobile-nav,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    padding-top: 18px;
  }

  .hero-slider {
    min-height: 610px;
    border-radius: 24px;
  }

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

  .search-panel form,
  .inline-search,
  .search-large {
    flex-direction: column;
  }

  .search-panel button,
  .inline-search button,
  .search-large button {
    min-height: 46px;
  }
}
