:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-500: #737373;
  --neutral-700: #404040;
  --neutral-900: #171717;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--neutral-900);
  background: var(--neutral-50);
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--neutral-200);
  backdrop-filter: blur(18px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), #7c3aed);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.brand strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand small {
  display: block;
  color: var(--neutral-500);
  font-size: 12px;
  margin-top: -2px;
}

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  flex: 1;
}

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
}

.nav-link {
  color: var(--neutral-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-active {
  color: var(--primary-600);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.search-main input {
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  background: #fff;
  min-width: 240px;
}

.top-search input:focus,
.search-main input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.top-search button,
.btn {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  border-radius: 12px;
  padding: 11px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), #7c3aed);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.btn-ghost.dark {
  color: var(--neutral-900);
  border-color: var(--neutral-200);
  background: #fff;
}

.top-search button:hover,
.btn:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--neutral-100);
  font-size: 22px;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--neutral-900);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  display: block;
  opacity: 1;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: #fff;
}

.eyebrow,
.section-kicker {
  color: var(--primary-500);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 12px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.card-tags span {
  color: var(--neutral-700);
  background: var(--neutral-100);
  border-color: var(--neutral-200);
}

.detail-tags span {
  color: #fff;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-control {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
  width: 28px;
  border-radius: 20px;
  background: #fff;
}

.hero-after {
  margin-top: -48px;
  position: relative;
  z-index: 4;
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.quick-cats a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-weight: 800;
}

.content-section {
  padding: 58px 0;
}

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

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

.section-head a {
  color: var(--primary-600);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1d4ed8);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.score,
.rank-no {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}

.score {
  right: 12px;
  background: rgba(0, 0, 0, 0.68);
}

.rank-no {
  left: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 16px;
}

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

.card-meta,
.card-desc {
  margin: 0 0 10px;
  color: var(--neutral-500);
  font-size: 13px;
}

.card-desc {
  min-height: 42px;
}

.compact-card .card-desc {
  display: none;
}

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

.rank-band {
  padding: 42px 0 58px;
  background: radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.24), transparent 32%), var(--neutral-900);
  color: #fff;
}

.light-head a,
.light-head .section-kicker {
  color: #93c5fd;
}

.cat-preview {
  margin-bottom: 42px;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  margin-top: 34px;
  padding: 54px;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.page-hero p {
  max-width: 760px;
  color: var(--neutral-500);
  font-size: 17px;
}

.dark-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--neutral-900), #1e3a8a);
}

.dark-hero p {
  color: rgba(255, 255, 255, 0.76);
}

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

.category-card a {
  display: block;
  min-height: 250px;
  padding: 28px;
  border-radius: 26px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.category-card p {
  color: var(--neutral-500);
}

.category-strip {
  display: flex;
  gap: 10px;
  margin: 22px 0;
}

.category-strip img {
  width: 72px;
  height: 98px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--neutral-100);
}

.category-card span {
  color: var(--primary-600);
  font-weight: 900;
}

.search-main {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.search-main input {
  min-width: min(520px, 100%);
  font-size: 16px;
}

.detail-hero {
  position: relative;
  min-height: 540px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--neutral-900);
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px);
  transform: scale(1.1);
  opacity: 0.46;
}

.detail-shade {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.55));
}

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 42px;
  align-items: center;
  padding: 72px 0;
}

.detail-poster img {
  width: 280px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.breadcrumb {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.detail-stats span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.player-section {
  margin-top: -56px;
  position: relative;
  z-index: 3;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.54));
}

.play-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), #7c3aed);
  font-size: 32px;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.32);
}

.video-shell.is-playing .play-cover {
  display: none;
}

.detail-content {
  padding: 48px 0 0;
}

.detail-text {
  display: grid;
  gap: 16px;
  padding: 34px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-text h2 {
  margin: 0;
  font-size: 28px;
}

.detail-text p {
  margin: 0;
  color: var(--neutral-700);
  font-size: 17px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.info-table div {
  padding: 16px;
  border-radius: 16px;
  background: var(--neutral-50);
}

.info-table strong,
.info-table span {
  display: block;
}

.info-table strong {
  color: var(--neutral-500);
  font-size: 13px;
}

.site-footer {
  margin-top: 70px;
  padding: 38px 0;
  color: rgba(255, 255, 255, 0.78);
  background: var(--neutral-900);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.site-footer strong {
  color: #fff;
  font-size: 20px;
}

.site-footer p {
  max-width: 560px;
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 1040px) {
  .movie-grid,
  .grid-six,
  .grid-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-panel {
    gap: 16px;
  }

  .top-search input {
    min-width: 180px;
  }
}

@media (max-width: 780px) {
  .nav-wrap {
    flex-wrap: wrap;
    min-height: 66px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-panel {
    display: none;
    width: 100%;
    padding: 16px 0;
    border-top: 1px solid var(--neutral-200);
    flex-direction: column;
    align-items: stretch;
  }

  .nav-panel.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .top-search {
    flex-direction: column;
    align-items: stretch;
  }

  .top-search input {
    min-width: 100%;
  }

  .hero {
    height: 620px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.28));
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 92px;
  }

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

  .card-desc,
  .card-tags {
    display: none;
  }

  .page-hero {
    padding: 30px;
    border-radius: 24px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 42px 0 92px;
  }

  .detail-poster img {
    width: 180px;
  }

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

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

  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand small {
    display: none;
  }

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

  .hero-copy h1,
  .detail-info h1 {
    font-size: 34px;
  }

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

  .detail-text {
    padding: 22px;
  }

  .info-table {
    grid-template-columns: 1fr;
  }
}
