:root {
  --primary-50: #f2f7ff;
  --primary-100: #e3efff;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --secondary-500: #8b5cf6;
  --accent-500: #f97316;
  --warm-50: #fffaf3;
  --warm-100: #fff1df;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-soft: #e5e7eb;
  --card-bg: #ffffff;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-medium: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: linear-gradient(180deg, #ffffff 0%, var(--warm-50) 45%, var(--warm-100) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.75);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-500));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: var(--primary-700);
  background: var(--primary-50);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  padding: 9px 12px;
  font-size: 20px;
}

main {
  min-height: 70vh;
}

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

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(90deg, #111827, #1f2937);
}

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

.hero-slide.is-active {
  opacity: 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(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 72px;
  z-index: 2;
  max-width: 720px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #bfdbfe;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.hero-meta span,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

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

.btn-primary {
  color: #ffffff;
  background: var(--primary-600);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn-primary:hover {
  background: var(--primary-700);
}

.btn-ghost {
  color: var(--primary-700);
  background: var(--primary-50);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 26px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

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

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

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

.section-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: var(--shadow-soft);
}

.section-title h2,
.page-title h1,
.detail-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

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

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

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #fef3c7);
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: brightness(0.78);
}

.corner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  border-radius: 10px;
  padding: 4px 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%) scale(0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary-600);
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.meta-line span:last-child {
  color: var(--primary-600);
  font-weight: 800;
}

.category-panel,
.filter-panel,
.content-card {
  border-radius: 28px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-chip-list,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  padding: 10px 16px;
  color: #374151;
  background: #f9fafb;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-chip:hover {
  color: #ffffff;
  background: var(--primary-600);
  transform: translateY(-2px);
}

.page-hero {
  padding: 62px 0 28px;
}

.page-title {
  max-width: 760px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.filter-panel {
  margin-bottom: 28px;
}

.filter-input,
.filter-select {
  min-height: 46px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--text-main);
  font: inherit;
}

.filter-input {
  min-width: min(420px, 100%);
  flex: 1;
}

.filter-select {
  min-width: 140px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px 1fr auto;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  padding: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.rank-num {
  color: var(--accent-500);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: #f3f4f6;
}

.rank-title {
  font-weight: 900;
}

.rank-meta {
  color: var(--text-muted);
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 54px;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-medium);
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.28), rgba(0, 0, 0, 0.58));
  cursor: pointer;
  font: inherit;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary-600);
  background: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.play-overlay strong {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.detail-info {
  padding: 26px;
}

.detail-title {
  margin-bottom: 14px;
}

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

.detail-meta span {
  border-radius: 12px;
  padding: 7px 12px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 800;
  font-size: 14px;
}

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

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

.prose-block h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.prose-block p {
  margin: 0 0 22px;
  color: #374151;
}

.side-card {
  border-radius: 28px;
  padding: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 54px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
  background: #f3f4f6;
}

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

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

.site-footer {
  margin-top: 48px;
  padding: 38px 0;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 28px;
}

.footer-inner strong {
  color: #ffffff;
  font-size: 20px;
}

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

.footer-links a {
  border-radius: 999px;
  padding: 7px 10px;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.07);
  font-size: 14px;
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.is-filtered-out {
  display: none !important;
}

.empty-tip {
  display: none;
  border-radius: 18px;
  padding: 20px;
  color: var(--text-muted);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.empty-tip.is-visible {
  display: block;
}

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

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

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-medium);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    border-radius: 12px;
  }

  .hero-slider {
    height: 540px;
  }

  .hero-content {
    bottom: 64px;
  }

  .hero-arrow {
    display: none;
  }

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

  .section-head,
  .footer-inner {
    display: block;
  }

  .rank-item {
    grid-template-columns: 38px 50px 1fr;
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.wide {
    grid-template-columns: 1fr;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 34px;
  }

  .category-panel,
  .filter-panel,
  .content-card,
  .detail-info {
    padding: 20px;
  }
}
