:root {
  --site-fog-50: #f0f9ff;
  --site-fog-100: #e0f2fe;
  --site-fog-500: #0ea5e9;
  --site-fog-600: #0284c7;
  --site-fog-700: #0369a1;
  --site-mist-50: #f8f9fa;
  --site-mist-100: #f1f3f5;
  --site-mist-200: #e9ecef;
  --site-mist-300: #dee2e6;
  --site-mist-700: #495057;
  --site-mist-800: #343a40;
  --site-mist-900: #212529;
  --site-shadow: 0 22px 60px rgba(15, 23, 42, .14);
  --site-radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--site-mist-900);
  background: linear-gradient(180deg, var(--site-mist-50), #ffffff 42%, var(--site-fog-50));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(222, 226, 230, .9);
}

.site-nav {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--site-fog-500), var(--site-fog-700));
  box-shadow: 0 12px 28px rgba(2, 132, 199, .26);
}

.brand-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--site-mist-700);
  font-weight: 650;
}

.nav-link {
  position: relative;
  transition: color .2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: var(--site-fog-600);
  transform: scaleX(0);
  transition: transform .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--site-fog-700);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--site-mist-100);
  cursor: pointer;
  padding: 10px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--site-mist-800);
}

.mobile-panel {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

.mobile-link {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--site-mist-200);
  color: var(--site-mist-700);
  font-weight: 700;
}

.mobile-link.is-active {
  color: var(--site-fog-700);
}

.hero-carousel {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--site-mist-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1s ease;
  display: flex;
  align-items: flex-end;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-content {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 92px;
  color: #ffffff;
  animation: slideUp .55s ease-out both;
}

.hero-kicker,
.detail-kicker,
.page-hero p,
.section-heading p,
.category-overview-head p {
  margin: 0 0 12px;
  color: var(--site-fog-100);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  max-width: 820px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.hero-content h2 {
  font-size: clamp(28px, 4vw, 48px);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(17px, 2.2vw, 23px);
  line-height: 1.7;
}

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

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--site-fog-600);
  box-shadow: 0 16px 34px rgba(2, 132, 199, .34);
}

.primary-button:hover {
  transform: translateY(-2px);
  background: var(--site-fog-700);
  box-shadow: 0 18px 38px rgba(2, 132, 199, .42);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .22);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: max(20px, calc((100vw - 1240px) / 2));
  bottom: 44px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .48);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}

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

.section-wrap {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -.03em;
}

.section-heading p,
.category-overview-head p {
  color: var(--site-fog-700);
}

.section-heading a,
.text-button {
  color: var(--site-fog-700);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--site-radius);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(233, 236, 239, .95);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--site-shadow);
}

.movie-card[hidden] {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--site-mist-200), var(--site-fog-100));
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform .35s ease, filter .35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .66));
}

.card-badge,
.rank-index {
  position: absolute;
  z-index: 2;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.card-badge {
  right: 12px;
  background: rgba(2, 132, 199, .88);
}

.rank-index {
  left: 12px;
  background: rgba(0, 0, 0, .62);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta {
  color: var(--site-fog-700);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--site-mist-900);
  font-size: 17px;
  line-height: 1.35;
}

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

.movie-card p {
  margin: 0 0 12px;
  min-height: 48px;
  color: var(--site-mist-700);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--site-fog-700);
  background: var(--site-fog-50);
  font-size: 12px;
  font-weight: 750;
}

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

.category-card {
  min-height: 158px;
  padding: 22px;
  border-radius: var(--site-radius);
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, .24), transparent 38%), linear-gradient(135deg, var(--site-mist-900), var(--site-fog-700));
  box-shadow: var(--site-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, .18);
}

.category-card span {
  display: block;
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 850;
}

.category-card strong {
  display: block;
  color: rgba(255, 255, 255, .8);
  font-size: 14px;
  line-height: 1.7;
}

.horizontal-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 20px;
  scroll-snap-type: x mandatory;
}

.horizontal-strip .movie-card {
  scroll-snap-align: start;
  width: 210px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(150px, .75fr));
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--site-radius);
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(233, 236, 239, .94);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--site-mist-700);
  font-size: 13px;
  font-weight: 800;
}

.search-input,
.filter-select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--site-mist-300);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  color: var(--site-mist-900);
  background: #ffffff;
  font: inherit;
}

.search-input:focus,
.filter-select:focus {
  border-color: var(--site-fog-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .12);
}

.empty-state {
  margin: 30px 0 0;
  padding: 28px;
  text-align: center;
  border-radius: var(--site-radius);
  color: var(--site-mist-700);
  background: #ffffff;
  border: 1px solid var(--site-mist-200);
}

.page-hero,
.detail-hero {
  position: relative;
  color: #ffffff;
  background: linear-gradient(135deg, var(--site-mist-900), var(--site-fog-700));
  background-size: cover;
  background-position: center;
}

.page-hero {
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  padding: 80px max(20px, calc((100vw - 1240px) / 2)) 62px;
}

.page-hero div {
  max-width: 760px;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

.page-hero span {
  display: block;
  color: rgba(255, 255, 255, .82);
  font-size: 18px;
  line-height: 1.8;
}

.category-overview {
  display: grid;
  gap: 44px;
}

.category-overview-block {
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid var(--site-mist-200);
  box-shadow: 0 14px 40px rgba(15, 23, 42, .06);
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 22px;
}

.category-overview-head h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.category-overview-head span {
  color: var(--site-mist-700);
  line-height: 1.7;
}

.detail-hero {
  min-height: 640px;
  display: flex;
  align-items: flex-end;
}

.detail-hero-inner {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, .78);
  font-weight: 700;
}

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

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
}

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

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -.05em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, .84);
  font-size: 20px;
  line-height: 1.8;
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 32px;
  align-items: start;
}

.player-card,
.detail-content {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--site-mist-200);
  box-shadow: var(--site-shadow);
}

.player-card {
  overflow: hidden;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, .18), rgba(0, 0, 0, .68));
  cursor: pointer;
  z-index: 4;
  transition: opacity .2s ease, visibility .2s ease;
}

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

.play-ring {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--site-fog-600);
  box-shadow: 0 20px 48px rgba(2, 132, 199, .38);
  font-size: 34px;
  padding-left: 6px;
}

.detail-content {
  padding: 30px;
}

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

.detail-content p {
  margin: 0 0 18px;
  color: var(--site-mist-700);
  line-height: 1.95;
}

.related-section {
  padding-top: 0;
}

.site-footer {
  color: var(--site-mist-300);
  background: var(--site-mist-900);
}

.footer-inner {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, .7fr) minmax(180px, .7fr);
  gap: 36px;
}

.footer-logo {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 16px;
}

.footer-brand p {
  margin: 0;
  max-width: 520px;
  color: rgba(233, 236, 239, .82);
  line-height: 1.8;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: rgba(233, 236, 239, .82);
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: rgba(233, 236, 239, .72);
  text-align: center;
}

@keyframes slideUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

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

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

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

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

  .mobile-menu-button {
    display: block;
  }

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

  .hero-content {
    padding-bottom: 104px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
  }

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

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

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

@media (max-width: 560px) {
  .site-nav {
    padding: 0 14px;
  }

  .brand-text {
    font-size: 17px;
  }

  .hero-carousel {
    min-height: 580px;
  }

  .section-wrap,
  .detail-hero-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 28px, 1240px);
  }

  .section-wrap {
    padding: 54px 0;
  }

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

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

  .movie-grid,
  .featured-grid,
  .ranking-grid,
  .compact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .movie-card-body {
    padding: 12px;
  }

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

  .movie-card p {
    min-height: 42px;
    font-size: 12px;
  }

  .detail-content {
    padding: 22px;
  }

  .play-ring {
    width: 70px;
    height: 70px;
  }
}
