:root {
  --bg-950: #020617;
  --bg-900: #0f172a;
  --bg-850: #111c33;
  --bg-800: #1e293b;
  --bg-700: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --green: #22c55e;
  --orange: #f97316;
  --border: rgba(148, 163, 184, 0.22);
  --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 top left, rgba(37, 99, 235, 0.25), transparent 34rem),
    linear-gradient(180deg, var(--bg-950) 0%, var(--bg-900) 38%, var(--bg-950) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 35px rgba(2, 6, 23, 0.35);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  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;
  white-space: nowrap;
}

.brand span:last-child,
.footer-brand strong {
  font-size: 1.22rem;
  background: linear-gradient(90deg, #60a5fa, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #60a5fa, var(--cyan));
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(34, 211, 238, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  overflow: hidden;
}

.nav-links a {
  color: var(--soft);
  font-size: 0.95rem;
  transition: color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: white;
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.big-search input {
  color: white;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  min-width: 230px;
}

.nav-search input:focus,
.big-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
}

.nav-search button,
.big-search button,
.primary-btn,
.ghost-btn,
.pill-link {
  border: 0;
  cursor: pointer;
  color: white;
  border-radius: 999px;
  padding: 11px 18px;
  background: linear-gradient(90deg, var(--blue), #0891b2);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.25);
  transition: transform 0.25s ease, filter 0.25s ease, background 0.25s ease;
}

.nav-search button:hover,
.big-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.pill-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: white;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 11px;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: var(--bg-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-bg,
.hero-bg img,
.detail-backdrop,
.detail-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg img,
.detail-backdrop img {
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.1) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.7;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 11px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.7);
}

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

.ghost-btn {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--cyan);
}

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

.section-shell {
  padding: 58px 0;
}

.page-main {
  padding: 36px 0 70px;
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: center;
  padding: 34px;
  margin-top: 48px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

.intro-strip h2,
.section-title h2,
.ranking-panel h2,
.detail-text h2,
.category-block h2,
.category-headline h3 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.03em;
}

.intro-strip p,
.page-hero p,
.category-block p,
.category-headline p {
  color: var(--muted);
  line-height: 1.75;
}

.big-search {
  display: flex;
  gap: 10px;
}

.big-search input {
  flex: 1;
  min-width: 0;
}

.section-title,
.category-block-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 28px;
}

.section-title a,
.category-headline a {
  color: var(--cyan);
  font-weight: 700;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link,
.horizontal-card a,
.category-feature,
.category-block,
.ranking-panel,
.ranking-row a,
.detail-text article,
.video-player {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.78);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.22);
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.movie-card-link:hover,
.horizontal-card a:hover,
.ranking-row a:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.46);
  background: rgba(51, 65, 85, 0.92);
  box-shadow: 0 24px 58px rgba(2, 6, 23, 0.38);
}

.card-poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(34, 211, 238, 0.12));
}

.poster-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.22), transparent 40%),
    linear-gradient(135deg, #0f172a, #1e3a8a 54%, #0e7490);
}

.poster-frame img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.poster-frame img.is-missing {
  opacity: 0;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  color: white;
  font-weight: 800;
  line-height: 1.35;
}

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

.year-badge,
.play-badge {
  position: absolute;
  z-index: 3;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.year-badge {
  top: 12px;
  left: 12px;
}

.play-badge {
  right: 12px;
  bottom: 12px;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-body p {
  min-height: 3.2em;
  margin: 12px 0;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.tag-row {
  margin-top: 13px;
  gap: 7px;
}

.tag-row span {
  color: #bfdbfe;
  font-size: 0.74rem;
  padding: 4px 8px;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.ranking-panel ol {
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.ranking-panel li + li {
  margin-top: 12px;
}

.ranking-panel li a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  color: var(--soft);
}

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

.ranking-panel em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

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

.category-feature,
.category-block {
  padding: 24px;
}

.category-feature:hover,
.category-block:hover {
  border-color: rgba(34, 211, 238, 0.35);
}

.category-headline {
  margin-bottom: 18px;
}

.category-samples {
  display: grid;
  gap: 14px;
}

.horizontal-card a {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
}

.horizontal-card .poster-frame {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
}

.horizontal-card strong {
  display: block;
  margin-bottom: 8px;
}

.horizontal-card p {
  margin: 0 0 9px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.horizontal-card span {
  color: var(--cyan);
  font-size: 0.82rem;
}

.page-hero,
.category-page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 42px;
  padding: 50px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.94));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.page-hero p {
  max-width: 820px;
  font-size: 1.08rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
}

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

.category-block {
  margin-bottom: 26px;
}

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

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 70px 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.ranking-row .poster-frame {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.ranking-row h2 {
  margin: 0 0 8px;
}

.ranking-row p {
  margin: 0 0 8px;
  color: var(--muted);
}

.ranking-row span:last-child {
  color: var(--cyan);
  font-size: 0.9rem;
}

.rank-num.big {
  font-size: 1.5rem;
  text-align: center;
}

.detail-hero {
  padding: 0;
  min-height: 520px;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.42)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 60%);
  backdrop-filter: blur(2px);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 56px;
}

.detail-poster .poster-frame {
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(2.2rem, 5vw, 5rem);
}

.detail-one-line {
  max-width: 760px;
  color: #dbeafe;
  font-size: 1.18rem;
  line-height: 1.8;
}

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

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  padding-top: 0;
}

.video-player {
  position: relative;
  background: #000;
  border-radius: 24px;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.26));
  border: 0;
  cursor: pointer;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.38);
  font-size: 2rem;
}

.video-player.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  margin: 0;
  color: #dbeafe;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
}

.video-player.is-playing .player-status {
  display: none;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-text article {
  padding: 28px;
}

.detail-text p {
  color: var(--soft);
  line-height: 1.9;
}

.empty-state {
  margin: 24px 0;
  color: var(--muted);
  text-align: center;
  font-size: 1.1rem;
}

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

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

  .split-layout,
  .intro-strip,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 10px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 8px;
    border-top: 1px solid var(--border);
  }

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

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 96px;
  }

  .hero-arrow {
    display: none;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 28px;
  }

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

  .page-hero,
  .category-page-hero {
    padding: 30px;
  }

  .big-search {
    flex-direction: column;
  }

  .ranking-row a {
    grid-template-columns: 48px 92px minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .section-shell,
  .page-main,
  .nav-shell {
    width: min(100% - 22px, 1280px);
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.25rem;
  }

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

  .horizontal-card a {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .intro-strip,
  .category-feature,
  .category-block,
  .detail-text article {
    padding: 20px;
    border-radius: 20px;
  }

  .section-title,
  .category-block-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-row a {
    grid-template-columns: 1fr;
  }

  .ranking-row .poster-frame {
    aspect-ratio: 16 / 9;
  }
}
