:root {
  color-scheme: dark;
  --deep-space-950: #020617;
  --deep-space-900: #0f172a;
  --deep-space-850: #111c34;
  --deep-space-800: #1e293b;
  --deep-space-700: #334155;
  --cloud-realm-700: #0369a1;
  --cloud-realm-600: #0284c7;
  --cloud-realm-500: #0ea5e9;
  --cloud-realm-400: #38bdf8;
  --cyber-blue-950: #172554;
  --cyber-blue-800: #1e40af;
  --cyber-blue-600: #2563eb;
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-soft: #94a3b8;
  --line: rgba(56, 189, 248, 0.22);
  --panel: rgba(15, 23, 42, 0.86);
  --panel-solid: #0f172a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--deep-space-950);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.20), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(37, 99, 235, 0.18), transparent 32%),
    var(--deep-space-950);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--cloud-realm-500), var(--cyber-blue-600));
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.25);
}

.brand-text,
.footer-brand {
  font-size: 23px;
  background: linear-gradient(90deg, var(--cloud-realm-400), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.nav-link,
.mobile-link {
  color: var(--text-muted);
  border-radius: 12px;
  transition: 0.22s ease;
}

.nav-link {
  padding: 10px 12px;
  font-size: 14px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cloud-realm-400);
  background: rgba(30, 41, 59, 0.92);
}

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

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  color: var(--text-main);
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  transition: 0.22s ease;
}

.header-search input {
  width: 238px;
  padding: 10px 13px;
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.header-search button,
.mobile-search button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--cloud-realm-600), var(--cyber-blue-600));
  box-shadow: 0 15px 32px rgba(2, 132, 199, 0.22);
}

.header-search button,
.mobile-search button {
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--cloud-realm-400);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text-main);
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mobile-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-search {
  margin: 8px 0 14px;
}

.mobile-search input {
  width: 100%;
  padding: 11px 13px;
}

.mobile-link {
  display: block;
  padding: 11px 13px;
}

.home-hero {
  position: relative;
  height: min(82vh, 760px);
  min-height: 560px;
  overflow: hidden;
  background: #000;
}

.hero-track,
.hero-slide,
.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 36%, rgba(2, 6, 23, 0.24) 78%),
    linear-gradient(0deg, var(--deep-space-950) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 760px;
  margin-left: max(16px, calc((100vw - 1280px) / 2));
  padding-top: 50px;
}

.hero-pill,
.detail-category {
  display: inline-flex;
  align-items: center;
  color: #fff;
  background: rgba(37, 99, 235, 0.86);
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.hero-pill {
  padding: 7px 13px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  color: var(--text-muted);
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
}

.hero-tags span {
  padding: 7px 12px;
}

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

.primary-btn,
.ghost-btn,
.outline-link {
  min-height: 46px;
  padding: 0 22px;
  font-weight: 700;
}

.ghost-btn,
.outline-link {
  color: var(--text-main);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.66);
}

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

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 36px;
  background: var(--cloud-realm-500);
}

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

.section-deep,
.section-gradient {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1280px) / 2));
  padding-right: max(16px, calc((100vw - 1280px) / 2));
}

.section-deep {
  background: rgba(15, 23, 42, 0.74);
}

.section-gradient {
  background: linear-gradient(135deg, rgba(23, 37, 84, 0.72), rgba(2, 6, 23, 0.92));
}

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

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

.section-head p {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.section-more {
  color: var(--cloud-realm-400);
  white-space: nowrap;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.46);
  background: rgba(30, 41, 59, 0.84);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--deep-space-800), var(--cyber-blue-950));
}

.card-large .poster-wrap {
  aspect-ratio: 16 / 9;
}

.poster-wrap img,
.compact-card img,
.rank-row img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #fff;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.play-chip {
  left: 12px;
  bottom: 12px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(2, 132, 199, 0.86);
  opacity: 0;
  transform: translateY(6px);
  transition: 0.22s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: rgba(249, 115, 22, 0.92);
}

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.22s ease;
}

.card-title:hover {
  color: var(--cloud-realm-400);
}

.card-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 9px 0 12px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-soft);
  font-size: 12px;
}

.card-meta span {
  padding: 4px 8px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

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

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

.category-tile,
.category-overview-card,
.text-card,
.related-panel,
.editor-panel {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.category-tile {
  min-height: 150px;
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.52);
}

.category-tile strong,
.category-overview-title {
  display: block;
  margin-bottom: 10px;
  color: var(--text-main);
  font-size: 20px;
  font-weight: 850;
}

.category-tile span,
.category-overview-card p,
.editor-panel p {
  color: var(--text-soft);
  line-height: 1.7;
}

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

.category-overview-card {
  padding: 26px;
  transition: 0.24s ease;
}

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

.category-mini-links a {
  overflow: hidden;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-mini-links a:hover {
  color: var(--cloud-realm-400);
}

.ranking-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.ranking-list,
.related-list {
  display: grid;
  gap: 12px;
}

.rank-row,
.compact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 15px;
  transition: 0.22s ease;
}

.rank-row:hover,
.compact-card:hover {
  background: rgba(30, 41, 59, 0.92);
  border-color: var(--line);
}

.list-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 800;
  border-radius: 12px;
  background: rgba(2, 132, 199, 0.86);
}

.rank-row img {
  width: 78px;
  height: 54px;
  border-radius: 10px;
}

.rank-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 760;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: var(--text-soft);
  font-size: 13px;
  white-space: nowrap;
}

.editor-panel {
  padding: 30px;
  align-self: stretch;
}

.editor-panel h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(14, 165, 233, 0.20), transparent 32%),
    linear-gradient(135deg, var(--cyber-blue-950), var(--deep-space-950));
}

.page-hero {
  padding: 78px max(16px, calc((100vw - 1280px) / 2));
}

.small-hero {
  padding-top: 58px;
  padding-bottom: 58px;
}

.page-hero h1,
.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.12;
}

.page-hero p,
.detail-info p {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
  min-height: 48px;
  padding: 0 15px;
}

.filter-bar input {
  flex: 1;
}

.filter-bar select {
  min-width: 160px;
}

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

.detail-hero {
  min-height: 620px;
}

.detail-backdrop,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: blur(2px);
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.62)),
    linear-gradient(0deg, var(--deep-space-950), transparent 48%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.detail-category {
  padding: 7px 14px;
  margin-bottom: 18px;
  font-weight: 750;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 30px;
}

.detail-meta span {
  padding: 8px 12px;
  color: var(--text-muted);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
}

.detail-main {
  padding-top: 46px;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.16), rgba(2, 6, 23, 0.56));
  border: 0;
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  font-size: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cloud-realm-600), var(--cyber-blue-600));
  box-shadow: 0 20px 48px rgba(2, 132, 199, 0.34);
}

.player-card.is-playing .player-start {
  display: none;
}

.text-card,
.related-panel {
  padding: 26px;
  margin-top: 22px;
}

.text-card h2,
.related-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.95;
}

.detail-tags a {
  padding: 7px 12px;
  font-size: 14px;
}

.detail-tags a:hover {
  color: var(--cloud-realm-400);
  border-color: var(--line);
}

.related-panel {
  position: sticky;
  top: 98px;
  margin-top: 0;
}

.compact-card img {
  width: 74px;
  height: 104px;
  flex: 0 0 auto;
  border-radius: 10px;
}

.compact-card span {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 760;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-panel .outline-link {
  width: 100%;
  margin-top: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 30px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
}

.footer-inner p {
  max-width: 560px;
  color: var(--text-soft);
  line-height: 1.75;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  align-content: start;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  padding: 8px 12px;
  color: var(--text-muted);
  background: rgba(30, 41, 59, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
}

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

.footer-copy {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  color: var(--text-soft);
  border-top: 1px solid rgba(148, 163, 184, 0.10);
}

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

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

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

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

  .watch-layout,
  .ranking-split {
    grid-template-columns: 1fr;
  }

  .related-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .home-hero {
    min-height: 640px;
  }

  .hero-content {
    margin-left: 16px;
    padding-right: 16px;
  }

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

  .six-cols,
  .five-cols,
  .four-cols,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(310px, 76vw);
  }

  .footer-inner {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 24px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
  }

  .brand-text {
    font-size: 19px;
  }

  .content-section {
    width: min(100% - 24px, 1280px);
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .six-cols,
  .five-cols,
  .four-cols,
  .category-grid,
  .category-overview-grid,
  .category-mini-links {
    grid-template-columns: 1fr;
  }

  .movie-grid {
    gap: 16px;
  }

  .home-hero {
    height: 78vh;
    min-height: 590px;
  }

  .hero-actions {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    flex: 1;
  }

  .rank-row {
    align-items: flex-start;
  }

  .rank-meta {
    display: none;
  }

  .page-hero,
  .detail-hero-inner {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .player-start span {
    width: 68px;
    height: 68px;
    font-size: 32px;
  }
}
