:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --secondary: #7c3aed;
  --secondary-soft: #f5f3ff;
  --surface: #ffffff;
  --body: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--body);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(18px);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  font-size: 13px;
}

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

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

.nav-link {
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-soft);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--primary);
  border-radius: 999px;
}

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

.hero {
  position: relative;
  display: grid;
  gap: 22px;
}

.hero-stage {
  position: relative;
  height: min(72vh, 680px);
  min-height: 520px;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(37, 99, 235, 0.45), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.16)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 42%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  bottom: clamp(46px, 9vh, 108px);
  width: min(700px, calc(100% - 48px));
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero-lead {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-focus {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-focus span {
  color: rgba(255, 255, 255, 0.62);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

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

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

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

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

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

.hero-search-card {
  display: grid;
  grid-template-columns: minmax(280px, 390px) 1fr;
  gap: 18px;
  align-items: stretch;
  margin-top: -72px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 3;
}

.hero-search-form {
  display: grid;
  gap: 12px;
  align-content: center;
}

.hero-search-form label,
.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.hero-search-form input,
.search-box input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--text);
  background: #ffffff;
  outline: none;
}

.hero-search-form input:focus,
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hero-search-form button {
  height: 48px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-weight: 800;
}

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

.hero-thumb {
  display: grid;
  grid-template-rows: 120px auto;
  gap: 8px;
  overflow: hidden;
  border-radius: 16px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.hero-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 16px;
}

.content-section {
  margin-top: 54px;
}

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

.section-head h2,
.article-section h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.section-head p,
.article-section p,
.page-hero p,
.category-card-body p,
.category-tile p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1f2937);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.72));
}

.score,
.card-category,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.score {
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.card-category {
  left: 10px;
  bottom: 10px;
  padding: 4px 9px;
  color: #ffffff;
  background: var(--primary);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.card-link:hover h3 {
  color: var(--primary);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 13px;
}

.card-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f3f4f6;
}

.card-genre {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.split-section,
.category-overview,
.tool-panel,
.article-section,
.player-section {
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-soft);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-row,
.wide-rank-row {
  display: grid;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row {
  grid-template-columns: 34px 58px 1fr 42px;
  padding: 10px;
}

.wide-rank-row {
  grid-template-columns: 42px 72px 1fr 52px;
  padding: 12px;
}

.rank-row:hover,
.wide-rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.rank-num {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--primary);
  font-weight: 900;
}

.rank-row img,
.wide-rank-row img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  object-fit: cover;
}

.rank-info,
.wide-rank-row span:nth-child(3) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rank-info strong,
.wide-rank-row strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info em,
.wide-rank-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score,
.wide-rank-row b {
  color: #f59e0b;
  font-weight: 900;
}

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

.category-tile,
.category-card a {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 158px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.category-tile h3,
.category-card h2 {
  margin: 0;
  font-size: 22px;
}

.category-card-body span {
  display: block;
  margin-top: 12px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: clamp(30px, 6vw, 58px);
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #0f172a, #1d4ed8 55%, #7c3aed);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 18px;
  align-items: end;
  margin: 30px 0;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #374151;
  background: #ffffff;
  font-weight: 800;
  transition: all 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--primary);
  color: #ffffff;
  background: var(--primary);
}

.movie-card.is-hidden {
  display: none;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: center;
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

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

.detail-poster span {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.66);
  font-weight: 900;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.detail-lead {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 18px;
}

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

.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

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

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 12px;
  place-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.36), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.35);
  font-size: 30px;
}

.player-cover strong {
  font-size: 20px;
}

.article-section h2 + p {
  margin-top: 10px;
}

.article-section p + h2 {
  margin-top: 24px;
}

.article-section p {
  font-size: 17px;
  color: #374151;
}

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

.movie-card-compact .card-body p {
  display: none;
}

.movie-card-compact .card-body h3 {
  min-height: 44px;
}

.site-footer {
  margin-top: 72px;
  background: #111827;
  color: #d1d5db;
}

.footer-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-main p {
  max-width: 620px;
  color: #9ca3af;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

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

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

.footer-col a:hover {
  color: #93c5fd;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

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

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

  .hero-search-card,
  .tool-panel {
    grid-template-columns: 1fr;
  }

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

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

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px;
    border-radius: 12px;
  }

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

  .hero-stage {
    min-height: 560px;
    height: 74vh;
  }

  .hero-arrow {
    display: none;
  }

  .hero-search-card {
    margin-top: 16px;
  }

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 520px) {
  .page-wrap,
  .nav-wrap,
  .footer-wrap {
    width: min(100% - 24px, 1180px);
  }

  .hero-stage {
    border-radius: 20px;
  }

  .hero-content {
    left: 20px;
    bottom: 34px;
    width: calc(100% - 40px);
  }

  .hero h1,
  .hero h2,
  .detail-copy h1,
  .page-hero h1 {
    font-size: 30px;
  }

  .hero-actions,
  .hero-actions.narrow {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .split-section,
  .category-overview,
  .tool-panel,
  .article-section,
  .player-section,
  .detail-hero,
  .page-hero {
    padding: 20px;
    border-radius: 20px;
  }

  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .category-tile,
  .category-card a {
    grid-template-columns: 1fr;
  }

  .wide-rank-row,
  .rank-row {
    grid-template-columns: 32px 56px 1fr;
  }

  .wide-rank-row b,
  .rank-score {
    display: none;
  }
}
