:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.22);
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --pink: #e879f9;
  --amber: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 80px 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 15% 8%, rgba(37, 99, 235, 0.34), transparent 32rem),
    radial-gradient(circle at 86% 16%, rgba(6, 182, 212, 0.24), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #0b1120 52%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo span,
.footer-logo {
  background: linear-gradient(135deg, #ffffff, #67e8f9 42%, #93c5fd 72%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo:before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.35);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 15px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  transition: 180ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.16);
}

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

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

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

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 680ms ease;
  background-position: center;
  background-size: cover;
}

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

.hero-slide:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, #0f172a 0%, transparent 44%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  align-items: center;
  gap: 42px;
  padding: 92px 0 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(103, 232, 249, 0.36);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 47, 73, 0.5);
  font-size: 14px;
}

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

.hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.35);
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(390px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.55), rgba(6, 182, 212, 0.22));
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 48%);
}

.hero-poster-info {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
}

.hero-poster-info strong {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

.hero-poster-info span {
  display: block;
  margin-top: 8px;
  color: var(--muted-2);
}

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

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

.hero-dot.active {
  background: #ffffff;
}

.section {
  padding: 72px 0 0;
}

.section.tight {
  padding-top: 42px;
}

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

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

.section-head p,
.page-title p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(255, 255, 255, 0.04);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(103, 232, 249, 0.45);
  background: rgba(15, 23, 42, 0.94);
}

.poster-link {
  position: relative;
  display: block;
}

.poster-shell {
  display: block;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 26% 16%, rgba(103, 232, 249, 0.42), transparent 14rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

.poster-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #a5f3fc;
  font-size: 12px;
}

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

.card-body p {
  min-height: 48px;
  margin: 0;
  color: var(--muted-2);
  line-height: 1.7;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag-row span,
.info-pill {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

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

.category-card {
  min-height: 184px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 8%, rgba(6, 182, 212, 0.22), transparent 12rem),
    rgba(15, 23, 42, 0.78);
  transition: transform 180ms ease, border-color 180ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.42);
}

.category-card strong {
  display: block;
  font-size: 22px;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--muted-2);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px auto;
  gap: 14px;
  align-items: center;
  margin: 28px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
}

.search-box span {
  color: #67e8f9;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.filter-panel select,
.filter-btn {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.55);
  padding: 0 14px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn.active,
.filter-btn:hover {
  border-color: rgba(103, 232, 249, 0.42);
  background: rgba(6, 182, 212, 0.16);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 72px minmax(0, 1fr) 108px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

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

.rank-thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-main strong {
  display: block;
  font-size: 18px;
}

.rank-main p {
  margin: 7px 0 0;
  color: var(--muted-2);
  line-height: 1.55;
}

.rank-score {
  color: #fbbf24;
  font-size: 18px;
  font-weight: 900;
  text-align: right;
}

.page-hero {
  padding: 72px 0 32px;
}

.page-title {
  max-width: 840px;
}

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

.breadcrumb a {
  color: #a5f3fc;
}

.detail-hero {
  padding: 42px 0 0;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(6, 182, 212, 0.18));
  box-shadow: var(--shadow);
}

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

.detail-title h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.detail-copy {
  margin-top: 24px;
  color: var(--muted-2);
  font-size: 17px;
  line-height: 1.95;
}

.player-panel {
  margin-top: 52px;
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.32), transparent 24rem),
    rgba(2, 6, 23, 0.44);
  cursor: pointer;
}

.play-layer[hidden] {
  display: none;
}

.play-button-core {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.36);
}

.play-button-core:before {
  content: "";
  margin-left: 6px;
  border-left: 24px solid #ffffff;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
}

.text-panel {
  margin-top: 30px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.95;
}

.site-footer {
  margin-top: 86px;
  padding: 46px 0;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.5);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted-2);
}

.footer-inner p {
  max-width: 620px;
  margin: 0;
  line-height: 1.7;
}

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

.footer-links a {
  color: #a5f3fc;
}

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

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

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

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

  .site-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    display: none;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.94);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 72px;
  }

  .hero-poster {
    justify-self: start;
    width: min(320px, 100%);
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .nav-shell,
  .container,
  .hero-content,
  .footer-inner {
    width: min(100% - 24px, 1240px);
  }

  .logo,
  .footer-logo {
    font-size: 21px;
  }

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

  .card-body {
    padding: 13px;
  }

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

  .card-body p {
    font-size: 13px;
  }

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

  .rank-score {
    grid-column: 3;
    text-align: left;
  }

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

  .play-button-core {
    width: 72px;
    height: 72px;
  }
}
