:root {
  color-scheme: dark;
  --deep-950: #050812;
  --deep-900: #090f1f;
  --deep-850: #0d1529;
  --deep-800: #111c35;
  --cloud-700: #6d5dfc;
  --cloud-500: #8b7dff;
  --cloud-400: #a79cff;
  --cyber-500: #24c6dc;
  --cyber-400: #54e0ff;
  --rose-400: #fb7185;
  --text: #f7f8ff;
  --muted: #b7bfd7;
  --soft: #78829f;
  --line: rgba(167, 156, 255, 0.18);
  --panel: rgba(13, 21, 41, 0.76);
  --panel-solid: #101a31;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(109, 93, 252, 0.26), transparent 34%),
    radial-gradient(circle at 80% 12%, rgba(36, 198, 220, 0.18), transparent 32%),
    linear-gradient(180deg, var(--deep-900), var(--deep-950) 48%, #03050d);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(167, 156, 255, 0.16);
  background: rgba(5, 8, 18, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cloud-700), var(--cyber-500));
  box-shadow: 0 12px 36px rgba(109, 93, 252, 0.35);
}

.logo-text {
  font-size: 22px;
  background: linear-gradient(90deg, #ffffff, var(--cloud-400), var(--cyber-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-item {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-item:hover,
.nav-item.is-active {
  color: white;
  background: rgba(167, 156, 255, 0.13);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(350px, 32vw);
  border: 1px solid rgba(167, 156, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.header-search input,
.big-search input,
.page-search {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 11px 14px;
}

.header-search button,
.big-search button {
  border: 0;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cloud-700), var(--cyber-500));
}

.header-search button {
  align-self: stretch;
  padding: 0 17px;
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: white;
  border-radius: 10px;
}

main,
.page-shell,
.detail-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 660px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid rgba(167, 156, 255, 0.18);
  border-radius: 36px;
  background: #08101f;
  box-shadow: var(--shadow);
}

.hero-slides {
  position: relative;
  min-height: 660px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(5, 8, 18, 0.98) 0%, rgba(5, 8, 18, 0.82) 42%, rgba(5, 8, 18, 0.2) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 26% 28%, rgba(109, 93, 252, 0.34), transparent 34%),
    linear-gradient(180deg, transparent, rgba(5, 8, 18, 0.92));
}

.hero-content {
  position: relative;
  min-height: 660px;
  padding: clamp(36px, 6vw, 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 360px;
  align-items: center;
  gap: 54px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyber-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-summary,
.page-hero p,
.detail-line {
  max-width: 730px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.tag-row span,
.category-chip,
.card-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(167, 156, 255, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.hero-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--cloud-700), var(--cyber-500));
  box-shadow: 0 16px 36px rgba(36, 198, 220, 0.22);
}

.ghost-btn,
.section-link {
  border: 1px solid rgba(167, 156, 255, 0.22);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.movie-card:hover,
.rank-row:hover,
.category-chip:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-img,
.detail-img,
.poster-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #1b2440, #0d1529);
}

.hero-poster span {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 9px 13px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  left: clamp(36px, 6vw, 74px);
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--cloud-400), var(--cyber-400));
}

.quick-panel,
.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 24px;
  margin: 28px 0;
}

.quick-card,
.story-card,
.category-card,
.category-preview,
.page-hero,
.watch-section,
.section {
  border: 1px solid rgba(167, 156, 255, 0.16);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.quick-card,
.story-card,
.category-card,
.category-preview,
.page-hero,
.watch-section {
  padding: clamp(22px, 4vw, 36px);
}

.quick-card h2,
.section-heading h2,
.category-preview h3,
.story-card h2,
.category-card h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.quick-card p,
.story-card p,
.category-card p,
.category-preview p {
  color: var(--muted);
  line-height: 1.75;
}

.big-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 8px;
  border: 1px solid rgba(167, 156, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.big-search input {
  min-height: 46px;
  padding: 0 16px;
}

.big-search button {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
}

.section {
  margin: 28px 0;
  padding: clamp(22px, 4vw, 34px);
}

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.with-search {
  align-items: center;
}

.page-search {
  max-width: 320px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(167, 156, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.category-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-chip.is-active {
  color: white;
  background: linear-gradient(135deg, rgba(109, 93, 252, 0.42), rgba(36, 198, 220, 0.24));
}

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

.small-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.tiny-grid {
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(167, 156, 255, 0.13);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.055);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(84, 224, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--deep-800);
}

.card-poster img {
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .card-poster img {
  transform: scale(1.04);
  filter: saturate(1.12);
}

.card-year,
.card-type {
  position: absolute;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.card-year {
  left: 10px;
}

.card-type {
  right: 10px;
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  margin-bottom: 8px;
  overflow: hidden;
  color: white;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.rank-title:hover,
.category-card h2 a:hover {
  color: var(--cyber-400);
}

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

.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta span,
.rank-meta span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
}

.rank-number {
  color: var(--cyber-400);
  font-size: 22px;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
}

.rank-title {
  color: white;
  font-size: 18px;
  font-weight: 900;
}

.rank-content p {
  margin: 6px 0 9px;
  color: var(--muted);
  line-height: 1.55;
}

.rank-score {
  justify-self: end;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, rgba(109, 93, 252, 0.42), rgba(36, 198, 220, 0.22));
}

.stacked-categories {
  display: grid;
  gap: 22px;
}

.category-preview-head,
.footer-inner,
.category-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.category-preview {
  padding: 24px;
}

.category-preview-head {
  align-items: start;
  margin-bottom: 18px;
}

.category-preview-head a {
  color: var(--cyber-400);
  font-weight: 900;
}

.page-hero {
  position: relative;
  margin: 28px 0;
  overflow: hidden;
  background-image:
    linear-gradient(120deg, rgba(5, 8, 18, 0.94), rgba(13, 21, 41, 0.7)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.page-hero h1 {
  max-width: 780px;
  font-size: clamp(34px, 6vw, 64px);
}

.slim-hero {
  min-height: auto;
}

.category-list-page {
  display: grid;
  gap: 24px;
  margin-bottom: 28px;
}

.category-card {
  flex-direction: column;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyber-400);
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  padding: clamp(24px, 5vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(167, 156, 255, 0.18);
  border-radius: 36px;
  background-image:
    linear-gradient(90deg, rgba(5, 8, 18, 0.96), rgba(13, 21, 41, 0.82)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.detail-info h1 {
  font-size: clamp(34px, 6vw, 66px);
}

.detail-tags {
  margin-top: 18px;
}

.watch-section {
  margin: 28px 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.35);
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: white;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(5, 8, 18, 0.1), rgba(5, 8, 18, 0.68));
}

.play-cover.is-hidden {
  display: none;
}

.play-ring {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cloud-700), var(--cyber-500));
  box-shadow: 0 18px 52px rgba(36, 198, 220, 0.35);
  font-size: 28px;
}

.detail-content {
  align-items: stretch;
}

.story-card p:last-child {
  font-size: 16px;
}

.site-footer {
  margin-top: 46px;
  border-top: 1px solid rgba(167, 156, 255, 0.14);
  background: rgba(5, 8, 18, 0.52);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  align-items: start;
}

.footer-inner p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  max-width: 480px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--cyber-400);
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 980px) {
  .header-inner {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    order: 4;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(5, 8, 18, 0.94);
  }

  .nav-links.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .header-search {
    order: 5;
    width: 100%;
    margin-left: 0;
  }

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

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

  .hero-poster {
    width: min(270px, 72vw);
  }

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

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  main,
  .page-shell,
  .detail-page {
    width: min(100% - 22px, 1240px);
  }

  .hero {
    border-radius: 24px;
  }

  .hero-content {
    padding: 26px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.05em;
  }

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

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

  .section,
  .quick-card,
  .story-card,
  .category-card,
  .category-preview,
  .page-hero,
  .watch-section {
    border-radius: 22px;
  }

  .section-heading,
  .category-preview-head,
  .footer-inner {
    display: grid;
  }

  .page-search {
    max-width: 100%;
  }

  .detail-hero {
    padding: 18px;
  }

  .detail-poster {
    width: min(220px, 70vw);
  }

  .card-body {
    padding: 11px;
  }

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

  .rank-content p {
    display: none;
  }

  .rank-title {
    font-size: 15px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
