:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --accent-50: #ecfdf5;
  --accent-600: #059669;
  --secondary-50: #fffbeb;
  --secondary-600: #b45309;
  --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-900: #1c1917;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 14px 35px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(231, 229, 228, 0.85);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--neutral-900);
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.25);
}

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

.nav-link,
.mobile-link {
  color: var(--neutral-600);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.nav-search-toggle,
.mobile-toggle {
  border: 0;
  background: transparent;
  color: var(--neutral-600);
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
}

.nav-search-toggle:hover,
.mobile-toggle:hover {
  color: var(--primary-600);
  background: var(--primary-50);
}

.mobile-toggle {
  display: none;
  font-size: 24px;
}

.header-search {
  padding: 0 0 16px;
}

.search-form,
.mobile-search,
.inline-filter {
  display: flex;
  gap: 12px;
  align-items: center;
}

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

.search-form input:focus,
.mobile-search input:focus,
.inline-filter input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.search-form button,
.inline-filter button,
.btn-light {
  border: 0;
  white-space: nowrap;
  border-radius: 12px;
  padding: 12px 18px;
  color: var(--primary-700);
  background: #fff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-weight: 700;
}

.mobile-panel {
  border-top: 1px solid var(--neutral-200);
  background: #fff;
}

.mobile-links {
  display: grid;
  gap: 12px;
  padding: 16px 0;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  max-width: 760px;
}

.hero-kicker,
.page-kicker {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #bae6fd;
}

.hero h1,
.page-hero h1,
.detail-main h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.06;
  font-weight: 900;
}

.hero-text {
  max-width: 700px;
  margin: 18px 0 0;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(8px);
}

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

.btn-primary,
.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--primary-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 30px;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.65);
}

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

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

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section-block {
  padding: 56px 0;
}

.section-muted {
  background: var(--neutral-100);
}

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

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--neutral-600);
}

.section-more {
  color: var(--primary-700);
  font-weight: 800;
}

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

.category-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-showcase:hover,
.movie-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.category-card span {
  font-size: 18px;
  font-weight: 900;
  color: var(--neutral-900);
}

.category-card small {
  color: var(--neutral-600);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--accent-50));
}

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

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

.score-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.score-pill {
  right: 12px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(2, 132, 199, 0.92);
}

.rank-badge {
  left: 12px;
  width: 34px;
  height: 34px;
  color: var(--neutral-900);
  background: #fff;
}

.card-body {
  padding: 18px;
}

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

.card-body h3 a:hover,
.rank-info h2 a:hover {
  color: var(--primary-600);
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--neutral-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  gap: 8px;
  color: var(--neutral-500);
  font-size: 13px;
}

.card-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--neutral-100);
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 286px;
  gap: 20px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

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

.rail-item {
  scroll-snap-align: start;
}

.rail-actions {
  display: flex;
  gap: 8px;
}

.rail-actions button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--primary-700);
  background: #fff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-size: 25px;
}

.feature-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.feature-main .movie-card .card-cover {
  aspect-ratio: 16 / 12;
}

.feature-side {
  display: grid;
  gap: 24px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 230px 1fr;
}

.movie-card-wide .card-cover {
  aspect-ratio: auto;
  min-height: 188px;
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700) 55%, var(--accent-600));
}

.small-hero .container {
  padding: 64px 0;
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.92);
}

.inline-filter {
  max-width: 740px;
  margin-top: 26px;
}

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

.category-showcase {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  min-height: 150px;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-showcase div {
  padding: 22px 22px 22px 0;
}

.category-showcase h2 {
  margin: 0 0 10px;
}

.category-showcase p {
  margin: 0;
  color: var(--neutral-600);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 60px 132px 1fr auto;
  gap: 18px;
  align-items: center;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-number {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  background: var(--primary-600);
  font-weight: 900;
}

.rank-cover {
  height: 86px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--primary-50);
}

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

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--neutral-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-score {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--secondary-600);
  font-weight: 900;
}

.detail-hero {
  color: #fff;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.42), transparent 34%), linear-gradient(135deg, #111827, #1f2937 54%, #0f172a);
}

.detail-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: center;
  padding: 62px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-line {
  max-width: 860px;
  margin: 18px 0;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.88);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-list span {
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 13px;
  font-weight: 700;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.player-cover.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-600);
  box-shadow: 0 18px 44px rgba(2, 132, 199, 0.35);
}

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

.prose-card,
.side-card {
  border-radius: 22px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.prose-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.prose-card p {
  margin: 0 0 28px;
  color: var(--neutral-700);
  font-size: 17px;
  line-height: 1.9;
}

.prose-card p:last-child {
  margin-bottom: 0;
}

.side-card dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--neutral-500);
}

.side-card dd {
  margin: 0;
  color: var(--neutral-900);
  font-weight: 700;
}

.search-results:empty::before {
  content: "请输入关键词后查看匹配内容";
  grid-column: 1 / -1;
  padding: 36px;
  border-radius: 18px;
  color: var(--neutral-600);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-logo {
  color: #fff;
}

.site-footer p {
  max-width: 520px;
  color: var(--neutral-400);
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

.footer-links a:hover {
  color: var(--primary-500);
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: var(--neutral-400);
  font-size: 14px;
}

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

  .content-grid,
  .feature-layout {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero {
    height: 520px;
  }

  .hero-content {
    padding: 0 20px;
  }

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

  .movie-grid.four,
  .movie-grid.three,
  .ranking-grid,
  .category-grid,
  .category-showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-showcase,
  .detail-grid,
  .rank-row,
  .movie-card-wide,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-showcase img {
    height: 180px;
  }

  .detail-cover {
    max-width: 320px;
  }

  .rank-score {
    justify-self: start;
  }
}

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

  .hero {
    height: 500px;
  }

  .hero h1,
  .page-hero h1,
  .detail-main h1 {
    font-size: 34px;
  }

  .hero-arrow {
    display: none;
  }

  .section-heading,
  .section-heading.with-actions,
  .inline-filter,
  .search-form {
    align-items: stretch;
    flex-direction: column;
  }

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

  .movie-rail {
    grid-auto-columns: 82%;
  }

  .detail-grid {
    padding: 42px 0;
  }

  .small-hero .container {
    padding: 46px 0;
  }
}
