:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --bg-card-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --line-bright: rgba(56, 189, 248, 0.35);
  --text: #e5eefb;
  --muted: #94a3b8;
  --dim: #64748b;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --danger: #fb7185;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 36rem),
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.16), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7, #38bdf8 55%, #7dd3fc);
  color: #00111f;
  font-weight: 900;
  box-shadow: 0 12px 36px rgba(56, 189, 248, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-text strong {
  color: #fff;
  letter-spacing: 0.02em;
  font-size: 18px;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 12px;
  color: #cbd5e1;
  border-radius: 999px;
  transition: 0.2s ease;
  font-weight: 600;
  white-space: nowrap;
}

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

.header-search {
  position: relative;
  width: 230px;
  flex-shrink: 0;
}

.header-search input,
.mobile-search input,
.wide-search input,
.listing-tools input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  padding: 12px 16px;
  transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.listing-tools input:focus {
  border-color: var(--line-bright);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
}

.search-panel.open {
  display: block;
}

.search-panel a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.search-panel a:last-child {
  border-bottom: 0;
}

.search-panel strong {
  display: block;
  color: #fff;
  font-size: 14px;
}

.search-panel span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-panel a:hover {
  background: rgba(51, 65, 85, 0.72);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: #dbeafe;
}

.mobile-nav a:hover {
  background: var(--accent-soft);
}

.mobile-search {
  position: relative;
  margin-top: 8px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.84) 38%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 45%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: max(24px, calc((100vw - 1240px) / 2));
  width: min(660px, calc(100vw - 48px));
  transform: translateY(-45%);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7dd3fc;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 18px;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.hero-content h1 {
  font-size: clamp(42px, 7vw, 86px);
}

.hero-summary {
  max-width: 620px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.hero-tags {
  margin: 24px 0 30px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #bae6fd;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.primary-btn,
.wide-search button,
.listing-tools button {
  border: 0;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #00111f;
  box-shadow: 0 18px 42px rgba(56, 189, 248, 0.24);
}

.ghost-btn,
.listing-tools button[data-clear-filter] {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
  box-shadow: none;
}

.primary-btn:hover,
.ghost-btn:hover,
.wide-search button:hover,
.listing-tools button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: max(24px, calc((100vw - 1240px) / 2));
  width: min(360px, 28vw);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
  box-shadow: var(--shadow);
  transform: translateY(-40%);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: max(24px, calc((100vw - 1240px) / 2));
  bottom: 42px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 40px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.28);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--accent);
}

.search-band {
  position: relative;
  z-index: 5;
  margin-top: -52px;
  padding: 0 16px 46px;
}

.search-band-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-band h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(22px, 3vw, 34px);
}

.search-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.wide-search,
.listing-tools {
  display: flex;
  gap: 10px;
}

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

.alt-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1240px) / 2));
  padding-right: max(16px, calc((100vw - 1240px) / 2));
  background: rgba(15, 23, 42, 0.36);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head h2 {
  margin: 8px 0 8px;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

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

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7dd3fc;
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-bright);
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.42);
}

.movie-card.is-hidden {
  display: none;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #172554);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.92);
  color: #00111f;
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.34);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.9);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}

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

.movie-meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #7dd3fc;
}

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

.movie-card.compact .movie-card-body {
  padding: 13px;
}

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

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.28);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img {
  opacity: 0.48;
  transform: scale(1.07);
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.15));
}

.category-card div {
  position: relative;
  z-index: 2;
}

.category-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

.ranking-box {
  position: sticky;
  top: 100px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--bg-card-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ranking-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.ranking-title span {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.ranking-title a {
  color: #7dd3fc;
  font-weight: 800;
}

.ranking-box ol {
  list-style: none;
  margin: 0;
  padding: 10px;
}

.ranking-box li a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
}

.ranking-box li a:hover {
  background: rgba(51, 65, 85, 0.56);
}

.rank-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
  font-weight: 900;
}

.ranking-box strong,
.ranking-box em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-box strong {
  color: #fff;
  font-size: 15px;
}

.ranking-box em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 88px max(16px, calc((100vw - 1240px) / 2)) 72px;
  border-bottom: 1px solid var(--line);
}

.small-hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.18), transparent 32rem),
    linear-gradient(135deg, #020617, #0f172a 60%, #111827);
}

.category-hero img,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
}

.page-hero-overlay,
.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.42));
}

.page-hero > div,
.category-hero > div:not(.page-hero-overlay) {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.page-hero p {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  margin: 0 0 24px;
}

.listing-tools {
  margin: 0 0 26px;
  max-width: 760px;
}

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

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

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

.breadcrumb a:hover {
  color: #7dd3fc;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 34px;
  align-items: center;
}

.player-card,
.detail-info,
.prose-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.player-card {
  padding: 16px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  cursor: pointer;
}

.player-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.5));
  cursor: pointer;
}

.player-button span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #00111f;
  font-size: 36px;
  font-weight: 900;
  box-shadow: 0 22px 60px rgba(56, 189, 248, 0.36);
}

.player-button.is-hidden {
  display: none;
}

.detail-info {
  padding: clamp(24px, 4vw, 40px);
}

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

.detail-one-line {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

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

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

.prose-card,
.side-card {
  padding: clamp(24px, 4vw, 38px);
}

.prose-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 28px;
}

.prose-card h2:not(:first-child) {
  margin-top: 34px;
}

.prose-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.95;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px 16px;
  margin: 0;
}

.side-card dt {
  color: var(--dim);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: #e2e8f0;
}

.ranking-grid .movie-card:nth-child(-n + 3) {
  border-color: rgba(251, 113, 133, 0.45);
}

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

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

  .hero-poster {
    display: none;
  }

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

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

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

  .ranking-box {
    position: relative;
    top: auto;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 68px;
    width: min(100% - 24px, 1240px);
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    top: 54%;
    transform: translateY(-45%);
  }

  .hero-actions,
  .wide-search,
  .listing-tools {
    flex-direction: column;
  }

  .search-band-inner {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

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

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

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

  .movie-card p {
    font-size: 13px;
  }

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

  .detail-inner {
    padding-bottom: 42px;
  }

  .detail-info,
  .player-card,
  .prose-card,
  .side-card {
    border-radius: 22px;
  }

  .player-button span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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