:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --blue-100: #dbeafe;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 22px 50px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-xl: 26px;
  --max-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-800);
  background: linear-gradient(180deg, var(--sky-50) 0%, var(--white) 42%, var(--gray-50) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  box-shadow: var(--shadow-md);
  font-size: 15px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.16;
}

.brand-text strong {
  color: var(--gray-800);
  font-size: 20px;
}

.brand-text small {
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 3px;
}

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

.nav-link,
.footer-links a {
  color: var(--gray-700);
  border-radius: 999px;
  padding: 9px 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.footer-links a:hover {
  color: var(--sky-700);
  background: var(--sky-50);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--sky-50);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 14px;
  flex-wrap: wrap;
}

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

.page-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.hero {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  background: var(--gray-900);
  margin-bottom: 48px;
}

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

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.80) 0%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 5vw, 56px);
  right: clamp(24px, 5vw, 56px);
  bottom: clamp(82px, 12vw, 118px);
  max-width: 760px;
  color: var(--white);
}

.hero-badge,
.card-type {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: var(--white);
  background: var(--sky-500);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 16px 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-one-line {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  padding: 5px 10px;
  font-size: 12px;
}

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

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

.primary-button {
  color: var(--sky-700);
  background: var(--white);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

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

.hero-dots {
  position: absolute;
  left: clamp(24px, 5vw, 56px);
  bottom: 42px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-dot {
  width: 30px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--white);
}

.hero-rail {
  position: absolute;
  right: 24px;
  bottom: 30px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: min(500px, 42vw);
}

.hero-rail-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: 112px;
  background: var(--gray-900);
  box-shadow: var(--shadow-md);
}

.hero-rail-card img {
  height: 112px;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.hero-rail-card:hover img {
  transform: scale(1.08);
  opacity: 1;
}

.hero-rail-card span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.content-section,
.page-hero,
.detail-article,
.player-section {
  margin-bottom: 48px;
}

.page-hero,
.content-section,
.detail-article,
.player-section,
.category-overview-card {
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.content-section,
.detail-article,
.player-section,
.category-overview-card {
  padding: 28px;
}

.highlight-section {
  background: linear-gradient(120deg, var(--sky-100), var(--blue-100));
  box-shadow: var(--shadow-md);
}

.page-hero {
  padding: 44px;
  background: linear-gradient(135deg, var(--sky-600), var(--sky-700));
  color: var(--white);
}

.small-hero h1 {
  margin-top: 0;
}

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

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(24px, 3vw, 34px);
}

.section-head h2 span {
  width: 5px;
  height: 32px;
  border-radius: 999px;
  background: var(--sky-600);
}

.section-head p {
  margin: 9px 0 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: var(--sky-700);
  font-weight: 800;
}

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

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

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

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-100);
}

.compact .card-cover {
  aspect-ratio: 16 / 11;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.56) 0%, rgba(0, 0, 0, 0.04) 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-type {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 12px;
  padding: 4px 10px;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-700);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--gray-800);
  font-size: 17px;
  line-height: 1.42;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body h3 a:hover {
  color: var(--sky-700);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--gray-500);
  font-size: 13px;
  margin-bottom: 12px;
}

.tag-row span {
  color: var(--sky-700);
  background: var(--sky-50);
}

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

.category-card,
.category-overview-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-head:hover {
  transform: translateY(-3px);
  border-color: var(--sky-100);
  box-shadow: var(--shadow-md);
}

.category-card strong,
.category-overview-head strong {
  color: var(--gray-800);
  font-size: 18px;
}

.category-card span,
.category-overview-head span {
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.55;
}

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

.category-overview-card {
  display: grid;
  gap: 18px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 700;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  color: var(--gray-800);
  padding: 0 14px;
  outline: none;
}

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

.empty-state {
  padding: 32px;
  color: var(--gray-600);
  text-align: center;
  border-radius: 18px;
  background: var(--gray-50);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 66px 82px minmax(0, 1fr) 90px;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rank-index {
  color: var(--sky-700);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 3 / 4;
  background: var(--gray-100);
}

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

.rank-info h3 {
  margin: 0 0 8px;
  color: var(--gray-800);
  font-size: 18px;
}

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

.rank-action {
  color: var(--white);
  background: var(--sky-600);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
  margin-bottom: 42px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-900), var(--sky-700));
  color: var(--white);
  box-shadow: var(--shadow-xl);
}

.detail-poster {
  min-height: 520px;
  background: var(--gray-900);
}

.detail-poster img {
  height: 100%;
  object-fit: cover;
}

.detail-copy {
  padding: 46px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.detail-meta span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-xl);
}

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

.video-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
}

.video-cover.is-hidden {
  display: none;
}

.video-play-icon {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-700);
  background: rgba(255, 255, 255, 0.94);
  font-size: 30px;
  box-shadow: var(--shadow-xl);
}

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

.detail-article {
  color: var(--gray-700);
}

.detail-article h2 {
  margin: 0 0 12px;
  color: var(--gray-800);
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 24px;
  line-height: 1.9;
  font-size: 17px;
}

.site-footer {
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 34px 24px;
  color: var(--gray-600);
}

.footer-inner p {
  max-width: 820px;
  line-height: 1.8;
}

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

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

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

  .hero-rail {
    display: none;
  }
}

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

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

  .page-shell {
    padding: 24px 16px 42px;
  }

  .hero {
    min-height: 560px;
    border-radius: 22px;
  }

  .hero-content {
    bottom: 86px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .filter-bar,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

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

  .content-section,
  .detail-article,
  .player-section,
  .page-hero {
    padding: 22px;
  }

  .detail-poster {
    min-height: auto;
  }

  .detail-poster img {
    aspect-ratio: 3 / 4;
  }

  .detail-copy {
    padding: 28px 22px 32px;
  }

  .rank-row {
    grid-template-columns: 48px 70px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 2 / 4;
    width: max-content;
  }
}

@media (max-width: 520px) {
  .header-inner {
    padding: 12px 16px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

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

  .hero p,
  .page-hero p,
  .detail-one-line {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .rank-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-poster {
    display: none;
  }

  .rank-action {
    grid-column: 1 / 3;
  }
}
