:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --sky-700: #0369a1;
  --sky-600: #0284c7;
  --sky-500: #0ea5e9;
  --sky-100: #e0f2fe;
  --amber-500: #f59e0b;
  --white: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.35);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand-text small {
  color: #7dd3fc;
  font-size: 12px;
  margin-top: 3px;
}

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

.nav-link,
.mobile-link {
  border-radius: 10px;
  color: #e2e8f0;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 15px;
}

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

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  padding: 8px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-menu.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 11px 14px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

.hero-image,
.hero-image img,
.detail-bg,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image img,
.detail-bg img {
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.12));
}

.hero-content {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 690px;
  color: var(--white);
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-kicker span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-one-line {
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.inline-list span {
  display: inline-flex;
  color: var(--sky-700);
  background: var(--sky-100);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

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

.btn.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.33);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}

.hero-dots,
.hero-switch,
.scroll-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

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

.hero-switch button,
.scroll-buttons button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.2);
}

.section {
  padding: 72px 0;
}

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

.section-soft {
  background: linear-gradient(135deg, #f8fafc, #e0f2fe);
}

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

.section-head.compact {
  margin-bottom: 18px;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--sky-600);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section h2,
.section-head h2,
.recommend-panel h2,
.story-card h2,
.info-card h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

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

.horizontal-row {
  display: grid;
  grid-auto-columns: minmax(270px, 320px);
  grid-auto-flow: column;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 4px 24px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.horizontal-row::-webkit-scrollbar {
  display: none;
}

.card-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.featured-grid .movie-card-large {
  grid-column: span 2;
  grid-row: span 2;
}

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  height: 230px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.movie-card-large .poster-link {
  height: 420px;
}

.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-link::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.78));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 4px 10px;
  color: var(--white);
  background: rgba(14, 165, 233, 0.88);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--white);
  background: rgba(14, 165, 233, 0.88);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: var(--slate-900);
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #475569;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.category-pills a {
  padding: 10px 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.22);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr);
  gap: 34px;
  align-items: start;
}

.recommend-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(16px);
}

.recommend-list {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.recommend-list .movie-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
}

.recommend-list .poster-link {
  height: 100%;
  min-height: 150px;
}

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

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

.rank-list.short {
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 78px 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}

.rank-cover {
  display: block;
  width: 78px;
  height: 92px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--slate-800);
}

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

.rank-number {
  color: var(--sky-600);
  font-size: 24px;
  font-weight: 900;
}

.rank-body h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-body p {
  display: -webkit-box;
  margin: 0 0 7px;
  overflow: hidden;
  color: #475569;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.rank-action {
  padding: 8px 14px;
  color: var(--white);
  background: var(--sky-600);
  border-radius: 999px;
  font-weight: 800;
}

.page-hero {
  position: relative;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.35), transparent 32%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.compact-hero {
  padding: 68px 0 78px;
}

.page-hero h1 {
  max-width: 800px;
  margin: 12px 0 12px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
}

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

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

.breadcrumb.light,
.breadcrumb.light a {
  color: #bae6fd;
}

.breadcrumb span::before,
.breadcrumb a + span::before,
.breadcrumb a + a::before {
  content: "/";
  margin-right: 9px;
  color: rgba(148, 163, 184, 0.8);
}

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

.category-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--slate-900);
  box-shadow: var(--shadow);
}

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

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

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.32));
}

.category-content {
  position: absolute;
  inset: auto 24px 24px 24px;
  color: var(--white);
}

.category-content strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

.category-content em {
  display: block;
  max-width: 680px;
  color: #e2e8f0;
  font-style: normal;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.filter-bar.wide {
  align-items: stretch;
}

.search-box {
  display: grid;
  gap: 7px;
  min-width: 260px;
  color: var(--slate-700);
  font-weight: 800;
}

.search-box.grow {
  flex: 1 1 420px;
}

.search-box input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
  color: var(--slate-900);
  background: var(--white);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
}

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

.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none;
}

.detail-top {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  background: var(--slate-950);
}

.detail-bg {
  filter: blur(8px) saturate(1.1);
  transform: scale(1.03);
}

.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.5));
}

.detail-wrap {
  position: relative;
  z-index: 1;
  padding: 42px 0 58px;
}

.detail-main {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-top: 28px;
  color: var(--white);
}

.detail-poster {
  width: 100%;
  max-height: 455px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 14px 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 790px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.24), rgba(2, 6, 23, 0.78)), rgba(2, 6, 23, 0.6);
  border: 0;
  cursor: pointer;
}

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

.player-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  border-radius: 999px;
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.42);
  font-size: 34px;
}

.player-title {
  max-width: 80%;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 900;
  text-align: center;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.story-card,
.info-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.story-card p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.88;
}

.info-card {
  grid-row: span 2;
}

.info-card dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 18px 0 0;
}

.info-card dt {
  color: var(--muted);
  font-weight: 900;
}

.info-card dd {
  margin: 0;
  color: var(--slate-900);
}

.info-card a {
  color: var(--sky-700);
  font-weight: 900;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 34px;
  padding: 54px 0 38px;
}

.footer-brand {
  color: var(--white);
  margin-bottom: 16px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

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

.footer-links a:hover {
  color: #7dd3fc;
}

.footer-bottom {
  padding: 20px 16px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

@media (max-width: 1060px) {
  .card-grid.four,
  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured-grid .movie-card-large {
    grid-column: span 2;
  }

  .split-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .recommend-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 540px;
  }

  .hero-controls {
    bottom: 22px;
  }

  .hero-switch {
    display: none;
  }

  .card-grid.four,
  .card-grid.three,
  .featured-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-grid .movie-card-large {
    grid-column: span 2;
    grid-row: span 1;
  }

  .detail-main {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 330px;
  }

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

  .rank-action {
    grid-column: 3;
    justify-self: start;
  }
}

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

  .section {
    padding: 52px 0;
  }

  .header-inner {
    min-height: 62px;
  }

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

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

  .hero,
  .hero-content {
    min-height: 520px;
  }

  .hero h1 {
    font-size: 40px;
  }

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

  .hero-actions,
  .section-head,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .card-grid.four,
  .card-grid.three,
  .featured-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .featured-grid .movie-card-large {
    grid-column: span 1;
  }

  .movie-card-large .poster-link,
  .poster-link {
    height: 250px;
  }

  .recommend-list .movie-card {
    grid-template-columns: 1fr;
  }

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

  .rank-number {
    position: absolute;
    margin: 6px 0 0 6px;
    padding: 2px 6px;
    color: var(--white);
    background: rgba(14, 165, 233, 0.9);
    border-radius: 999px;
    font-size: 14px;
  }

  .rank-body,
  .rank-action {
    grid-column: 2;
  }

  .rank-cover {
    width: 64px;
    height: 82px;
  }

  .detail-wrap {
    padding-top: 28px;
  }

  .player-shell {
    border-radius: 16px;
  }

  .player-icon {
    width: 66px;
    height: 66px;
    font-size: 27px;
  }
}
