:root {
  --bg: #070111;
  --bg-soft: #12051f;
  --card: rgba(59, 7, 100, 0.58);
  --card-strong: rgba(17, 6, 32, 0.82);
  --line: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --muted-2: rgba(255, 255, 255, 0.48);
  --twilight: #9333ea;
  --twilight-light: #c084fc;
  --dusk: #c026d3;
  --sunset: #fb923c;
  --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 12% 10%, rgba(147, 51, 234, 0.25), transparent 30%),
    radial-gradient(circle at 86% 0%, rgba(192, 38, 211, 0.16), transparent 28%),
    linear-gradient(180deg, #05020b 0%, #12051f 42%, #070111 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "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: 42px 42px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 75%);
}

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

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--twilight), var(--dusk));
  box-shadow: 0 0 30px rgba(192, 132, 252, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}

.main-nav a:hover,
.footer-links a:hover,
.rank-title:hover,
.movie-card h3 a:hover {
  color: var(--twilight-light);
}

.nav-toggle {
  display: none;
}

.hero {
  width: min(1280px, calc(100% - 32px));
  min-height: 72vh;
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas:
    "carousel side"
    "rail rail";
  gap: 22px;
}

.hero-carousel {
  grid-area: carousel;
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #090314;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 680ms ease, transform 850ms ease;
}

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

.hero-slide img,
.detail-poster img,
.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(147, 51, 234, 0.55), rgba(192, 38, 211, 0.34)),
    #16072a;
}

.image-missing {
  opacity: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 2, 11, 0.95) 0%, rgba(5, 2, 11, 0.62) 46%, rgba(5, 2, 11, 0.24) 100%),
    linear-gradient(0deg, rgba(5, 2, 11, 0.92) 0%, transparent 52%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(28px, 7vw, 82px);
  width: min(650px, calc(100% - 48px));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--twilight-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #d8b4fe, #f0abfc, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 36px rgba(167, 139, 250, 0.24);
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.quick-links,
.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn,
.hero-search button,
.section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.btn:hover,
.hero-search button:hover,
.section-action:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 180, 254, 0.6);
}

.btn-primary,
.hero-search button {
  border: none;
  background: linear-gradient(135deg, var(--twilight), var(--dusk));
  box-shadow: 0 16px 42px rgba(147, 51, 234, 0.34);
}

.btn-ghost,
.section-action {
  background: rgba(255, 255, 255, 0.08);
}

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, var(--twilight-light), var(--sunset));
}

.dusk-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(112, 26, 117, 0.36), rgba(107, 33, 168, 0.24)),
    rgba(12, 4, 24, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-side {
  grid-area: side;
  padding: 26px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-side h2,
.section-heading h2,
.ranking-head h2,
.text-panel h2,
.player-head h2,
.category-card h3,
.category-overview h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.12;
}

.hero-side p,
.category-card p,
.section-heading p,
.text-panel p,
.player-note,
.category-overview p {
  color: var(--muted);
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 18px 0;
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(216, 180, 254, 0.74);
}

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

.hero-rail {
  grid-area: rail;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.content-section,
.inner-page {
  width: min(1280px, calc(100% - 32px));
  margin: 80px auto 0;
}

.inner-page {
  margin-top: 34px;
}

.no-top {
  margin-top: 28px;
}

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

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

.category-card {
  padding: 22px;
  overflow: hidden;
}

.category-preview,
.compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 180, 254, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(216, 180, 254, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(147, 51, 234, 0.55), rgba(192, 38, 211, 0.32));
}

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

.score-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.movie-meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.movie-card h3 {
  min-height: 48px;
  margin: 8px 0;
  font-size: 17px;
  line-height: 1.35;
}

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

.tag-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-list span {
  padding: 4px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  background: rgba(147, 51, 234, 0.22);
  border: 1px solid rgba(216, 180, 254, 0.16);
}

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

.ranking-box {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 22px;
}

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

.ranking-head a {
  color: var(--twilight-light);
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

.rank-score {
  color: var(--muted-2);
  font-size: 12px;
}

.filter-panel {
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.052);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}

.filter-panel label span {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-result {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 13px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(147, 51, 234, 0.28), rgba(192, 38, 211, 0.16)),
    rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: clamp(34px, 7vw, 82px);
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.category-overview-list {
  display: grid;
  gap: 20px;
}

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

.category-overview-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 30px;
  padding: 26px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.detail-info h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.detail-meta {
  margin: 18px 0;
  color: var(--muted);
  font-size: 14px;
}

.player-section {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 22px;
}

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

.player-head span {
  color: var(--muted);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
}

.video-frame video {
  width: 100%;
  height: 100%;
  background: #000;
}

.video-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 108px;
  height: 108px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--twilight), var(--dusk));
  box-shadow: 0 0 50px rgba(147, 51, 234, 0.62);
  cursor: pointer;
}

.video-play-button.is-hidden {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 22px;
}

.text-panel {
  padding: 24px;
}

.text-panel p {
  font-size: 16px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.rank-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.04);
}

.rank-table th,
.rank-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.rank-table th {
  color: var(--twilight-light);
  font-size: 13px;
  background: rgba(147, 51, 234, 0.14);
}

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

.sitemap-card {
  padding: 22px;
}

.sitemap-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.sitemap-card li {
  margin: 7px 0;
}

.sitemap-movies {
  columns: 4 220px;
}

.full-width {
  grid-column: 1 / -1;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  background: rgba(7, 1, 17, 0.78);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-inner strong {
  color: #fff;
  font-size: 20px;
}

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

@media (max-width: 1100px) {
  .hero,
  .split-layout,
  .category-overview,
  .detail-hero,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-areas:
      "carousel"
      "side"
      "rail";
  }

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

  .ranking-box {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .main-nav {
    justify-content: flex-start;
    gap: 10px;
  }

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

  .hero-content {
    left: 20px;
    bottom: 72px;
    width: calc(100% - 40px);
  }

  .hero-side,
  .category-card,
  .filter-panel,
  .player-section,
  .text-panel {
    padding: 18px;
  }

  .hero-rail,
  .movie-grid,
  .large-grid,
  .category-grid,
  .compact-grid,
  .category-preview,
  .filter-grid,
  .sitemap-grid {
    grid-template-columns: 1fr;
  }

  .category-preview,
  .compact-grid {
    margin-top: 14px;
  }

  .section-heading,
  .footer-inner,
  .player-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero {
    padding: 18px;
  }

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

  .video-play-button {
    width: 86px;
    height: 86px;
    font-size: 15px;
  }
}
