:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --blue-50: #eff6ff;
  --blue-600: #2563eb;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --text: #111827;
  --muted: #64748b;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 22px 44px rgba(15, 23, 42, 0.14);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(240, 249, 255, 0.92);
  border-bottom: 1px solid rgba(186, 230, 253, 0.9);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.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(--blue-600));
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.32);
}

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

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
  background: linear-gradient(90deg, var(--sky-600), var(--blue-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--slate-700);
  font-size: 15px;
  font-weight: 600;
}

.nav-links a {
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--slate-800);
  background: rgba(255, 255, 255, 0.68);
}

.mobile-menu {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid var(--sky-100);
  background: var(--white);
}

.mobile-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--slate-700);
  font-weight: 600;
}

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

.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s 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-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 70px;
  max-width: 760px;
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  margin-bottom: 16px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(14, 165, 233, 0.94);
  font-size: 14px;
  font-weight: 700;
}

.hero-kicker.light {
  color: var(--sky-700);
  background: rgba(224, 242, 254, 0.95);
}

.hero-content h1,
.page-hero h1,
.detail-head h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-head p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

.hero-meta span,
.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 600;
}

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

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

.primary-btn {
  color: var(--slate-900);
  background: var(--white);
}

.primary-btn:hover {
  color: var(--white);
  background: var(--sky-500);
  transform: translateY(-2px) scale(1.02);
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.34);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.3s ease, background 0.3s ease;
}

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

.home-search {
  padding: 42px 0 18px;
}

.search-intro {
  text-align: center;
  margin-bottom: 22px;
}

.search-intro h2 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 900;
}

.search-intro p {
  margin: 0;
  color: var(--muted);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.search-box,
.select-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--sky-100);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.search-box {
  width: min(560px, 100%);
}

.search-box input,
.select-box select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--slate-800);
  background: transparent;
}

.select-box {
  min-width: 172px;
}

.select-box span,
.search-box span {
  color: var(--sky-600);
  font-weight: 800;
}

.section-block {
  padding: 34px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
}

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

.section-line {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky-500), rgba(14, 165, 233, 0));
}

.section-more {
  color: var(--sky-600);
  font-weight: 800;
}

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

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

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

.card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-link:hover {
  border-color: var(--sky-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-100), var(--blue-50));
}

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

.card-link:hover .poster-wrap img {
  transform: scale(1.07);
}

.score-pill,
.rank-badge {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(14, 165, 233, 0.92);
  box-shadow: 0 8px 16px rgba(14, 165, 233, 0.24);
  font-size: 12px;
  font-weight: 900;
}

.score-pill {
  right: 10px;
  padding: 5px 9px;
}

.rank-badge {
  left: 10px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-body {
  flex: 1;
  padding: 16px;
}

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

.card-tags {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.card-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--sky-700);
  background: var(--sky-50);
  font-size: 12px;
  font-weight: 700;
}

.card-body h2 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.32;
  font-weight: 850;
}

.card-meta,
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.category-tile,
.category-overview-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--sky-100);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.96), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile {
  padding: 24px;
}

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

.category-tile span,
.category-overview-body h2 {
  display: block;
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: 21px;
  font-weight: 900;
}

.category-tile p,
.category-overview-body p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.category-tile strong,
.category-overview-body span {
  color: var(--sky-600);
  font-size: 14px;
  font-weight: 900;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 10px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.category-overview-body {
  padding: 0 20px 22px;
}

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

.rank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.rank-text {
  flex: 1;
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text strong {
  color: var(--slate-900);
  font-size: 16px;
}

.rank-text em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-row b {
  color: var(--sky-600);
  font-size: 18px;
}

.page-main {
  min-height: 60vh;
}

.page-hero.small {
  padding: 70px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.45), transparent 32%),
    linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.page-hero.small p {
  margin-bottom: 0;
}

.empty-note {
  margin: 26px 0 0;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.detail-main {
  background: linear-gradient(180deg, #ffffff, var(--slate-50));
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) scale(1.08);
  opacity: 0.65;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.46));
}

.detail-head {
  position: relative;
  z-index: 1;
  padding: 42px 0 56px;
  color: var(--white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 46px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

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

.detail-title-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 42px;
  align-items: end;
}

.detail-poster {
  width: 240px;
  aspect-ratio: 3 / 4;
  border: 6px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  margin-top: -80px;
  position: relative;
  z-index: 2;
}

.player-card,
.content-card,
.side-card {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.player-card {
  padding: 12px;
  margin-bottom: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(14, 165, 233, 0.92);
  box-shadow: 0 18px 46px rgba(14, 165, 233, 0.35);
  font-size: 42px;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.content-card,
.side-card {
  padding: 26px;
  margin-bottom: 24px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: var(--slate-900);
  font-size: 24px;
  font-weight: 900;
}

.rich-text p {
  margin: 0 0 14px;
  color: var(--slate-700);
  font-size: 16px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.info-list div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-200);
}

.info-list dt {
  color: var(--muted);
  font-weight: 700;
}

.info-list dd {
  margin: 0;
  color: var(--slate-800);
  font-weight: 800;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-block {
  padding-top: 54px;
}

.site-footer {
  margin-top: 60px;
  padding: 48px 0 22px;
  border-top: 1px solid var(--slate-200);
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
}

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

.site-footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 900;
}

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

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--slate-200);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

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

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

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

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

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

  .brand-text em {
    display: none;
  }

  .hero {
    height: 600px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 78px;
  }

  .hero-content p,
  .page-hero p,
  .detail-head p {
    font-size: 16px;
  }

  .hero-control {
    top: auto;
    bottom: 22px;
    transform: none;
  }

  .hero-control.prev {
    left: 22px;
  }

  .hero-control.next {
    right: 22px;
  }

  .hero-dots {
    bottom: 42px;
  }

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

  .section-line {
    width: 100%;
    flex: none;
  }

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

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

  .detail-layout {
    margin-top: -44px;
  }

  .detail-poster {
    width: 180px;
  }

  .detail-head {
    padding-bottom: 82px;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

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

  .brand-text strong,
  .footer-brand strong {
    font-size: 18px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-head h1 {
    font-size: 34px;
  }

  .hero-meta,
  .detail-meta {
    gap: 7px;
  }

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

  .movie-grid,
  .movie-grid.wide-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .home-search {
    padding-top: 28px;
  }

  .section-block {
    padding: 26px 0;
  }

  .rank-row img {
    width: 58px;
    height: 78px;
  }

  .detail-hero {
    min-height: 620px;
  }

  .detail-title-wrap {
    gap: 20px;
  }

  .detail-poster {
    width: 150px;
  }

  .content-card,
  .side-card {
    padding: 20px;
  }
}
