:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --pink: #f472b6;
  --gold: #fbbf24;
  --green: #34d399;
  --radius: 22px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* {
  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.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(244, 114, 182, 0.10), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.90);
  backdrop-filter: blur(18px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  cursor: pointer;
}

.nav-toggle span {
  width: 19px;
  height: 2px;
  display: block;
  margin: 4px auto;
  border-radius: 999px;
  background: #e2e8f0;
}

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

.mobile-nav a {
  display: block;
  padding: 11px 4px;
  color: #cbd5e1;
}

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

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.05);
}

.hero-slide.is-active .hero-bg {
  animation: heroZoom 7s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.01);
  }
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.70) 42%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.18) 50%, rgba(2, 6, 23, 0.62) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 76vh;
  margin: 0 auto;
  padding: 96px 0 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: end;
  gap: 42px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.16);
  color: #a5f3fc;
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  max-width: 820px;
  margin: 0 0 20px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 21px);
}

.hero-meta,
.detail-meta,
.movie-card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.movie-card-meta span,
.rank-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 12px;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan-deep), var(--cyan));
  box-shadow: 0 18px 46px rgba(34, 211, 238, 0.26);
}

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

.btn-ghost {
  color: #cbd5e1;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

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

.hero-card {
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.hero-card h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.hero-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(8, 145, 178, 0.78);
  transform: translateY(-1px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: max(22px, calc((100% - 1180px) / 2));
  bottom: 34px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

.section.full-bleed {
  width: 100%;
  padding: 72px max(16px, calc((100% - 1180px) / 2));
  background: rgba(15, 23, 42, 0.48);
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.category-tile {
  min-height: 138px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.54)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.24), transparent 70%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  color: var(--muted);
}

.search-panel {
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.search-panel input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  outline: none;
  background: rgba(2, 6, 23, 0.76);
  color: #ffffff;
  font-size: 16px;
}

.search-panel input:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.card-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.15);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 48px 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(-7px);
  border-color: rgba(34, 211, 238, 0.40);
  box-shadow: 0 24px 72px rgba(8, 145, 178, 0.20);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .movie-poster img {
  transform: scale(1.08);
  filter: brightness(0.78);
}

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.88);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.36);
}

.rank-mark {
  position: absolute;
  left: 14px;
  top: 14px;
  min-width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #f97316);
  color: #111827;
  font-style: normal;
  font-weight: 900;
}

.movie-card-body {
  padding: 18px;
}

.movie-card-meta {
  margin-bottom: 10px;
}

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

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-row span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.14);
  color: #a5f3fc;
  font-size: 12px;
}

.horizontal-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(235px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x proximity;
}

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

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
}

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

.rank-row {
  min-height: 92px;
  padding: 12px;
  display: grid;
  grid-template-columns: 44px 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(15, 23, 42, 0.95);
}

.rank-row strong {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.16);
  color: var(--cyan);
}

.rank-row img {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  object-fit: cover;
}

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

.rank-info b,
.rank-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small {
  color: var(--muted);
}

.rank-row i {
  color: var(--cyan);
  font-style: normal;
  font-size: 14px;
}

.page-hero {
  padding: 132px max(16px, calc((100% - 1180px) / 2)) 58px;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.20), transparent 46%),
    radial-gradient(circle at top right, rgba(244, 114, 182, 0.18), transparent 40%),
    rgba(15, 23, 42, 0.42);
}

.page-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

.player-panel,
.detail-side,
.detail-section {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.14), rgba(2, 6, 23, 0.72));
  color: #ffffff;
  cursor: pointer;
  z-index: 5;
}

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

.play-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow: 0 22px 60px rgba(34, 211, 238, 0.35);
  font-size: 34px;
  padding-left: 6px;
}

.player-copy {
  padding: 22px;
}

.player-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -0.04em;
}

.player-copy p {
  margin: 18px 0 0;
  color: #cbd5e1;
}

.detail-side {
  overflow: hidden;
}

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

.detail-side-content {
  padding: 20px;
}

.detail-side-content h2 {
  margin: 0 0 14px;
}

.detail-section {
  margin-top: 28px;
  padding: 28px;
}

.detail-section h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-section p {
  color: #cbd5e1;
}

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

.compact-card .movie-card-body {
  padding: 14px;
}

.compact-card h3 {
  font-size: 16px;
}

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

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

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

.footer-logo {
  margin-bottom: 14px;
}

.site-footer p,
.site-footer a,
.site-footer h2 {
  margin: 0;
}

.site-footer p {
  max-width: 420px;
  color: var(--muted);
}

.site-footer h2 {
  margin-bottom: 15px;
  font-size: 17px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.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: 20px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 14px;
}

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

  .nav-toggle {
    display: block;
  }

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

  .hero-content,
  .detail-top,
  .rank-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: none;
  }

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

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

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

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

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

  .hero-content {
    padding: 84px 0 60px;
  }

  .hero-control {
    display: none;
  }

  .hero-dots {
    left: 16px;
    right: auto;
  }

  .section,
  .section.full-bleed {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .section-heading {
    display: block;
  }

  .section-actions {
    margin-top: 18px;
  }

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

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

  .rank-row {
    grid-template-columns: 36px 58px minmax(0, 1fr);
  }

  .rank-row i {
    display: none;
  }

  .detail-shell {
    padding-top: 88px;
  }

  .detail-section {
    padding: 20px;
  }

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

@media (max-width: 480px) {
  .site-logo span:last-child {
    font-size: 15px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero-title {
    font-size: 40px;
  }

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