:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --pink: #f472b6;
  --gold: #fbbf24;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #111827 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img {
  width: 100%;
  height: auto;
}

a {
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.24);
}

.brand-text {
  font-size: 20px;
  white-space: nowrap;
}

.header-search {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
}

.header-search input,
.page-filter input,
.home-search-band input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: #ffffff;
  padding: 10px 14px;
}

.header-search button,
.page-filter button,
.home-search-band button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  white-space: nowrap;
}

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

.nav-link {
  color: #cbd5e1;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.12);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  color: #ffffff;
  border-radius: 12px;
  width: 42px;
  height: 42px;
}

.quick-nav {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.quick-nav a,
.filter-chip,
.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.58);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.quick-nav a:hover,
.filter-chip:hover,
.filter-chip.is-active {
  border-color: rgba(34, 211, 238, 0.55);
  color: #ffffff;
  background: rgba(34, 211, 238, 0.12);
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.76) 42%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.18) 55%, rgba(2, 6, 23, 0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 110px 0 80px;
  max-width: 860px;
}

.eyebrow {
  display: inline-flex;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-content h1,
.page-hero h1,
.detail-main h1 {
  color: #ffffff;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  max-width: 900px;
  font-size: clamp(38px, 6vw, 76px);
}

.hero-content h2 {
  margin-top: 18px;
  color: #e0f2fe;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 800;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 17px;
  margin-top: 18px;
}

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

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

.primary-btn,
.ghost-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
}

.primary-btn,
.small-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.22);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.42);
}

.primary-btn:hover,
.ghost-btn:hover,
.small-btn:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 42px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
  background: #ffffff;
}

.home-search-band,
.content-section,
.watch-section,
.detail-hero,
.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-band {
  margin-top: -46px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-band form,
.page-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.42);
  border-radius: 999px;
  padding: 6px;
}

.home-search-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.home-search-links a {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.content-section {
  padding: 64px 0 0;
}

.section-title {
  margin-bottom: 26px;
}

.section-title span {
  color: var(--cyan);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.16em;
}

.section-title h2 {
  color: #ffffff;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 900;
  margin-top: 7px;
  letter-spacing: -0.03em;
}

.section-title.with-link {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-title.with-link a {
  color: var(--cyan);
  font-weight: 700;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 158px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.88)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 14rem);
  padding: 24px;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
}

.category-tile span,
.category-overview-card h2 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.8;
  margin-top: 10px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
}

.poster-link img,
.side-poster img,
.ranking-cover img,
.detail-poster img,
.category-overview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-shade,
.category-overview-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.9) 100%);
}

.year-badge,
.rank-badge,
.play-dot,
.side-rank {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.year-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge,
.side-rank {
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #020617;
  background: var(--gold);
  font-weight: 900;
}

.play-dot {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.32);
}

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

.movie-card h3,
.side-card h3,
.ranking-info h2 {
  color: #ffffff;
  font-weight: 900;
  line-height: 1.35;
}

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

.movie-card p,
.side-card p,
.ranking-info p {
  color: #cbd5e1;
  line-height: 1.7;
  margin-top: 9px;
}

.movie-meta-line,
.ranking-info div,
.side-card span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

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

.ranking-panel,
.related-column {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.side-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
}

.side-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.page-hero {
  margin-top: 44px;
  padding: 54px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.slim-hero,
.category-hero,
.search-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
}

.page-filter {
  max-width: 560px;
  margin-top: 24px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.empty-state {
  display: none;
  color: #cbd5e1;
  text-align: center;
  padding: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

.category-overview-card {
  min-height: 260px;
  padding: 0;
}

.category-overview-card img,
.category-overview-shade {
  position: absolute;
  inset: 0;
}

.category-overview-card div {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 22px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 56px 94px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-index {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #020617;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 900;
}

.ranking-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  margin-top: 44px;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: #94a3b8;
  margin-bottom: 18px;
  font-size: 14px;
}

.breadcrumbs a {
  color: #cbd5e1;
}

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

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.detail-meta li {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.detail-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-meta strong {
  display: block;
  color: #ffffff;
  margin-top: 4px;
  font-size: 15px;
}

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

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.58));
  font-size: 18px;
  font-weight: 900;
}

.play-symbol {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.38);
  font-size: 34px;
}

.player-frame.is-started .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-article {
  margin-top: 28px;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
}

.detail-article h2 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  margin: 24px 0 10px;
}

.detail-article h2:first-child {
  margin-top: 0;
}

.detail-article p {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 2;
}

.site-footer {
  width: min(1280px, calc(100% - 32px));
  margin: 80px auto 0;
  padding: 38px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 34px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
  margin-top: 12px;
}

.footer-grid h2 {
  color: #ffffff;
  font-weight: 900;
  margin-bottom: 14px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  color: #64748b;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

@media (max-width: 1100px) {
  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .related-column,
  .ranking-panel {
    position: static;
  }

  .detail-hero {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .header-search {
    order: 3;
    max-width: none;
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 4;
    padding: 8px 0 4px;
  }

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

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

  .hero-content {
    padding-top: 86px;
  }

  .home-search-band {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .ranking-row {
    grid-template-columns: 46px 76px minmax(0, 1fr);
  }

  .ranking-row .small-btn {
    grid-column: 3;
    justify-self: start;
  }

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

@media (max-width: 560px) {
  .hero-carousel {
    min-height: 660px;
  }

  .page-hero,
  .detail-hero,
  .detail-article,
  .ranking-panel,
  .related-column {
    padding: 22px;
    border-radius: 22px;
  }

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

  .home-search-band form,
  .page-filter,
  .search-page-form {
    border-radius: 22px;
    flex-direction: column;
    align-items: stretch;
  }

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

  .watch-section,
  .content-section {
    padding-top: 42px;
  }
}
