:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-soft: rgba(30, 41, 59, 0.48);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --pink: #f472b6;
  --orange: #fb923c;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 8%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(59, 130, 246, 0.18), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 44%, #111827 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.12);
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(2, 6, 23, 0.94);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 40px rgba(34, 211, 238, 0.3);
  font-size: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: white;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

main {
  padding-top: 72px;
}

.hero {
  position: relative;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.2fr);
  gap: 34px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 64px;
  align-items: stretch;
}

.hero-intro {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: 36px 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-intro p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-search,
.filter-bar {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: white;
  background: rgba(15, 23, 42, 0.74);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.hero-search input {
  flex: 1;
}

.hero-search button,
.btn,
.filter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.hero-search button,
.btn.primary {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28);
}

.btn.ghost,
.filter-link {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.btn:hover,
.hero-search button:hover,
.filter-link:hover {
  transform: translateY(-2px);
}

.btn.wide {
  width: 100%;
  margin-top: 14px;
}

.hero-stage {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 5;
  pointer-events: none;
  border-radius: 32px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.025);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, transparent 0, rgba(2,6,23,0.14) 30%, rgba(2,6,23,0.68) 58%),
    linear-gradient(to top, #020617 0%, rgba(2,6,23,0.8) 36%, rgba(2,6,23,0.18) 100%);
}

.hero-content {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 36px;
  z-index: 2;
}

.hero-content h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(34px, 4.5vw, 62px);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.hero-content p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

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

.hero-dots {
  position: absolute;
  right: 32px;
  bottom: 28px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
  padding: 72px 0;
}

.section-alt {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.42), rgba(2, 6, 23, 0.36));
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.section-head.small h3 {
  color: var(--cyan);
  font-size: 22px;
}

.section-head a {
  color: var(--subtle);
  font-weight: 800;
}

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

.card-grid,
.poster-grid,
.rank-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

.movie-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-soft);
  box-shadow: 0 10px 34px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.012);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 25px 70px rgba(2, 6, 23, 0.42);
}

.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.poster-card .thumb {
  aspect-ratio: 3 / 4;
}

.thumb img,
.compact-card img,
.detail-side img,
.rank-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,6,23,0.88), transparent 56%);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: white;
  background: rgba(6, 182, 212, 0.86);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(2, 6, 23, 0.78);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

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

.card-body strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: white;
  font-size: 17px;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body em,
.card-body small {
  overflow: hidden;
  color: var(--subtle);
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-stack {
  display: grid;
  gap: 48px;
}

.category-strip {
  min-width: 0;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 112px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.48);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  background: rgba(30, 41, 59, 0.72);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

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

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.compact-card strong {
  display: block;
  overflow: hidden;
  color: white;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy small,
.compact-card small,
.rank-score {
  display: block;
  margin-top: 7px;
  color: var(--subtle);
}

.rank-score {
  color: var(--orange);
  font-weight: 900;
}

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

.rank-list.full .rank-item {
  grid-template-columns: 52px 140px minmax(0, 1fr) auto;
}

.rank-list.full .rank-item img {
  width: 140px;
  height: 90px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.38));
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.26);
}

.category-card strong {
  position: relative;
  z-index: 2;
  display: block;
  margin-bottom: 14px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.category-card p,
.category-sample {
  position: relative;
  z-index: 2;
  color: var(--muted);
  line-height: 1.8;
}

.category-sample {
  display: block;
  margin-top: 18px;
  color: var(--cyan);
  font-size: 14px;
}

.category-glow {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.36), transparent 70%);
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 50px;
}

.filter-bar {
  margin: 0 0 28px;
  flex-wrap: wrap;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.42);
}

.filter-bar input {
  flex: 1 1 260px;
}

.filter-bar select {
  flex: 0 0 180px;
}

.cta-panel {
  text-align: center;
}

.cta-panel h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.05em;
}

.cta-panel p {
  max-width: 760px;
  margin: 18px auto 0;
  color: var(--muted);
  line-height: 1.8;
}

.pill-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.pill-links a,
.tag-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--muted);
  font-weight: 800;
}

.player-wrap {
  background: #000;
  padding: 34px 0;
}

.player-box {
  position: relative;
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(2,6,23,0.1), rgba(2,6,23,0.62));
  color: white;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.94), rgba(37, 99, 235, 0.94));
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.36);
  font-size: 32px;
  padding-left: 5px;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.detail-main,
.detail-side,
.detail-block {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.56);
}

.detail-main {
  padding: 30px;
}

.detail-side {
  position: sticky;
  top: 96px;
  padding: 16px;
}

.detail-side img {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #0f172a;
}

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

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

.detail-main h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.meta-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.38);
}

.lead {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.82;
}

.detail-block {
  margin-top: 22px;
  padding: 24px;
}

.detail-block h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.5);
}

.compact-card img {
  width: 76px;
  height: 92px;
  border-radius: 12px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.78);
  color: var(--subtle);
}

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

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  color: white;
}

.footer-grid p {
  max-width: 520px;
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 22px 0;
  text-align: center;
}

[data-search-card].is-hidden {
  display: none;
}

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

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

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

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 10px;
    background: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(18px);
  }

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

  .nav-link {
    padding: 13px 14px;
  }

  .nav-link.active::after {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 32px;
  }

  .hero-stage {
    min-height: 520px;
  }

  .hero-intro {
    align-self: auto;
  }

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

  .detail-side {
    position: static;
    max-width: 360px;
  }

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

@media (max-width: 700px) {
  .brand-text {
    font-size: 20px;
  }

  .hero-search,
  .filter-bar.large,
  .filter-bar {
    flex-direction: column;
  }

  .hero-search button,
  .filter-bar input,
  .filter-bar select,
  .filter-link {
    width: 100%;
  }

  .hero-stage {
    min-height: 480px;
    border-radius: 24px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 28px;
  }

  .hero-dots {
    left: 22px;
    right: auto;
    bottom: 18px;
  }

  .section {
    padding: 48px 0;
  }

  .card-grid.four,
  .poster-grid,
  .poster-grid.mini,
  .rank-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .rank-item,
  .rank-list.full .rank-item {
    grid-template-columns: 34px 82px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .rank-item img,
  .rank-list.full .rank-item img {
    width: 82px;
    height: 58px;
  }

  .detail-main {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .card-grid.four,
  .poster-grid,
  .poster-grid.mini,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero-content h2 {
    font-size: 32px;
  }
}
