:root {
  --ink-900: #3d3d3d;
  --ink-700: #5b5b5b;
  --mist-50: #f8f9fa;
  --mist-100: #f1f3f5;
  --mist-200: #e9ecef;
  --mist-500: #adb5bd;
  --mist-700: #6c757d;
  --mountain-50: #e8f4f8;
  --mountain-100: #d1e9f1;
  --mountain-400: #47a7c7;
  --mountain-600: #236e86;
  --mountain-700: #1a5264;
  --paper-100: #fcfcfc;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(38, 51, 60, 0.12);
  --shadow-card: 0 10px 30px rgba(38, 51, 60, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink-900);
  background: var(--paper-100);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(222, 226, 230, 0.75);
}

.nav-shell {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink-900);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--mountain-600), var(--mountain-400));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(35, 110, 134, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--ink-700);
  transition: all 0.2s ease;
}

.nav-link {
  padding: 9px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--mountain-700);
  background: var(--mountain-50);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--mist-100);
  color: var(--ink-900);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 14px;
  gap: 8px;
  flex-wrap: wrap;
}

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

.mobile-link {
  padding: 8px 14px;
  background: var(--white);
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 120px 20px 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-panel {
  max-width: 760px;
  color: var(--white);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--mountain-600);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 28px;
  max-width: 720px;
  color: var(--mist-100);
  font-size: 18px;
}

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

.btn-primary,
.btn-light,
.btn-ghost,
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: var(--white);
  background: var(--mountain-600);
  box-shadow: 0 12px 28px rgba(35, 110, 134, 0.28);
}

.btn-primary:hover,
.btn-light:hover,
.btn-dark:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-light {
  color: var(--ink-900);
  background: var(--white);
}

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

.btn-dark {
  color: var(--white);
  background: var(--ink-900);
}

.hero-search {
  display: flex;
  align-items: center;
  width: min(100%, 560px);
  min-height: 56px;
  margin-top: 26px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: var(--ink-900);
  background: transparent;
}

.hero-search button {
  border: 0;
  color: var(--white);
  background: var(--mountain-600);
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-controls button,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

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

.hero-dot {
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 36px;
  background: var(--white);
}

.section {
  padding: 76px 20px;
}

.section.white {
  background: var(--white);
}

.section.mist {
  background: var(--mist-50);
}

.section.dark {
  color: var(--white);
  background: var(--ink-900);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: inherit;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--mist-700);
}

.dark .section-head p,
.dark .card-meta {
  color: var(--mist-200);
}

.text-link {
  color: var(--mountain-600);
  font-weight: 800;
}

.dark .text-link {
  color: var(--mountain-400);
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.02) 54%);
  opacity: 0.78;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(35, 110, 134, 0.86);
  opacity: 0;
  transition: all 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: var(--mist-700);
  font-size: 13px;
  font-weight: 700;
}

.card-body h3,
.wide-info h3 {
  margin: 6px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-desc,
.wide-info p {
  margin: 0 0 14px;
  color: var(--ink-700);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.rail {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail .movie-card {
  flex: 0 0 310px;
  scroll-snap-align: start;
}

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--ink-900);
  box-shadow: var(--shadow-card);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.5s ease;
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-card .category-content {
  position: relative;
  z-index: 2;
  min-height: 210px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.06));
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--mist-100);
}

.page-hero {
  padding: 80px 20px 56px;
  background: radial-gradient(circle at 20% 20%, rgba(71, 167, 199, 0.22), transparent 36%), linear-gradient(135deg, var(--ink-900), #1f3f4a);
  color: var(--white);
}

.page-title {
  max-width: 1180px;
  margin: 0 auto;
}

.page-title p {
  max-width: 760px;
  color: var(--mist-100);
}

.filter-bar {
  margin: 0 0 30px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px;
  gap: 14px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--mist-200);
  border-radius: 12px;
  padding: 0 12px;
  outline: none;
  background: var(--mist-50);
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--mountain-400);
  box-shadow: 0 0 0 3px rgba(71, 167, 199, 0.18);
}

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

.wide-card {
  display: grid;
  grid-template-columns: auto 120px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.rank-num {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--mountain-600), var(--mountain-400));
  font-weight: 900;
}

.wide-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 3 / 4;
}

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

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

.player-box {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #050505;
  box-shadow: var(--shadow-soft);
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-overlay span {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(35, 110, 134, 0.92);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.32);
  font-size: 32px;
}

.detail-title {
  padding: 28px 0 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--mist-700);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--mountain-600);
  font-weight: 800;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.detail-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-card h2 {
  margin: 0 0 12px;
}

.detail-card p {
  margin: 0 0 16px;
  color: var(--ink-700);
}

.side-cover {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

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

.side-panel {
  display: grid;
  gap: 18px;
}

.site-footer {
  padding: 44px 20px;
  color: var(--mist-100);
  background: var(--ink-900);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--mist-500);
}

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

.footer-links a:hover {
  color: var(--mountain-400);
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  color: var(--mist-700);
}

.empty-state.show {
  display: block;
}

@media (max-width: 980px) {
  .grid.three,
  .grid.four,
  .grid.category-grid,
  .detail-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero,
  .hero-content {
    min-height: 66vh;
  }

  .hero-content {
    padding: 96px 18px 78px;
  }

  .hero-actions,
  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-search {
    border-radius: 20px;
    align-items: stretch;
    flex-direction: column;
    padding: 10px;
  }

  .hero-search input {
    min-height: 42px;
  }

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

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

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

  .wide-card .rank-num {
    grid-row: span 2;
  }

  .wide-cover {
    display: none;
  }

  .section {
    padding: 54px 18px;
  }
}
