:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-solid: #111827;
  --panel-light: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --pink: #ec4899;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.logo-text {
  font-size: 1.2rem;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 0.94rem;
  transition: color 0.2s ease;
}

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

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

.nav-search input,
.filter-box input,
.search-page-form input {
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
  padding: 10px 12px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.filter-box input:focus,
.search-page-form input:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.nav-search button {
  border: 0;
  border-radius: 12px;
  color: #001018;
  background: var(--cyan);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav-inner {
  display: grid;
  gap: 12px;
  padding-block: 18px;
}

.mobile-search {
  margin-left: 0;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-track {
  position: relative;
  min-height: 72vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.64) 44%, rgba(15, 23, 42, 0.22)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.92)),
    radial-gradient(circle at 18% 48%, rgba(34, 211, 238, 0.22), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 760px;
  padding-block: 70px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 18px 0;
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.hero-content p {
  max-width: 640px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.85;
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.16);
  padding: 6px 10px;
  font-size: 0.78rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.24);
}

.btn-ghost {
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.52);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 38px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.45);
  cursor: pointer;
}

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

.intro-strip,
.split-feature,
.page-hero,
.text-panel,
.info-panel,
.category-overview-card,
.player-section {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: -50px;
  position: relative;
  z-index: 6;
  padding: 28px;
}

.intro-strip h2,
.page-hero h1,
.section-heading h2,
.split-copy h2,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.intro-strip p,
.page-hero p,
.split-copy p,
.text-panel p,
.detail-copy p,
.info-panel dd,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.8;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-block: 38px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  color: var(--cyan);
}

.stat-card span {
  color: var(--muted);
}

.content-section {
  margin-top: 58px;
}

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

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
}

.section-more {
  color: var(--cyan);
  font-weight: 700;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.26);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 24px 65px rgba(34, 211, 238, 0.14);
}

.poster-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(59, 130, 246, 0.2)),
    #0f172a;
}

.poster-frame img,
.compact-card img,
.rank-item img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

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

.poster-frame figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  color: white;
  background: rgba(8, 145, 178, 0.78);
  backdrop-filter: blur(10px);
  padding: 5px 9px;
  font-size: 0.76rem;
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #a5f3fc;
  font-size: 0.76rem;
}

.movie-meta-line span {
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  padding: 4px 7px;
}

.horizontal-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 320px);
  gap: 20px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 6px 4px 18px;
  scroll-snap-type: inline mandatory;
}

.horizontal-scroller .movie-card {
  scroll-snap-align: start;
}

.split-feature {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 30px;
  padding: clamp(24px, 5vw, 48px);
}

.split-copy h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

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

.compact-card {
  position: relative;
  display: grid;
  min-height: 150px;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
  isolation: isolate;
}

.compact-card::after,
.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.92));
}

.compact-card span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 2;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

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

.movie-card-list {
  display: grid;
  grid-template-columns: 160px 1fr;
}

.movie-card-list .poster-frame {
  aspect-ratio: auto;
  min-height: 190px;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background-image:
    linear-gradient(135deg, rgba(2, 6, 23, 0.2), rgba(15, 23, 42, 0.86)),
    var(--tile-image);
  background-size: cover;
  background-position: center;
  padding: 22px;
}

.category-tile span,
.category-tile strong,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  display: block;
  color: var(--cyan);
  font-weight: 800;
}

.category-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 2.2rem;
}

.category-tile p {
  margin-top: 12px;
  color: #cbd5e1;
  line-height: 1.7;
}

.rank-and-new {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 72px 1fr;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  padding: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-number {
  color: var(--cyan);
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  height: 88px;
  border-radius: 12px;
  background: #0f172a;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

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

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

.page-hero {
  padding: clamp(26px, 5vw, 54px);
}

.page-hero h1 {
  margin-top: 12px;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
}

.filter-box {
  display: grid;
  max-width: 520px;
  gap: 8px;
  margin-top: 20px;
}

.filter-box span {
  color: #cbd5e1;
  font-weight: 700;
}

.filter-box input {
  width: 100%;
}

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

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

.category-overview-list {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.category-overview-card {
  padding: 26px;
}

.category-overview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 10px 0;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

.detail-main {
  position: relative;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: clamp(22px, 5vw, 46px);
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  margin-top: 16px;
  font-size: clamp(2.2rem, 6vw, 5.5rem);
  line-height: 1;
}

.detail-copy p {
  max-width: 780px;
  font-size: 1.08rem;
}

.player-section {
  margin-top: 42px;
  padding: clamp(18px, 3vw, 30px);
}

.player-source-label {
  color: var(--cyan);
  font-weight: 800;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

.play-button span {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: auto;
  border-radius: 50%;
  color: #001018;
  background: var(--cyan);
  box-shadow: 0 0 38px rgba(34, 211, 238, 0.5);
}

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

.player-message {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  margin: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  text-align: center;
  pointer-events: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-top: 34px;
}

.text-panel,
.info-panel {
  padding: clamp(22px, 4vw, 34px);
}

.text-panel h2,
.info-panel h2 {
  margin-top: 0;
  color: #f8fafc;
}

.info-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-panel dt {
  color: var(--cyan);
  font-size: 0.86rem;
  font-weight: 800;
}

.info-panel dd {
  margin: -8px 0 0;
}

.info-panel a {
  color: #a5f3fc;
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.search-page-form input {
  width: min(560px, 100%);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-block: 46px;
}

.footer-brand p,
.site-footer a,
.footer-bottom {
  color: var(--muted);
}

.site-footer h3 {
  margin: 0 0 12px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px;
  text-align: center;
}

.is-missing-image {
  opacity: 0;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 20px;
  color: var(--muted);
  padding: 26px;
  text-align: center;
}

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

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

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

@media (max-width: 820px) {
  .hero-slider,
  .hero-track {
    min-height: 680px;
  }

  .hero-content {
    padding-block: 110px 80px;
  }

  .intro-strip,
  .split-feature,
  .rank-and-new,
  .detail-hero,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .intro-strip {
    align-items: start;
    flex-direction: column;
    margin-top: -28px;
  }

  .stat-grid,
  .movie-grid,
  .all-grid,
  .category-grid,
  .list-grid,
  .long-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .search-page-form {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-content h1,
  .detail-copy h1,
  .page-hero h1 {
    letter-spacing: -0.05em;
  }

  .stat-grid,
  .movie-grid,
  .all-grid,
  .category-grid,
  .list-grid,
  .compact-grid,
  .mini-card-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 58px 1fr;
  }

  .rank-item img {
    height: 72px;
  }

  .category-overview-head,
  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}
