:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.14);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  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.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-400), var(--blue-600));
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.28);
}

.brand-name {
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--sky-600), var(--blue-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--gray-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--gray-900);
  border-radius: 20px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--gray-200);
  padding: 14px 24px 20px;
  background: var(--white);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav,
.mobile-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link,
.mobile-cats a {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--gray-50);
  color: var(--gray-700);
  font-weight: 650;
}

.mobile-cats {
  margin-top: 12px;
}

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

.hero-stage {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
}

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

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 72vh;
  min-height: 560px;
  margin: 0 auto;
  padding: 116px 24px 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sky-100);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 760px;
  margin: 22px 0 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.86);
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

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

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

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

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  box-shadow: 0 18px 35px rgba(14, 165, 233, 0.34);
}

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

.btn-soft {
  color: var(--sky-700, #0369a1);
  background: var(--white);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-rail {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 34px;
  z-index: 3;
  width: min(460px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.hero-mini {
  min-height: 74px;
  padding: 12px;
  border-radius: 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.hero-mini.is-active {
  background: rgba(14, 165, 233, 0.66);
}

.hero-mini span,
.hero-mini em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-mini span {
  font-weight: 800;
}

.hero-mini em {
  margin-top: 4px;
  font-size: 0.78rem;
  font-style: normal;
  opacity: 0.82;
}

.search-band {
  max-width: 1280px;
  margin: -48px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 4;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.search-panel h2,
.section-heading h2,
.category-overview-head h2,
.detail-section h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.search-panel p,
.section-heading p,
.category-overview-head p,
.page-hero p,
.detail-section p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--gray-500);
}

.search-form,
.search-toolbar {
  display: flex;
  gap: 10px;
}

.search-form input,
.search-toolbar input,
.search-toolbar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
}

.search-form input:focus,
.search-toolbar input:focus,
.search-toolbar select:focus {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.search-form button,
.search-toolbar button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: var(--white);
  font-weight: 800;
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.24);
}

.content-section,
.category-overview-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

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

.section-tint .section-heading,
.section-tint .movie-grid {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading,
.category-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--sky-600);
  background: var(--sky-50);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-100), #dbeafe);
}

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

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

.image-hidden {
  opacity: 0;
}

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

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(14, 165, 233, 0.86);
  backdrop-filter: blur(12px);
}

.poster-year {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
}

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

.movie-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.movie-card h3 a:hover,
.rank-body h3 a:hover,
.breadcrumb a:hover {
  color: var(--sky-600);
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.movie-meta a {
  color: var(--sky-600);
  font-weight: 750;
}

.movie-line {
  min-height: 3.2em;
  margin: 10px 0 14px;
  color: var(--gray-500);
  font-size: 0.94rem;
}

.movie-card-compact .movie-card-body {
  padding: 14px;
}

.movie-card-compact .movie-line {
  min-height: 2.9em;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 22px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease;
}

.category-card:hover .category-bg {
  transform: scale(1.05);
}

.category-card strong,
.category-card small {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 1.28rem;
  margin-bottom: 8px;
}

.category-card small {
  color: rgba(255, 255, 255, 0.84);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 88px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-num {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
}

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

.rank-body h3 {
  margin: 0;
}

.rank-body p,
.rank-body span {
  display: block;
  margin: 4px 0 0;
  color: var(--gray-500);
}

.page-main,
.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.page-hero {
  min-height: 330px;
  margin-bottom: 22px;
  padding: 52px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-700));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
}

.page-hero > div {
  max-width: 780px;
}

.small-hero {
  min-height: 260px;
}

.ranking-hero {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.95), transparent 36%), linear-gradient(135deg, #0f172a, var(--blue-700));
}

.category-overview-block {
  padding-top: 46px;
  padding-bottom: 46px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 22px;
  color: var(--gray-500);
  font-size: 0.94rem;
}

.breadcrumb a {
  color: var(--sky-600);
  font-weight: 750;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 330px) 1fr;
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--white), var(--sky-50));
  box-shadow: var(--shadow-card);
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--sky-100), #dbeafe);
  box-shadow: var(--shadow-soft);
}

.detail-info h1 {
  color: var(--gray-900);
}

.detail-info .eyebrow {
  color: var(--sky-600);
}

.detail-line {
  margin: 20px 0 0;
  max-width: 760px;
  font-size: 1.08rem;
  color: var(--gray-700);
}

.detail-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--gray-200);
}

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

.detail-actions .btn-ghost {
  color: var(--sky-600);
  background: var(--sky-50);
  border-color: var(--sky-100);
}

.player-section {
  margin-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #020617;
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.38), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  color: var(--sky-600);
  background: var(--white);
  box-shadow: 0 20px 42px rgba(2, 6, 23, 0.26);
  font-size: 1.8rem;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
}

.detail-section {
  margin-top: 34px;
  padding: 34px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-section p {
  font-size: 1.02rem;
  color: var(--gray-700);
}

.related-grid .movie-card {
  box-shadow: none;
  border: 1px solid var(--gray-200);
}

.search-page {
  padding-top: 34px;
}

.search-toolbar {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-toolbar select {
  max-width: 180px;
}

.hot-query-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hot-query-row a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--sky-600);
  background: var(--sky-50);
  font-size: 0.9rem;
  font-weight: 750;
}

.search-status {
  margin-bottom: 18px;
  color: var(--gray-500);
}

.site-footer {
  border-top: 1px solid var(--gray-200);
  background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 30px;
}

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

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

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

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

  .hero-rail {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }
}

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

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

  .header-inner {
    padding: 0 18px;
  }

  .hero-stage,
  .hero-content {
    min-height: 620px;
    height: auto;
  }

  .hero-content {
    padding: 96px 18px 96px;
  }

  .hero-actions,
  .detail-actions,
  .search-form,
  .search-toolbar,
  .section-heading,
  .category-overview-head {
    flex-direction: column;
    align-items: stretch;
  }

  .search-band {
    margin-top: -34px;
    padding: 0 18px;
  }

  .search-panel,
  .page-hero,
  .detail-hero,
  .detail-section {
    padding: 24px;
  }

  .content-section,
  .category-overview-block,
  .page-main,
  .detail-main {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .category-grid,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 42px 72px 1fr;
    gap: 12px;
  }

  .rank-num {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 0.86rem;
  }

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

  .movie-card h3 {
    font-size: 0.98rem;
  }

  .movie-line {
    font-size: 0.86rem;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .mobile-panel nav,
  .mobile-cats {
    grid-template-columns: 1fr;
  }
}
