:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --cyan: #06b6d4;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.58), #ffffff 26rem, #f9fafb 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 4.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-weight: 800;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.30);
  font-size: 0.95rem;
}

.brand-text {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  background: linear-gradient(90deg, var(--brand), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.45rem;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
}

.mobile-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 0.85rem;
  background: rgba(243, 244, 246, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
}

.mobile-toggle span {
  width: 1.2rem;
  height: 0.12rem;
  background: #374151;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0.5rem 1.25rem 1.25rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.mobile-nav-link {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  color: #374151;
  font-weight: 700;
}

.mobile-nav-link:hover {
  background: #eff6ff;
  color: var(--brand);
}

.main-home,
.page-main {
  padding-top: 4.8rem;
}

.hero {
  position: relative;
  min-height: min(86vh, 780px);
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(30, 64, 175, 0.52), rgba(2, 6, 23, 0.22)), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.05) 54%, rgba(2, 6, 23, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  min-height: min(86vh, 780px);
  padding: 5rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 23rem;
  gap: 3rem;
  align-items: center;
}

.hero-copy {
  max-width: 47rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.85rem;
  border: 1px solid rgba(147, 197, 253, 0.45);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  backdrop-filter: blur(14px);
  color: #bfdbfe;
  font-weight: 800;
  margin-bottom: 1.3rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}

.hero-desc {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.8;
  color: #dbeafe;
  max-width: 42rem;
  margin-bottom: 2rem;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  font-size: 0.85rem;
  color: #1d4ed8;
  background: #dbeafe;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-primary,
.btn-ghost,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-soft:hover {
  transform: translateY(-2px);
}

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

.btn-soft {
  color: var(--brand);
  background: #eff6ff;
}

.hero-panel {
  border-radius: 1.6rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.hero-panel h2 {
  font-size: 1.05rem;
  font-weight: 900;
  margin: 0 0 0.9rem;
}

.hero-pick {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.8rem;
  padding: 0.65rem;
  border-radius: 1.1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-pick:hover,
.hero-pick.is-active {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(3px);
}

.hero-pick img {
  height: 4.4rem;
  border-radius: 0.85rem;
  object-fit: cover;
}

.hero-pick strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.hero-pick span {
  color: #bfdbfe;
  font-size: 0.78rem;
}

.section,
.page-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.section-alt {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.85), rgba(236, 254, 255, 0.9));
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.section-head h2 {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.2;
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 0.5rem;
  color: var(--muted);
}

.section-more {
  color: var(--brand);
  font-weight: 900;
  white-space: nowrap;
}

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

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--card);
  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-cover {
  position: relative;
  height: 15.5rem;
  overflow: hidden;
  background: #0f172a;
}

.card-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.3s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.02) 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.card-badge,
.card-score,
.rank-num {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.card-badge {
  top: 0.8rem;
  left: 0.8rem;
  padding: 0.34rem 0.65rem;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  backdrop-filter: blur(10px);
}

.card-score {
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.34rem 0.65rem;
  color: #78350f;
  background: rgba(254, 243, 199, 0.95);
}

.rank-num {
  bottom: 0.8rem;
  left: 0.8rem;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.32);
}

.card-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  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: 1rem;
}

.card-body h3 {
  min-height: 2.8em;
  margin: 0 0 0.45rem;
  color: #111827;
  line-height: 1.38;
  font-size: 1.02rem;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  min-height: 3.2em;
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #64748b;
  font-size: 0.78rem;
}

.card-meta span {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 15rem 1fr;
}

.movie-card-horizontal .card-cover {
  height: 100%;
  min-height: 12rem;
}

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

.channel-card {
  position: relative;
  overflow: hidden;
  min-height: 12rem;
  border-radius: 1.3rem;
  padding: 1.3rem;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.channel-card::after {
  content: "";
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.channel-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  font-weight: 900;
}

.channel-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.ranking-list {
  display: grid;
  gap: 1rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 4rem 8rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 1.2rem;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-index {
  font-size: 1.4rem;
  font-weight: 900;
  color: #f97316;
  text-align: center;
}

.rank-row img {
  height: 5.3rem;
  border-radius: 0.8rem;
  object-fit: cover;
}

.rank-row h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  font-weight: 900;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-extra {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.page-hero {
  padding: 8rem 1.25rem 4rem;
  background: radial-gradient(circle at 22% 15%, rgba(255, 255, 255, 0.22), transparent 22rem), linear-gradient(135deg, #1d4ed8, #06b6d4);
  color: #ffffff;
  text-align: center;
}

.page-hero-inner {
  max-width: 880px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.page-hero p {
  margin: 0;
  color: #dbeafe;
  font-size: 1.1rem;
  line-height: 1.85;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 12rem);
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.6rem;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 0 1rem;
  color: #111827;
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.empty-state {
  display: none;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
  font-weight: 800;
}

.empty-state.is-visible {
  display: block;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1.6rem;
  align-items: start;
}

.player-card,
.detail-card,
.related-card {
  border-radius: 1.4rem;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.82)), linear-gradient(0deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.34));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play {
  width: 5.2rem;
  height: 5.2rem;
  border: 0;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  font-size: 1.55rem;
  padding-left: 0.25rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-play:hover {
  transform: scale(1.06);
  background: #ffffff;
}

.detail-card {
  padding: 1.45rem;
  margin-top: 1.4rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--brand);
  font-weight: 800;
}

.detail-title {
  margin: 0 0 0.9rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.3rem;
}

.detail-meta span {
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 800;
  font-size: 0.86rem;
}

.detail-card h2,
.related-card h2 {
  margin: 1.4rem 0 0.7rem;
  font-size: 1.35rem;
  font-weight: 900;
}

.detail-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.related-card {
  padding: 1rem;
  position: sticky;
  top: 6rem;
}

.related-card h2 {
  margin-top: 0;
}

.related-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.8rem;
  padding: 0.65rem;
  border-radius: 1rem;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: #f8fafc;
}

.related-item img {
  height: 4.4rem;
  border-radius: 0.8rem;
  object-fit: cover;
}

.related-item strong {
  display: block;
  line-height: 1.42;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.related-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 30rem;
}

.footer-grid h2 {
  font-size: 1rem;
  font-weight: 900;
  margin: 0 0 0.9rem;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  color: var(--muted);
  margin: 0.45rem 0;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: var(--brand);
}

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.2rem 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #64748b;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

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

  .mobile-toggle {
    display: flex;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 6rem;
  }

  .hero-panel {
    max-width: 38rem;
  }

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

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

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

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

  .related-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    height: 4.2rem;
    padding: 0 1rem;
  }

  .main-home,
  .page-main {
    padding-top: 4.2rem;
  }

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

  .hero-content {
    padding: 5rem 1rem 2.4rem;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .section,
  .page-section {
    padding: 3rem 1rem;
  }

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

  .movie-grid,
  .movie-grid.three,
  .movie-grid.two,
  .channel-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 3rem 6rem 1fr;
  }

  .rank-extra {
    grid-column: 2 / -1;
    align-items: flex-start;
  }

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

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

  .footer-bottom {
    flex-direction: column;
  }
}
