:root {
  --ocean-50: #f0f9ff;
  --ocean-100: #e0f2fe;
  --ocean-500: #0ea5e9;
  --ocean-600: #0284c7;
  --ocean-700: #0369a1;
  --ocean-900: #0c4a6e;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --soft: 0 8px 30px rgba(15, 23, 42, 0.08);
  --hover: 0 18px 45px rgba(2, 132, 199, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f8fafc;
  font-family: Inter, -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%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

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

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

.brand-icon,
.footer-brand span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  background: linear-gradient(135deg, var(--ocean-600), #22d3ee);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.28);
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: #475569;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--ocean-50);
  color: var(--ocean-700);
  font-size: 24px;
}

.mobile-nav {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid var(--line);
}

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

.section {
  padding: 56px 0;
}

.section.alt {
  background: white;
}

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

.section-head h2,
.filter-panel h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.more-link {
  color: var(--ocean-700);
  font-weight: 700;
  white-space: nowrap;
}

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

.hero-carousel {
  position: relative;
  min-height: 560px;
  height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-bg.is-missing {
  display: none;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 30%, rgba(14, 165, 233, 0.35), transparent 36%), linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.35));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 42px;
  color: white;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-tags span,
.tag-row span,
.info-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--ocean-700);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.button-primary,
.button-ghost,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary,
.play-button {
  color: white;
  background: linear-gradient(135deg, var(--ocean-600), #06b6d4);
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.32);
}

.button-ghost {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.button-primary:hover,
.button-ghost:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.hero-side-card {
  border-radius: 28px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(18px);
}

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

.hero-side-card p {
  color: #dbeafe;
  margin: 0 0 18px;
}

.hero-mini-list {
  display: grid;
  gap: 10px;
}

.hero-mini-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrows,
.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 22px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  opacity: 0.55;
}

.hero-dot.active {
  width: 28px;
  opacity: 1;
  background: white;
}

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

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

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 240px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: thin;
}

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

.movie-link {
  display: block;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: white;
  box-shadow: var(--soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #bae6fd, transparent 28%), linear-gradient(135deg, #dbeafe, #f0f9ff 48%, #e0f2fe);
}

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

.poster-img.is-missing {
  opacity: 0;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.62));
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.22);
}

.movie-body {
  padding: 16px;
}

.movie-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.tag-row,
.info-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  color: white;
  background: linear-gradient(135deg, #075985, #0ea5e9 52%, #22d3ee);
  box-shadow: var(--soft);
  overflow: hidden;
  position: relative;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -34px;
  top: -34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h3 {
  position: relative;
  margin: 0 0 8px;
  font-size: 23px;
}

.category-card p,
.category-card span {
  position: relative;
  margin: 0;
  color: #e0f2fe;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 0.85fr);
  gap: 24px;
  align-items: end;
  padding: 24px;
  margin-bottom: 28px;
  border-radius: 28px;
  background: white;
  box-shadow: var(--soft);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  gap: 10px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: #f8fafc;
  color: var(--ink);
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--ocean-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

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

.ranking-link {
  display: grid;
  grid-template-columns: 58px 64px 1.1fr 1fr 110px;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 10px 16px;
  border-radius: 20px;
  background: white;
  box-shadow: var(--soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.ranking-number {
  color: var(--ocean-700);
  font-weight: 900;
  font-size: 24px;
}

.ranking-link img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--ocean-50);
}

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

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

.ranking-score {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ocean-700);
  background: var(--ocean-50);
  font-weight: 800;
  font-size: 13px;
}

.page-hero {
  background: radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.24), transparent 34%), linear-gradient(135deg, #082f49, #0f172a);
  color: white;
  padding: 74px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.player-shell {
  background: #020617;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.28);
}

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

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.2), rgba(2, 6, 23, 0.62));
  pointer-events: none;
}

.player-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  min-height: 58px;
  padding: 0 28px;
  font-size: 17px;
  pointer-events: auto;
}

.player-status {
  padding: 12px 18px;
  color: #cbd5e1;
  background: #020617;
  font-size: 14px;
}

.detail-card,
.side-panel {
  padding: 26px;
  border-radius: 28px;
  background: white;
  box-shadow: var(--soft);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.info-item {
  border-radius: 18px;
  padding: 14px;
  background: #f8fafc;
}

.info-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.info-item strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.prose-block {
  margin-top: 24px;
}

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

.prose-block p {
  margin: 0;
  color: #334155;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
}

.side-link img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--ocean-50);
}

.side-link strong {
  display: block;
  line-height: 1.25;
  margin-bottom: 4px;
}

.side-link span {
  color: var(--muted);
  font-size: 12px;
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 20px;
  color: var(--muted);
  background: white;
  box-shadow: var(--soft);
}

.no-results.show {
  display: block;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  padding: 54px 0 26px;
}

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

.footer-brand {
  color: white;
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
}

.site-footer h3 {
  color: white;
  margin: 0 0 12px;
}

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

.site-footer a:hover {
  color: #7dd3fc;
}

.footer-bottom {
  width: min(1180px, calc(100% - 40px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  text-align: center;
  font-size: 13px;
}

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

  .hero-content,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .hero-side-card {
    display: none;
  }

  .ranking-link {
    grid-template-columns: 46px 58px 1fr 96px;
  }

  .ranking-meta {
    display: none;
  }
}

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

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

  .mobile-nav.open {
    display: grid;
    gap: 6px;
  }

  .hero-carousel {
    min-height: 620px;
    height: auto;
  }

  .hero-content {
    padding: 72px 0 96px;
  }

  .hero-controls {
    bottom: 18px;
  }

  .hero-arrows {
    display: none;
  }

  .section {
    padding: 42px 0;
  }

  .section-head {
    display: block;
  }

  .card-grid,
  .card-grid.compact,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

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

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

  .ranking-link {
    grid-template-columns: 36px 52px 1fr;
  }

  .ranking-score {
    display: none;
  }
}

@media (max-width: 480px) {
  .container,
  .hero-content,
  .hero-controls,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 28px, 1180px);
  }

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

  .horizontal-row {
    grid-auto-columns: 78%;
  }
}
