:root {
  color-scheme: dark;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #111827;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --white: #ffffff;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #3b82f6;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.18);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem),
    linear-gradient(180deg, var(--slate-950), var(--slate-900) 48%, var(--slate-950));
  color: var(--white);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 14px 45px rgba(2, 6, 23, 0.36);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.38);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 4px;
  color: var(--slate-400);
  font-size: 0.72rem;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex: 1;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  color: var(--slate-300);
  font-weight: 650;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--white);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel-strong);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--slate-300);
}

.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan);
  background: rgba(51, 65, 85, 0.7);
}

.hero-carousel {
  position: relative;
  height: min(80vh, 760px);
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.hero-shade,
.hero-side-shade {
  position: absolute;
  inset: 0;
}

.hero-shade {
  background: linear-gradient(0deg, var(--slate-950), rgba(2, 6, 23, 0.74) 46%, rgba(2, 6, 23, 0.18));
}

.hero-side-shade {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.04));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: clamp(54px, 12vw, 116px);
  width: min(680px, calc(100% - 48px));
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: #e0fbff;
  background: rgba(6, 182, 212, 0.82);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.2);
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 750;
  padding: 7px 14px;
}

.hero-content h1 {
  margin: 22px 0 14px;
  font-size: clamp(2.45rem, 7vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-shadow: 0 14px 55px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 58ch;
  margin: 0;
  color: var(--slate-300);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

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

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

.primary-button,
.ghost-button,
.section-more,
.filter-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 760;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.primary-button {
  min-height: 52px;
  padding: 0 28px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.32);
}

.primary-button:hover,
.section-more:hover,
.filter-panel button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 55px rgba(6, 182, 212, 0.36);
}

.ghost-button {
  min-height: 52px;
  padding: 0 28px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.ghost-button:hover {
  border-color: rgba(103, 232, 249, 0.56);
  background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px);
  font-size: 2.2rem;
  line-height: 1;
}

.hero-prev {
  left: clamp(16px, 4vw, 44px);
}

.hero-next {
  right: clamp(16px, 4vw, 44px);
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.78);
}

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

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

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

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

.content-section,
.quick-search-wrap,
.filter-panel,
.detail-content {
  margin: 70px 0;
}

.quick-search-card,
.filter-panel,
.story-panel,
.ranking-panel,
.category-card,
.detail-hero,
.player-shell,
.page-hero {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.64));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 5vw, 42px);
}

.quick-search-card h2,
.section-heading h2,
.panel-heading h2,
.page-hero h1,
.story-panel h2 {
  margin: 10px 0 0;
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  line-height: 1.1;
}

.quick-search-card p,
.section-heading p,
.page-hero p,
.story-panel p {
  color: var(--slate-300);
}

.home-search,
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.48);
}

.home-search input,
.search-box input,
.filter-grid select {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
}

.home-search button {
  min-width: 104px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  font-weight: 760;
}

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

.section-more {
  min-width: max-content;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.12);
}

.section-more.full {
  width: 100%;
  margin-top: 18px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 26px 65px rgba(2, 6, 23, 0.52);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, var(--slate-900), var(--slate-800));
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 36px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--slate-950);
  background: linear-gradient(135deg, #fef08a, var(--cyan));
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.card-body p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--slate-300);
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  padding: 4px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--slate-300);
  background: rgba(15, 23, 42, 0.62);
  font-size: 0.76rem;
}

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

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

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

.ranking-panel a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
}

.ranking-panel a:hover {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(8, 145, 178, 0.1);
}

.rank-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.ranking-panel strong,
.ranking-panel em {
  grid-column: 2;
}

.ranking-panel strong {
  line-height: 1.25;
}

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

.page-main {
  padding-top: 54px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 7vw, 70px);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -12%;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  filter: blur(14px);
}

.page-hero > * {
  position: relative;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.7rem);
}

.filter-panel {
  padding: 22px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.filter-grid label {
  display: grid;
  gap: 7px;
  color: var(--slate-400);
  font-size: 0.82rem;
}

.filter-grid select {
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.46);
}

.filter-panel button {
  min-height: 48px;
  align-self: end;
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: var(--white);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.88), rgba(37, 99, 235, 0.84));
}

.no-results {
  display: none;
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  color: var(--slate-300);
  background: rgba(2, 6, 23, 0.38);
  text-align: center;
}

.no-results.show {
  display: block;
}

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

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

.category-card {
  overflow: hidden;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.32);
}

.category-card a {
  display: grid;
  grid-template-columns: 0.78fr 1fr;
  min-height: 230px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: rgba(2, 6, 23, 0.58);
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 115px;
  opacity: 0.82;
}

.category-info {
  padding: 28px;
}

.category-info p {
  color: var(--slate-300);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
  color: var(--slate-400);
  font-size: 0.95rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 46px);
  align-items: center;
  padding: clamp(22px, 5vw, 44px);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--slate-900), var(--slate-800));
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
  margin: 16px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 72ch;
  color: var(--slate-300);
  font-size: 1.08rem;
}

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

.movie-facts div {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

.movie-facts dt {
  color: var(--slate-400);
  font-size: 0.78rem;
}

.movie-facts dd {
  margin: 4px 0 0;
  color: var(--white);
  font-weight: 760;
}

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

.player-section {
  margin: 34px 0 70px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background:
    radial-gradient(circle, rgba(6, 182, 212, 0.28), transparent 24%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.12));
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 55px rgba(34, 211, 238, 0.46);
  font-size: 2rem;
}

.player-shell.playing .play-overlay {
  display: none;
}

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

.story-panel {
  padding: clamp(24px, 4vw, 34px);
}

.story-panel p {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.48);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 0;
}

.footer-inner strong {
  color: var(--cyan);
}

.footer-inner p {
  margin: 6px 0 0;
  color: var(--slate-400);
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--slate-300);
}

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

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 14px;
    font-size: 0.92rem;
  }

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

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

  .nav-toggle {
    display: block;
  }

  .hero-carousel {
    height: 70vh;
    min-height: 520px;
  }

  .quick-search-card,
  .split-section,
  .detail-content,
  .detail-hero,
  .category-card a {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

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

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

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

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-text em {
    display: none;
  }

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

  .hero-content {
    left: 18px;
    bottom: 74px;
    width: calc(100% - 36px);
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions,
  .home-search {
    align-items: stretch;
    flex-direction: column;
  }

  main,
  .page-main,
  .detail-main,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

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

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

  .filter-grid,
  .movie-facts {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 0.98rem;
  }

  .card-body p {
    font-size: 0.84rem;
  }

  .detail-info h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
