:root {
  --bg: #0b1020;
  --panel: rgba(17, 24, 39, 0.72);
  --panel-solid: #111827;
  --muted: #9ca3af;
  --text: #f9fafb;
  --soft: #e5e7eb;
  --line: rgba(255, 255, 255, 0.10);
  --rose: #e11d48;
  --pink: #db2777;
  --orange: #f97316;
  --violet: #7c3aed;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(225, 29, 72, 0.25), transparent 36rem),
    radial-gradient(circle at 80% 10%, rgba(124, 58, 237, 0.20), transparent 30rem),
    linear-gradient(180deg, #0b1020 0%, #111827 48%, #080b14 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.76);
  backdrop-filter: blur(18px);
}

.nav-wrap,
.section,
.page-shell,
.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: 22px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--pink), var(--orange));
  box-shadow: 0 12px 32px rgba(225, 29, 72, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: rgba(249, 250, 251, 0.78);
  padding: 10px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.10);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

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

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

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 16, 32, 0.95), rgba(11, 16, 32, 0.62), rgba(11, 16, 32, 0.88)),
    radial-gradient(circle at 72% 25%, rgba(225, 29, 72, 0.28), transparent 23rem);
  z-index: 1;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  filter: blur(2px) saturate(1.25);
  transform: scale(1.04);
  background-size: cover;
  background-position: center;
}

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

.hero-copy h1 {
  max-width: 760px;
  margin: 12px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-copy p {
  max-width: 680px;
  color: rgba(249, 250, 251, 0.78);
  font-size: 18px;
}

.eyebrow {
  margin: 0;
  color: #fda4af;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: white;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--rose), var(--pink), var(--orange));
  box-shadow: 0 18px 45px rgba(225, 29, 72, 0.35);
}

.hero-search {
  position: relative;
  max-width: 560px;
  margin-top: 28px;
}

.hero-search input,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 18px;
  outline: none;
  font: inherit;
}

.hero-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(244, 63, 94, 0.72);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.hero-search a {
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 14px;
  padding: 0 18px;
  background: rgba(225, 29, 72, 0.90);
  font-weight: 800;
}

.hero-panel {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 18px;
  align-items: end;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition: all 0.6s ease;
}

.hero-slide.active,
.hero-slide:first-child {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.hero-slide.active ~ .hero-slide:first-child {
  opacity: 0;
  pointer-events: none;
}

.hero-poster {
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
  transform: rotate(-4deg);
}

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

.hero-info {
  min-height: 340px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: rgba(17, 24, 39, 0.62);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero-info h2 {
  margin: 12px 0;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero-info p {
  color: rgba(249, 250, 251, 0.78);
}

.pill-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-row span,
.tag-row span,
.detail-meta span,
.rank-number,
.category-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: rgba(249, 250, 251, 0.86);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 13px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.stat-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.stat-card strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.section,
.page-shell {
  padding: 78px 0 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 4px 0 8px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.section-head p,
.page-title p {
  color: var(--muted);
  margin: 0;
}

.section-more {
  flex: 0 0 auto;
  color: #fda4af;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244, 63, 94, 0.42);
  background: rgba(255, 255, 255, 0.095);
}

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

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.year-badge,
.play-dot {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(12px);
}

.year-badge {
  left: 10px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.play-dot {
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
}

.card-body {
  padding: 14px;
}

.card-meta {
  color: #fda4af;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body h2 {
  margin: 6px 0 8px;
  font-size: 17px;
  line-height: 1.28;
}

.card-body h2 a:hover {
  color: #fda4af;
}

.card-body p {
  min-height: 66px;
  margin: 0 0 12px;
  color: rgba(249, 250, 251, 0.70);
  font-size: 13px;
  line-height: 1.55;
}

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

.category-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 63, 94, 0.42);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-count {
  color: #fecdd3;
  background: rgba(225, 29, 72, 0.14);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 190px;
  gap: 12px;
  margin: 28px 0 24px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
}

.filter-select {
  color: var(--text);
}

.filter-select option {
  color: #111827;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-item img {
  width: 84px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
}

.rank-number {
  justify-content: center;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--pink));
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 34px;
  padding: 28px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background:
    radial-gradient(circle at top right, rgba(225, 29, 72, 0.18), transparent 30rem),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-title p {
  max-width: 760px;
  color: rgba(249, 250, 251, 0.78);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.player-section {
  margin-top: 36px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: #020617;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.72)),
    radial-gradient(circle at center, rgba(225, 29, 72, 0.18), transparent 26rem);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.playing .player-overlay {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  font-size: 30px;
  background: linear-gradient(135deg, var(--rose), var(--pink), var(--orange));
  box-shadow: 0 20px 60px rgba(225, 29, 72, 0.46);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin-top: 34px;
}

.prose,
.side-panel {
  padding: 26px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.06);
}

.prose h2,
.side-panel h2 {
  margin-top: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.prose p,
.side-panel p {
  color: rgba(249, 250, 251, 0.78);
}

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

.related-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 64px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.related-item strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-item span {
  color: var(--muted);
  font-size: 13px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
}

.pagination .current {
  background: linear-gradient(135deg, var(--rose), var(--pink));
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 28px;
}

.site-footer p {
  color: var(--muted);
}

.site-footer h2 {
  font-size: 16px;
}

.site-footer a:not(.logo) {
  display: block;
  margin: 8px 0;
  color: rgba(249, 250, 251, 0.72);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

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

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

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

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.96);
    border: 1px solid var(--line);
  }

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

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 280px;
    margin: 0 auto;
  }

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

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

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

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

  .detail-cover {
    max-width: 280px;
  }

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

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

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

@media (max-width: 520px) {
  .movie-grid,
  .category-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .page-title h1,
  .detail-title h1 {
    letter-spacing: -0.05em;
  }

  .section-head {
    display: block;
  }
}
