:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-line: rgba(148, 163, 184, 0.22);
  --text: #ffffff;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --sky: #38bdf8;
  --sky-strong: #0ea5e9;
  --blue: #2563eb;
  --amber: #f59e0b;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.2), transparent 34rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 32rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.36);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.15);
}

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

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: #ffffff;
}

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

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: center;
  padding: 48px 0 34px;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.96));
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
  gap: 34px;
  align-items: center;
  padding: 70px;
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(14, 165, 233, 0.28), transparent 25rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
  z-index: 1;
}

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

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  font-size: 14px;
}

.hero h1,
.hero h2 {
  margin: 22px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--sky-strong), var(--blue));
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.28);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.76);
  border-color: rgba(148, 163, 184, 0.24);
  color: #e0f2fe;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}

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

.hero-poster a {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.45);
  transform: rotate(1deg);
}

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

.hero-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-mini-meta span,
.tag-list span,
.info-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #bae6fd;
  font-size: 13px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 70px;
  bottom: 44px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.hero-dot.active {
  background: #38bdf8;
}

.section {
  padding: 54px 0;
}

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

.section-eyebrow {
  color: var(--sky);
  font-weight: 700;
  margin-bottom: 8px;
}

.section h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-desc,
.page-title p,
.detail-title p {
  max-width: 760px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.68));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.44);
  box-shadow: 0 26px 56px rgba(2, 132, 199, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 2.85;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #e0f2fe;
  font-size: 12px;
  border: 1px solid rgba(125, 211, 252, 0.24);
}

.year-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.36);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--subtle);
  font-size: 13px;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--sky);
}

.movie-card p {
  min-height: 68px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 24px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.22), transparent 16rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p,
.category-card li {
  color: var(--muted);
  line-height: 1.65;
}

.category-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.category-card li + li {
  margin-top: 8px;
}

.search-panel,
.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 22px 0 30px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
}

.search-input {
  min-width: min(420px, 100%);
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
}

.search-input:focus {
  border-color: rgba(56, 189, 248, 0.68);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.filter-btn {
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted);
}

.filter-btn.active,
.filter-btn:hover {
  border-color: rgba(56, 189, 248, 0.48);
  color: #ffffff;
  background: rgba(14, 165, 233, 0.18);
}

.page-title {
  padding: 54px 0 20px;
}

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

.breadcrumb a {
  color: #bae6fd;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.65fr);
  gap: 28px;
  align-items: start;
  padding: 22px 0 54px;
}

.player-section,
.detail-panel,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.player-section {
  overflow: hidden;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.76));
}

.player-cover.is-hidden {
  display: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.36);
  font-size: 28px;
}

.detail-title {
  padding: 24px;
}

.detail-title .tag-list {
  margin-top: 18px;
}

.detail-panel {
  padding: 26px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.detail-panel p + h2,
.detail-panel p + p {
  margin-top: 18px;
}

.side-panel {
  padding: 22px;
}

.side-cover {
  overflow: hidden;
  border-radius: 22px;
  margin-bottom: 18px;
}

.side-cover img {
  width: 100%;
  aspect-ratio: 2 / 2.85;
  object-fit: cover;
}

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

.info-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.info-row b {
  color: #ffffff;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 62px;
}

.movie-card-compact p {
  min-height: 46px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(56, 189, 248, 0.44);
}

.rank-num {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-weight: 800;
}

.rank-title h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  color: var(--muted);
}

.footer-logo {
  display: inline-block;
  color: #ffffff;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

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

.copyright {
  margin-top: 16px;
  color: var(--subtle);
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

@media (max-width: 980px) {
  .hero-slide {
    grid-template-columns: 1fr;
    padding: 44px;
  }

  .hero-poster {
    display: none;
  }

  .hero-dots {
    left: 44px;
  }

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

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

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

  .side-panel {
    display: none;
  }
}

@media (max-width: 740px) {
  .nav-wrap {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .nav-link {
    border-radius: 14px;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .hero-frame {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 30px;
  }

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

  .hero p {
    font-size: 16px;
  }

  .hero-dots {
    left: 30px;
    bottom: 30px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .movie-card p {
    min-height: 58px;
    font-size: 13px;
  }

  .rank-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .rank-item .btn-secondary {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 460px) {
  main,
  .nav-wrap,
  .footer-inner {
    width: min(100% - 20px, 1180px);
  }

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

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

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