:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-soft: rgba(30, 41, 59, 0.48);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --red: #f43f5e;
  --green: #22c55e;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 30rem),
    radial-gradient(circle at 80% 8%, rgba(37, 99, 235, 0.16), transparent 36rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: #cbd5e1;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.86);
  color: var(--text);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 10px;
  background: currentColor;
}

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

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) brightness(0.66);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, #020617 0%, transparent 34%, rgba(2, 6, 23, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  min-height: 70vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 48px;
  padding: 72px 0 56px;
}

.hero-copy {
  max-width: 780px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-summary {
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  max-width: 740px;
}

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

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

.hero-tags span,
.detail-meta span,
.meta-row span,
.tag-row span {
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-tags span,
.detail-meta span {
  padding: 8px 12px;
  font-size: 13px;
}

.meta-row span,
.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  color: white;
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(6, 182, 212, 0.36);
}

.ghost-button,
.more-link {
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  border: 1px solid var(--line);
}

.ghost-button:hover,
.more-link:hover {
  border-color: rgba(34, 211, 238, 0.52);
  color: var(--cyan);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.08);
}

.hero-poster span,
.play-float {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.9);
  color: white;
  font-weight: 900;
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.3);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  color: white;
  font-size: 32px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(15, 23, 42, 0.9);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

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

.section-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

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

.section-head.slim {
  margin-bottom: 18px;
}

.section-head h2,
.filter-title h2,
.side-card h2,
.detail-card h2,
.category-overview-body h2 {
  margin: 0;
  color: var(--text);
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.feature-panel,
.home-column,
.filter-panel,
.detail-card,
.player-card,
.side-card,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.18);
}

.feature-panel,
.home-column {
  padding: 28px;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  border: 1px solid var(--line);
  transition: 0.22s ease;
}

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

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile div {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 18px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-tile p {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.6;
}

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

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

.library-grid {
  margin-top: 24px;
}

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

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

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

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: 0.22s ease;
}

.movie-card a:hover {
  transform: translateY(-5px);
  background: rgba(30, 41, 59, 0.68);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.28);
}

.poster-box {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.poster-box img,
.wide-poster img,
.category-cover img,
.rank-hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card a:hover img,
.category-overview-card:hover img,
.rank-hero-card:hover img {
  transform: scale(1.08);
}

.poster-box::after,
.wide-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 46%);
}

.type-pill,
.year-pill,
.rank-num {
  position: absolute;
  z-index: 3;
  top: 10px;
  padding: 5px 8px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.type-pill {
  left: 10px;
  background: rgba(6, 182, 212, 0.88);
  color: white;
}

.year-pill {
  right: 10px;
  background: rgba(2, 6, 23, 0.72);
  color: #e2e8f0;
}

.rank-num {
  left: 10px;
  background: rgba(244, 63, 94, 0.92);
  color: white;
}

.play-float {
  width: 48px;
  height: 48px;
  opacity: 0;
  transition: 0.22s ease;
}

.movie-card a:hover .play-float {
  opacity: 1;
}

.card-body {
  padding: 14px;
}

.card-body h3,
.wide-info h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p,
.wide-info p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.wide-card a {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 16px;
  padding: 10px;
}

.wide-poster {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.wide-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  align-items: end;
}

.small-hero {
  display: block;
  max-width: 980px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-hero p:not(.section-kicker) {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  max-width: 760px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
}

.category-cover {
  min-height: 220px;
  overflow: hidden;
}

.category-overview-body {
  padding: 24px;
}

.category-overview-body h2 {
  font-size: 24px;
}

.category-overview-body p {
  color: var(--muted);
  line-height: 1.7;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-links a,
.detail-tags a {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(30, 41, 59, 0.62);
  color: #cbd5e1;
  font-size: 13px;
  transition: 0.2s ease;
}

.sample-links a:hover,
.detail-tags a:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.13);
}

.filter-panel {
  padding: 24px;
}

.filter-title {
  margin-bottom: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 14px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
  outline: none;
  transition: 0.2s ease;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: rgba(34, 211, 238, 0.66);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.ranking-hero {
  align-items: center;
}

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

.rank-hero-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #0f172a;
}

.rank-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent 58%);
}

.rank-hero-card b,
.rank-hero-card span {
  position: absolute;
  z-index: 2;
}

.rank-hero-card b {
  top: 10px;
  left: 10px;
  color: white;
  background: linear-gradient(135deg, var(--red), #f97316);
  border-radius: 999px;
  padding: 6px 10px;
}

.rank-hero-card span {
  left: 14px;
  right: 14px;
  bottom: 14px;
  font-weight: 800;
}

.movie-detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 18px;
}

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

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

.detail-main {
  display: grid;
  gap: 18px;
}

.player-card {
  padding: 12px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: #000;
  color: white;
  transition: opacity 0.22s ease;
}

.play-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: brightness(0.72);
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: white;
  font-size: 34px;
  box-shadow: 0 18px 52px rgba(6, 182, 212, 0.36);
  transition: 0.2s ease;
}

.play-cover:hover .play-ring {
  transform: translate(-50%, -50%) scale(1.08);
}

.detail-card {
  padding: 28px;
}

.title-card h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.one-line {
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-card p {
  margin: 12px 0 0;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 16px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.detail-sidebar {
  position: sticky;
  top: 88px;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  font-size: 22px;
  margin-bottom: 16px;
}

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

.side-list .wide-card a {
  grid-template-columns: 92px minmax(0, 1fr);
}

.side-list .wide-info p,
.side-list .meta-row {
  display: none;
}

.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.74);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-about p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 520px;
}

.footer-brand {
  margin-bottom: 12px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

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

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .poster-grid,
  .poster-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .detail-sidebar {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    display: flex;
    align-items: end;
    padding-bottom: 76px;
  }

  .hero-poster {
    display: none;
  }

  .hero-summary {
    font-size: 15px;
  }

  .hero-arrow {
    display: none;
  }

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

  .category-grid,
  .poster-grid,
  .poster-grid.compact,
  .mini-grid,
  .related-grid,
  .category-overview-grid,
  .rank-hero-grid,
  .footer-grid,
  .two-column,
  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .category-overview-card,
  .wide-card a {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .filter-grid label:first-child,
  .footer-about {
    grid-column: 1 / -1;
  }

  .page-hero {
    padding-top: 44px;
  }

  .detail-card,
  .feature-panel,
  .home-column,
  .filter-panel {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .nav-wrap,
  .mobile-nav,
  .hero-content,
  .section-wrap,
  .page-hero,
  .movie-detail-shell,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 18px;
  }

  .hero h1,
  .hero h2 {
    font-size: 42px;
  }

  .hero-actions {
    gap: 8px;
  }

  .primary-button,
  .ghost-button,
  .more-link {
    min-height: 40px;
    padding: 0 13px;
    font-size: 13px;
  }

  .poster-grid,
  .poster-grid.compact,
  .mini-grid,
  .related-grid,
  .category-grid,
  .rank-hero-grid,
  .category-overview-grid,
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

  .category-cover {
    min-height: 170px;
  }

  .wide-card a,
  .side-list .wide-card a {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3,
  .wide-info h3 {
    font-size: 14px;
  }

  .card-body p,
  .tag-row,
  .meta-row {
    display: none;
  }
}
