* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #1f2937;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 42%, #f9fafb 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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: 50;
  border-bottom: 1px solid #bae6fd;
  background: linear-gradient(90deg, rgba(240, 249, 255, 0.96), rgba(239, 246, 255, 0.96));
  box-shadow: 0 10px 30px rgba(14, 116, 144, 0.08);
  backdrop-filter: blur(14px);
}

.site-nav,
.container,
.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-nav {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
  font-size: 14px;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  color: #1f2937;
  font-size: 20px;
}

.brand-copy small {
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
}

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

.nav-link {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #0284c7;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #e0f2fe;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #374151;
}

.page {
  min-height: 64vh;
}

.container {
  padding: 32px 0 16px;
}

.hero {
  position: relative;
  height: 500px;
  margin-bottom: 48px;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.38) 48%, rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: absolute;
  right: min(45%, 520px);
  bottom: 0;
  left: 0;
  padding: 48px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: #0ea5e9;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 20px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.75;
}

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

.hero-tags span,
.detail-meta span,
.tag-block span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  padding: 6px 12px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

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

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

.primary-button {
  color: #0284c7;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.18);
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.hero-thumbs {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(390px, 36%);
  gap: 10px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.52);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-thumb img {
  width: 76px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.hero-thumb span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 700;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(14, 165, 233, 0.7);
}

.search-section,
.filter-panel,
.detail-card,
.related-sticky,
.category-card,
.rank-row,
.feature-panel,
.page-hero {
  border: 1px solid rgba(186, 230, 253, 0.8);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.search-section {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 56px;
  padding: 28px;
  border-radius: 24px;
}

.search-section h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 26px;
}

.search-section p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  outline: 0;
  padding: 0 14px;
  color: #1f2937;
  background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.content-section {
  margin-bottom: 64px;
}

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

.section-heading h2 {
  display: flex;
  align-items: center;
  margin: 0;
  color: #1f2937;
  font-size: clamp(24px, 3vw, 34px);
}

.section-heading h2 span {
  width: 5px;
  height: 34px;
  margin-right: 12px;
  border-radius: 999px;
  background: #0284c7;
}

.section-more {
  color: #0284c7;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.card-link {
  display: block;
  height: 100%;
}

.card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
}

.card-large .card-media {
  aspect-ratio: 16 / 9;
}

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

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

.card-media::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.08));
  transition: opacity 0.25s ease;
}

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

.play-chip {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 0 0 10px;
  overflow: hidden;
  color: #1f2937;
  font-size: 17px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body h3 {
  color: #0284c7;
}

.card-body p {
  display: -webkit-box;
  min-height: 3.4em;
  margin: 0 0 14px;
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.card-meta span:last-child {
  padding: 5px 8px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-weight: 800;
}

.feature-panel {
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(90deg, #e0f2fe, #dbeafe);
}

.page-hero {
  margin-bottom: 34px;
  padding: 34px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #2563eb);
}

.page-hero p {
  color: #e0f2fe;
}

.compact-actions {
  margin-top: 18px;
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
}

.category-card a {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  height: 100%;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  min-height: 210px;
  padding: 10px;
  background: #e0f2fe;
}

.category-covers img {
  width: 100%;
  height: 100%;
  min-height: 92px;
  border-radius: 12px;
  object-fit: cover;
}

.category-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
}

.category-content h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 26px;
}

.category-content p {
  margin: 0 0 20px;
  color: #64748b;
  line-height: 1.75;
}

.category-content span {
  color: #0284c7;
  font-weight: 900;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin-bottom: 64px;
}

.rank-row {
  overflow: hidden;
  border-radius: 18px;
}

.rank-row a {
  display: grid;
  grid-template-columns: 64px 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
}

.rank-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  font-weight: 900;
}

.rank-row img {
  width: 120px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info strong,
.rank-info small {
  display: block;
}

.rank-info strong {
  color: #1f2937;
  font-size: 17px;
}

.rank-info small {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: #64748b;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta {
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0284c7;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.movie-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.28);
}

.player-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-button {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.38), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-button span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 999px;
  color: #0284c7;
  background: #ffffff;
  font-size: 24px;
  box-shadow: 0 18px 42px rgba(255, 255, 255, 0.22);
}

.player-button strong {
  font-size: 18px;
}

.movie-player.is-playing .player-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-card,
.related-sticky {
  margin-top: 24px;
  border-radius: 20px;
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 18px;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e5e7eb;
}

.detail-meta span,
.tag-block span {
  padding: 7px 12px;
  color: #0369a1;
  background: #e0f2fe;
}

.summary-block {
  margin-bottom: 26px;
}

.summary-block h2,
.tag-block h2,
.related-sticky h2 {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 19px;
}

.summary-block p {
  margin: 0;
  color: #4b5563;
  line-height: 1.86;
  white-space: pre-line;
}

.strong-summary p {
  color: #374151;
  font-weight: 700;
}

.review-block {
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(90deg, #f0f9ff, #eff6ff);
}

.tag-block div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-sticky {
  position: sticky;
  top: 92px;
}

.related-list {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 6px;
}

.related-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.11);
}

.related-item img {
  width: 132px;
  height: 84px;
  object-fit: cover;
}

.related-item span {
  min-width: 0;
  padding-right: 12px;
}

.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #1f2937;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-item small {
  display: block;
  margin-top: 5px;
  color: #64748b;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

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

.footer-brand p {
  max-width: 650px;
  margin: 18px 0 0;
  color: #64748b;
  line-height: 1.8;
}

.footer-column h2 {
  margin: 0 0 14px;
  color: #1f2937;
  font-size: 16px;
}

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

.footer-links a {
  color: #64748b;
  font-weight: 600;
}

.footer-links a:hover {
  color: #0284c7;
}

[hidden],
.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .hero-content {
    right: 0;
    padding: 36px;
  }

  .hero-thumbs {
    display: none;
  }

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

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

  .related-sticky {
    position: static;
  }
}

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

  .nav-links {
    position: absolute;
    right: 16px;
    left: 16px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid #bae6fd;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  }

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

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

  .nav-link:hover,
  .nav-link.is-active {
    background: #e0f2fe;
  }

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

  .hero-content {
    padding: 26px;
  }

  .hero p {
    font-size: 16px;
  }

  .filter-panel,
  .category-overview,
  .category-card a,
  .rank-row a {
    grid-template-columns: 1fr;
  }

  .rank-row a {
    gap: 12px;
  }

  .rank-meta {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .site-nav,
  .container,
  .footer-inner {
    width: min(100% - 20px, 1280px);
  }

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

  .brand-copy small {
    display: none;
  }

  .movie-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .search-section,
  .feature-panel,
  .page-hero,
  .detail-card,
  .related-sticky {
    padding: 20px;
    border-radius: 18px;
  }

  .hero {
    height: 520px;
    margin-bottom: 34px;
  }

  .hero-content {
    padding: 22px;
  }

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

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

  .related-item {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .related-item img {
    width: 110px;
    height: 74px;
  }
}
