:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-900: #0c4a6e;
  --secondary-50: #fffbeb;
  --secondary-400: #f59e0b;
  --secondary-600: #b45309;
  --secondary-700: #92400e;
  --accent-50: #fef2f2;
  --accent-500: #ef4444;
  --accent-600: #dc2626;
  --accent-700: #b91c1c;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-300: #d6d3d1;
  --neutral-400: #a8a29e;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-md: 0 10px 25px rgb(28 25 23 / 0.10);
  --shadow-lg: 0 20px 45px rgb(28 25 23 / 0.18);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.95);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  border-radius: 11px;
  box-shadow: 0 10px 22px rgb(2 132 199 / 0.26);
  font-size: 14px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  color: var(--neutral-900);
  font-size: 20px;
}

.brand-copy em {
  color: var(--neutral-500);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  padding: 9px 15px;
  color: var(--neutral-600);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--neutral-600);
  background: transparent;
  border: 0;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.icon-button:hover {
  color: var(--neutral-900);
  background: var(--neutral-100);
}

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

.search-panel,
.mobile-panel {
  display: none;
  border-top: 1px solid var(--neutral-200);
}

.search-panel.open,
.mobile-panel.open {
  display: block;
  animation: slideDown 0.28s ease both;
}

.site-search-form {
  display: flex;
  gap: 10px;
  padding: 16px 0;
}

.site-search-form input,
.filter-search input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  background: #fff;
  color: var(--neutral-900);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.site-search-form input,
.filter-search input {
  padding: 12px 14px;
}

.filter-bar select {
  min-width: 150px;
  padding: 12px;
}

.site-search-form input:focus,
.filter-search input:focus,
.filter-bar select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgb(2 132 199 / 0.14);
}

.site-search-form button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.site-search-form button,
.primary-button {
  padding: 12px 24px;
  color: #fff;
  background: var(--primary-600);
}

.site-search-form button:hover,
.primary-button:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

.secondary-button {
  padding: 12px 24px;
  color: var(--neutral-900);
  background: rgb(255 255 255 / 0.9);
}

.secondary-button:hover {
  color: var(--primary-700);
  background: #fff;
  transform: translateY(-1px);
}

.mobile-nav {
  display: grid;
  gap: 6px;
  padding: 14px 0;
}

.hero {
  position: relative;
  height: 60vh;
  min-height: 430px;
  max-height: 640px;
  overflow: hidden;
  color: #fff;
  background: var(--neutral-900);
}

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

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

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

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.56), rgb(0 0 0 / 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(100%, 660px);
  animation: slideUp 0.5s ease both;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  color: var(--primary-100);
  background: rgb(2 132 199 / 0.70);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

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

.hero p {
  max-width: 620px;
  margin: 0 0 22px;
  color: var(--neutral-200);
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-meta {
  margin-bottom: 26px;
  color: #fff;
  font-size: 14px;
}

.hero-meta span,
.detail-meta span {
  padding: 5px 10px;
  background: rgb(255 255 255 / 0.16);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: rgb(0 0 0 / 0.34);
  border: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgb(0 0 0 / 0.55);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgb(255 255 255 / 0.52);
  border: 0;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.main-content {
  padding: 48px 0 72px;
}

.page-hero {
  padding: 56px 0 34px;
  background: linear-gradient(135deg, var(--primary-50), #fff 55%, var(--secondary-50));
  border-bottom: 1px solid var(--neutral-200);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.035em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--neutral-600);
  font-size: 17px;
}

.section-block {
  margin-top: 56px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--primary-700);
  background: var(--primary-50);
  border-radius: 11px;
  font-style: normal;
}

.section-title h2 {
  margin: 0;
  color: var(--neutral-900);
  font-size: 26px;
  line-height: 1.2;
}

.more-link,
.filter-link {
  color: var(--primary-600);
  font-size: 14px;
  font-weight: 700;
}

.more-link:hover,
.filter-link:hover {
  color: var(--primary-700);
}

.poster-row {
  display: flex;
  gap: 18px;
  padding: 2px 2px 18px;
  margin-inline: -2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.poster-row .movie-card {
  width: 224px;
  min-width: 224px;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-frame,
.list-cover,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.poster-frame {
  aspect-ratio: 2 / 3;
  margin-bottom: 12px;
}

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

.poster-frame:hover img,
.movie-list-card:hover img,
.detail-poster:hover img {
  transform: scale(1.055);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgb(0 0 0 / 0.72));
}

.poster-type,
.rank-badge,
.poster-action {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.poster-type {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  color: #fff;
  background: rgb(0 0 0 / 0.48);
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-600), var(--accent-700));
  box-shadow: 0 8px 18px rgb(220 38 38 / 0.30);
}

.poster-action {
  right: 10px;
  bottom: 10px;
  padding: 7px 11px;
  color: #fff;
  background: var(--primary-600);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.poster-frame:hover .poster-action {
  opacity: 1;
  transform: translateY(0);
}

.movie-card h2,
.movie-list-card h2 {
  margin: 0;
  line-height: 1.35;
}

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

.movie-card h2 a,
.movie-list-card h2 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover h2 a,
.movie-list-card:hover h2 a {
  color: var(--primary-600);
}

.movie-card p {
  display: -webkit-box;
  min-height: 42px;
  margin: 6px 0 8px;
  overflow: hidden;
  color: var(--neutral-600);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.meta-line {
  color: var(--neutral-500);
  font-size: 12px;
}

.list-stack {
  display: grid;
  gap: 16px;
}

.movie-list-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-list-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.list-cover {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
}

.list-body {
  min-width: 0;
  padding: 4px 4px 4px 0;
}

.list-body p {
  display: -webkit-box;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--neutral-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

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

.category-chip,
.category-card {
  display: block;
  min-height: 128px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.category-chip:hover,
.category-card:hover {
  border-color: var(--primary-100);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.category-chip strong,
.category-card h2 {
  display: block;
  margin: 0 0 8px;
  color: var(--neutral-900);
  font-size: 20px;
}

.category-chip span,
.category-card p {
  color: var(--neutral-600);
  font-size: 14px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 28px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--neutral-500);
}

.ranking-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item a {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.rank-item a:hover {
  background: var(--neutral-100);
}

.rank-num {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  border-radius: 10px;
  font-weight: 800;
}

.rank-info strong {
  display: block;
  line-height: 1.35;
}

.rank-info span,
.rank-meta {
  color: var(--neutral-500);
  font-size: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--neutral-500);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--primary-600);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.66));
  border: 0;
  transition: opacity 0.2s ease;
}

.play-cover span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: rgb(2 132 199 / 0.92);
  border-radius: 999px;
  box-shadow: 0 20px 35px rgb(2 132 199 / 0.28);
  font-size: 18px;
  font-weight: 800;
}

.player-shell.is-playing .play-cover {
  opacity: 0;
  pointer-events: none;
}

.detail-side {
  position: sticky;
  top: 88px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  margin-bottom: 18px;
}

.detail-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.25;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.detail-meta span {
  color: var(--neutral-700);
  background: var(--neutral-100);
  font-size: 13px;
}

.content-card {
  margin-top: 28px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 18px;
  color: var(--neutral-700);
}

.hidden {
  display: none !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0 34px;
}

.footer-logo .brand-copy strong {
  color: #fff;
}

.footer-logo .brand-copy em,
.footer-brand p,
.footer-bottom p {
  color: var(--neutral-400);
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
  font-size: 14px;
}

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

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid var(--neutral-800);
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
}

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

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

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

  .detail-side {
    position: static;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 18px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .desktop-nav {
    display: none;
  }

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

  .brand-copy em {
    display: none;
  }

  .hero {
    height: 68vh;
    min-height: 500px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-slide::after {
    background: linear-gradient(180deg, rgb(0 0 0 / 0.42), rgb(0 0 0 / 0.82));
  }

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

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

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

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

  .poster-row .movie-card {
    width: 180px;
    min-width: 180px;
  }

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

  .movie-list-card {
    grid-template-columns: 112px 1fr;
    gap: 12px;
  }

  .list-body p,
  .tag-row {
    display: none;
  }

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

  .detail-poster {
    display: none;
  }

  .content-card {
    padding: 22px;
  }

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