* {
  box-sizing: border-box;
}

:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --secondary-500: #14b8a6;
  --secondary-600: #0d9488;
  --accent-500: #f97316;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-500: #78716c;
  --neutral-700: #44403c;
  --neutral-900: #1c1917;
  --shadow-soft: 0 24px 70px rgba(15, 23, 42, 0.16);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--neutral-900);
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-50) 44%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.76));
  backdrop-filter: blur(16px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--neutral-900);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.28);
}

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

.nav-links a,
.mobile-panel a {
  padding: 10px 14px;
  color: var(--neutral-700);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
}

.nav-links a:hover,
.mobile-panel a:hover {
  color: var(--primary-700);
  background: var(--primary-100);
}

.nav-search {
  width: min(320px, 32vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.nav-search input,
.filter-input,
.search-large input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--neutral-900);
  font: inherit;
}

.nav-search input {
  padding-left: 10px;
  font-size: 14px;
}

.nav-search button,
.search-large button,
.primary-button,
.secondary-button,
.play-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.search-large button,
.primary-button,
.play-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.24);
}

.nav-search button {
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
}

.secondary-button {
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.64);
}

.nav-search button:hover,
.search-large button:hover,
.primary-button:hover,
.secondary-button:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--primary-700);
  background: var(--primary-100);
  font-size: 22px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.main-spacer {
  padding-top: 92px;
}

.hero {
  position: relative;
  min-height: 82vh;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58), rgba(2, 132, 199, 0.25)), linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 54%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 82vh;
  margin: 0 auto;
  padding-top: 120px;
  padding-bottom: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  align-items: center;
  gap: 46px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--primary-100);
  border: 1px solid rgba(224, 242, 254, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 20px 0 18px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.85;
}

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

.hero-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.hero-card img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 22px;
}

.hero-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.3;
}

.hero-card span {
  color: rgba(255, 255, 255, 0.78);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

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

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

.section.tight {
  padding: 36px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--neutral-500);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.32);
  box-shadow: 0 28px 60px rgba(2, 132, 199, 0.18);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--primary-100), #ffffff);
}

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

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

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

.poster-badge,
.rank-num {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.rank-num {
  background: linear-gradient(135deg, var(--accent-500), #ef4444);
}

.poster .rank-num + img + .poster-badge,
.rank-num ~ .poster-badge {
  top: 50px;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--neutral-500);
  font-size: 12px;
  font-weight: 700;
}

.card-meta a {
  color: var(--primary-700);
}

.movie-card h3 {
  margin: 0 0 10px;
  color: var(--neutral-900);
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  margin: 0;
  color: var(--neutral-500);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  padding: 5px 9px;
  color: var(--primary-700);
  border-radius: 999px;
  background: var(--primary-100);
  font-size: 12px;
  font-weight: 700;
}

.feature-band {
  border-radius: 32px;
  padding: 34px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.26), transparent 34%), linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  box-shadow: var(--shadow-soft);
}

.feature-band .section-desc {
  color: rgba(255, 255, 255, 0.84);
}

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

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  min-height: 196px;
}

.movie-card-horizontal .poster {
  aspect-ratio: auto;
  height: 100%;
}

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

.category-chip {
  display: grid;
  align-content: space-between;
  min-height: 148px;
  padding: 20px;
  border: 1px solid rgba(186, 230, 253, 0.85);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, var(--primary-50));
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-4px);
  border-color: var(--primary-500);
}

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

.category-chip em {
  color: var(--neutral-500);
  font-style: normal;
  line-height: 1.7;
}

.category-chip span {
  justify-self: start;
  margin-top: 14px;
  padding: 6px 10px;
  color: #ffffff;
  border-radius: 999px;
  background: var(--primary-600);
  font-size: 12px;
  font-weight: 800;
}

.page-hero {
  padding: 140px 0 62px;
  color: #ffffff;
  background: radial-gradient(circle at 82% 20%, rgba(20, 184, 166, 0.45), transparent 28%), linear-gradient(135deg, #0f172a, var(--primary-700));
}

.page-hero .inner,
.detail-shell,
.search-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.filter-bar,
.search-large {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 32px;
  padding: 12px;
  border: 1px solid rgba(186, 230, 253, 0.88);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(2, 132, 199, 0.1);
}

.filter-input,
.search-large input {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--neutral-100);
}

.search-large button {
  align-self: stretch;
  padding: 0 24px;
  border-radius: 16px;
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--neutral-500);
  border: 1px dashed var(--primary-500);
  border-radius: 24px;
  background: #ffffff;
}

.detail-page {
  padding: 118px 0 0;
  background: linear-gradient(180deg, #0f172a 0, #0f172a 420px, var(--primary-50) 421px, #ffffff 100%);
}

.detail-title {
  color: #ffffff;
  padding-bottom: 28px;
}

.detail-title h1 {
  max-width: 850px;
  margin-bottom: 14px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.76);
}

.detail-meta span,
.detail-meta a {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.player-card,
.detail-card {
  border: 1px solid rgba(231, 229, 228, 0.88);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

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

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.18));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  font-size: 32px;
  line-height: 1;
}

.player-caption {
  padding: 20px 24px;
}

.player-caption h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.player-caption p {
  margin: 0;
  color: var(--neutral-500);
  line-height: 1.8;
}

.detail-card {
  padding: 24px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 28px;
  padding-top: 34px;
}

.article-box,
.side-box {
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.07);
}

.article-box {
  padding: 32px;
}

.article-box h2,
.side-box h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.article-box p {
  color: var(--neutral-700);
  line-height: 2;
  text-align: justify;
}

.side-box {
  padding: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: var(--neutral-50);
}

.related-item:hover {
  background: var(--primary-50);
}

.related-item img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.35;
}

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

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  min-height: 200px;
}

.site-footer {
  margin-top: 70px;
  color: rgba(255, 255, 255, 0.78);
  background: #0f172a;
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-shell p {
  max-width: 520px;
  line-height: 1.8;
}

.footer-brand {
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-card img {
    height: 260px;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .brand,
  .footer-brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 96px;
    gap: 28px;
  }

  .hero-actions,
  .section-head,
  .filter-bar,
  .search-large {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-card img {
    height: 220px;
  }

  .movie-grid,
  .search-results,
  .rank-list,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .page-hero {
    padding-top: 112px;
  }

  .article-box,
  .detail-card,
  .side-box {
    padding: 22px;
  }
}
