:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --blue-600: #2563eb;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e5e7eb;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--sky-50) 0%, var(--white) 42%, var(--gray-50) 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.header-inner,
.footer-inner,
.section-inner,
.category-page,
.detail-inner,
.rank-page,
.category-index {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--sky-600), var(--blue-600));
  -webkit-background-clip: text;
  color: transparent;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--white);
  font-size: 0.86rem;
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.26);
}

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

.nav-link,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--gray-700);
  font-weight: 700;
  transition: all 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav a:hover {
  color: var(--sky-600);
  background: var(--sky-50);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  background: var(--gray-100);
  border-radius: 12px;
}

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

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  gap: 8px;
  flex-wrap: wrap;
}

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

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.5), transparent 26%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.1) 58%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 64px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  color: var(--white);
}

.hero-panel {
  width: min(680px, 100%);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  color: #bae6fd;
  font-size: 0.92rem;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.hero-tags,
.detail-tags,
.mini-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 22px 0 26px;
}

.hero-tags span,
.detail-tags a,
.detail-tags span,
.mini-tags span,
.mini-tags a,
.filter-chips button {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-weight: 700;
  font-size: 0.84rem;
}

.hero-actions,
.section-actions,
.category-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: all 0.22s ease;
}

.btn-primary {
  background: var(--sky-500);
  color: var(--white);
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.32);
}

.btn-primary:hover {
  background: var(--sky-600);
  transform: translateY(-2px);
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.btn-soft {
  color: var(--sky-700);
  background: var(--sky-50);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 52px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.22s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--white);
}

.search-strip {
  margin-top: -36px;
  position: relative;
  z-index: 8;
}

.search-box {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--white);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.search-box input {
  flex: 1;
  min-width: 120px;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  color: var(--gray-900);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(90deg, var(--sky-50), #eff6ff);
}

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

.section-title h2,
.section-title h1,
.page-title h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-title p,
.page-title p {
  margin: 10px 0 0;
  color: var(--gray-600);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-100), #dbeafe);
}

.movie-grid.compact .poster-link {
  height: 230px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.02));
  opacity: 0;
  transition: opacity 0.22s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--sky-600);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: all 0.22s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  color: var(--white);
  background: linear-gradient(135deg, #f97316, #ef4444);
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.82rem;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.25);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  margin-bottom: 10px;
  color: var(--gray-900);
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: var(--sky-600);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--gray-500);
  font-size: 0.82rem;
}

.movie-meta span:first-child {
  color: var(--sky-700);
  background: var(--sky-100);
  border-radius: 8px;
  padding: 2px 7px;
  font-weight: 800;
}

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

.mini-tags span,
.mini-tags a {
  color: var(--sky-700);
  background: var(--sky-50);
}

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

.category-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.category-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.94rem;
}

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

.list-movie {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  overflow: hidden;
  padding: 12px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

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

.list-movie img {
  width: 100%;
  height: 128px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--sky-100);
}

.list-movie strong,
.list-movie em,
.list-movie small {
  display: block;
}

.list-movie strong {
  font-size: 1.12rem;
  margin: 4px 0 8px;
}

.list-movie em {
  color: var(--sky-700);
  font-style: normal;
  font-weight: 800;
  margin-bottom: 8px;
}

.list-movie small {
  color: var(--gray-600);
  font-size: 0.94rem;
}

.page-hero {
  padding: 58px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 22% 10%, rgba(186, 230, 253, 0.34), transparent 28%),
    linear-gradient(135deg, var(--sky-500), var(--blue-600));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
}

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

.page-title {
  width: min(780px, 100%);
}

.category-page,
.category-index,
.rank-page {
  padding: 40px 0 76px;
}

.category-tools {
  margin-bottom: 26px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.category-tools input,
.category-tools select {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  outline: 0;
  color: var(--gray-700);
  background: var(--white);
}

.category-tools input {
  flex: 1;
  min-width: 220px;
}

.no-results {
  display: none;
  padding: 36px;
  border-radius: var(--radius-lg);
  text-align: center;
  background: var(--white);
  color: var(--gray-600);
  box-shadow: var(--shadow-sm);
}

.no-results.is-visible {
  display: block;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 88px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-row img {
  width: 88px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--sky-100);
}

.rank-number {
  font-weight: 900;
  color: var(--sky-600);
  font-size: 1.2rem;
  text-align: center;
}

.rank-row strong {
  display: block;
  margin-bottom: 4px;
}

.rank-row span {
  color: var(--gray-600);
  font-size: 0.9rem;
}

.heat {
  color: #ef4444;
  font-weight: 900;
}

.player-shell {
  background: #020617;
}

.player-wrap {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #000;
  outline: 0;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  cursor: pointer;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.16), rgba(2, 6, 23, 0.62));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-large {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  color: var(--sky-600);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(14, 165, 233, 0.3);
  font-size: 2rem;
}

.detail-inner {
  padding: 34px 0 78px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 28px;
}

.detail-card,
.related-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 800;
  font-size: 0.9rem;
}

.detail-meta span:first-child {
  color: var(--sky-700);
  background: var(--sky-100);
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-tags a,
.detail-tags span {
  color: var(--sky-700);
  background: var(--sky-50);
}

.content-block {
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.content-block + .content-block {
  margin-top: 24px;
}

.content-block h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.content-block p {
  margin: 0;
  color: var(--gray-700);
}

.related-card {
  position: sticky;
  top: 96px;
}

.related-card h2 {
  margin: 0 0 18px;
  font-size: 1.25rem;
}

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

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

.related-item img {
  width: 92px;
  height: 62px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--sky-100);
}

.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 4px;
  color: var(--gray-900);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-item span {
  color: var(--gray-500);
  font-size: 0.84rem;
}

.site-footer {
  border-top: 1px solid var(--gray-200);
  background: rgba(255, 255, 255, 0.84);
}

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

.footer-inner p {
  max-width: 420px;
  color: var(--gray-600);
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--gray-600);
  background: var(--gray-50);
}

.footer-links a:hover {
  color: var(--sky-600);
  background: var(--sky-50);
}

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

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

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

  .footer-links {
    justify-content: flex-start;
  }

  .related-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-block;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    bottom: 84px;
  }

  .hero-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .hero h1,
  .hero h2 {
    font-size: 2.45rem;
  }

  .hero-dots {
    right: 18px;
    bottom: 36px;
  }

  .search-box {
    border-radius: 22px;
    align-items: stretch;
    flex-direction: column;
  }

  .search-box input,
  .search-box .btn-primary {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .poster-link,
  .movie-grid.compact .poster-link {
    height: 220px;
  }

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

  .list-movie img,
  .rank-row img {
    width: 100%;
    height: 180px;
  }

  .rank-number {
    text-align: left;
  }

  .category-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .category-tools input,
  .category-tools select {
    width: 100%;
  }

  .detail-card,
  .related-card {
    padding: 20px;
  }

  .related-item {
    grid-template-columns: 82px 1fr;
  }
}

@media (max-width: 460px) {
  .header-inner,
  .footer-inner,
  .section-inner,
  .category-page,
  .detail-inner,
  .rank-page,
  .category-index {
    width: min(100% - 22px, 1180px);
  }

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

  .poster-link,
  .movie-grid.compact .poster-link {
    height: 300px;
  }
}

.filter-chips button.is-active {
  color: var(--white);
  background: var(--sky-500);
}
