:root {
  --page-bg: #f8fafc;
  --ink: #111827;
  --muted: #64748b;
  --soft: #e2e8f0;
  --panel: #ffffff;
  --purple: #7c3aed;
  --pink: #db2777;
  --blue: #2563eb;
  --dark: #0f172a;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(18px);
}

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

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

.brand {
  color: #ffffff;
  flex: 0 0 auto;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 12px 32px rgba(219, 39, 119, 0.32);
}

.brand-name {
  font-size: 21px;
  background: linear-gradient(90deg, #e9d5ff, #fbcfe8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
  color: #e5e7eb;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-search input {
  width: 150px;
  color: #ffffff;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 6px 6px 6px 12px;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.nav-search button {
  border: 0;
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.site-header.is-open .mobile-nav {
  display: grid;
  gap: 14px;
}

.hero-slider {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transform: scale(1.02);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 28%, rgba(168, 85, 247, 0.48), transparent 32%),
    linear-gradient(110deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.74), rgba(219, 39, 119, 0.4));
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.55fr);
  gap: 34px;
  align-items: center;
  color: #ffffff;
}

.hero-copy {
  max-width: 740px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #f5d0fe;
  background: rgba(126, 34, 206, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.hero-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0 0 24px;
  max-width: 680px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.card-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

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

.btn-primary,
.btn-secondary,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 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;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 18px 40px rgba(219, 39, 119, 0.34);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

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

.hero-panel {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel img {
  position: static;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  opacity: 1;
  transform: none;
}

.hero-panel h2 {
  margin: 18px 0 8px;
  font-size: 24px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 32px;
  background: #ffffff;
}

.section {
  padding: 72px 0;
}

.section.soft {
  background: linear-gradient(135deg, #fff7ed, #fdf2f8, #eff6ff);
}

.section.blue-soft {
  background: linear-gradient(135deg, #eff6ff, #ecfeff, #f0fdfa);
}

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

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 58px rgba(88, 28, 135, 0.18);
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 180px;
}

.card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b, #831843);
}

.card-image-wide {
  aspect-ratio: auto;
  height: 100%;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .card-image img {
  transform: scale(1.08);
}

.card-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.card-content {
  padding: 16px;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.movie-card h2 {
  margin: 0 0 9px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 26px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #4c1d95, #be185d);
  box-shadow: var(--shadow);
}

.category-card:nth-child(3n+2) {
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #c2410c, #be123c);
}

.category-card h2 {
  position: relative;
  margin: 0 0 12px;
  font-size: 26px;
}

.category-card p {
  position: relative;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.category-card span {
  position: relative;
  font-weight: 800;
}

.page-hero {
  padding: 72px 0 46px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 18%, rgba(216, 180, 254, 0.28), transparent 28%),
    linear-gradient(135deg, #0f172a, #581c87 58%, #831843);
}

.page-hero h1 {
  color: #ffffff;
}

.page-hero p {
  color: #e9d5ff;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #c4b5fd;
  font-weight: 700;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 190px 120px;
  gap: 14px;
  padding: 18px;
  margin: 0 0 28px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.filters input,
.filters select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--soft);
  border-radius: 14px;
  outline: 0;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
}

.filters input:focus,
.filters select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.filter-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
}

.result-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 78px 170px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.rank-number {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--purple), var(--pink));
}

.ranking-cover {
  overflow: hidden;
  height: 106px;
  border-radius: 18px;
}

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

.ranking-content h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  padding: 44px 0 62px;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 20%, rgba(219, 39, 119, 0.42), transparent 28%),
    linear-gradient(135deg, #020617, #312e81 58%, #831843);
}

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

.detail-title h1,
.detail-title p {
  color: #ffffff;
}

.detail-title p {
  color: #e5e7eb;
}

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

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

.player-section {
  margin-top: -34px;
  position: relative;
  z-index: 5;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 30px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 20px 50px rgba(219, 39, 119, 0.34);
}

.play-layer strong {
  font-size: 20px;
}

.stream-player.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.content-panel {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-panel p {
  margin: 0;
  color: #475569;
  line-height: 1.92;
}

.content-stack {
  display: grid;
  gap: 22px;
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b 50%, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 52px 0 32px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer p {
  margin: 16px 0 0;
  max-width: 430px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 10px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

.empty-result {
  display: none;
  padding: 36px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

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

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero-panel {
    display: none;
  }

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

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

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

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

  .brand-name {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 76vh;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

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

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

  .card-image-wide {
    aspect-ratio: 16 / 10;
  }

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

  .ranking-item {
    grid-template-columns: 52px 92px 1fr;
    gap: 14px;
  }

  .ranking-item .btn-primary {
    grid-column: 1 / -1;
  }

  .rank-number {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 18px;
  }

  .ranking-cover {
    height: 80px;
  }

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

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

  .hero-actions {
    display: grid;
  }
}
