:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --text: #172033;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.1);
  --sky: #38bdf8;
  --blue: #2563eb;
  --deep: #0f172a;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 38%, #edf4ff 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: #fff;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

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

.brand-text strong {
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  justify-content: center;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 12px;
  color: #334155;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--blue);
  background: rgba(56, 189, 248, 0.12);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search-card input,
.filter-field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
  padding: 10px 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search-card input:focus,
.filter-field input:focus {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.header-search button,
.mobile-search button,
.hero-search-card button,
.filter-clear,
.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.hero-search-card button,
.btn-primary {
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search-card button:hover,
.btn:hover,
.filter-clear:hover {
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 9px;
}

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

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.hero {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: stretch;
}

.hero-frame {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 36px;
  background: var(--deep);
  box-shadow: var(--shadow);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.1) contrast(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 20%, rgba(56, 189, 248, 0.32), transparent 20rem),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(660px, 92%);
  min-height: 620px;
  padding: 72px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero-content .eyebrow {
  color: #bae6fd;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5.3rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content h2 {
  margin-top: 14px;
  font-size: clamp(1.7rem, 3vw, 3rem);
}

.hero-content p {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
}

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

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

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  left: 58px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 32px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fff;
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.hero-search-card,
.ranking-panel,
.category-card,
.category-overview,
.movie-card,
.detail-section,
.detail-hero,
.video-player,
.filter-bar {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.hero-search-card {
  padding: 24px;
}

.hero-search-card strong {
  display: block;
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.hero-search-card form {
  display: grid;
  gap: 12px;
}

.hero-rail {
  display: grid;
  gap: 14px;
}

.hero-mini {
  position: relative;
  min-height: 96px;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.hero-mini img {
  width: 100%;
  height: 116px;
  object-fit: cover;
}

.hero-mini::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.12));
}

.hero-mini span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  font-weight: 800;
}

.section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.section-tight {
  padding-top: 36px;
}

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

.section-heading h2,
.ranking-panel h2,
.detail-section h2,
.page-hero h1 {
  margin: 0;
  color: var(--deep);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

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

.category-card,
.category-overview {
  padding: 22px;
  min-height: 154px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-card:hover,
.category-overview:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 24px 54px rgba(37, 99, 235, 0.15);
}

.category-card span,
.category-overview strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--deep);
}

.category-card p,
.category-overview p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.category-overview span {
  display: inline-flex;
  margin-top: 18px;
  color: var(--blue);
  font-weight: 800;
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 18px 18px;
  background: #dbeafe;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease, filter 0.42s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  min-width: 38px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-card h3 {
  margin: 8px 0 8px;
  color: var(--deep);
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-tags,
.detail-badges,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge,
.detail-tag,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #075985;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.ranking-panel {
  padding: 24px;
}

.sticky-panel {
  position: sticky;
  top: 96px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--panel-soft);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(56, 189, 248, 0.14);
  transform: translateX(4px);
}

.rank-row span {
  color: var(--blue);
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.85rem;
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
}

.filter-bar.is-large {
  padding: 22px;
}

.filter-field {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.86rem;
}

.filter-clear {
  background: var(--panel-soft);
  color: var(--blue);
}

.hidden-by-filter {
  display: none !important;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 58px;
  border-radius: 36px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.86));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.compact-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.category-pill.is-active {
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: #fff;
}

.breadcrumb {
  width: min(1240px, calc(100% - 32px));
  margin: 26px auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 800;
}

.detail-page {
  width: min(1240px, calc(100% - 32px));
  margin: 18px auto 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: center;
  padding: 42px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 28rem),
    rgba(255, 255, 255, 0.92);
}

.detail-copy p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.detail-poster-wrap {
  position: relative;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.watch-section {
  margin-top: 26px;
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.78));
  color: #fff;
  cursor: pointer;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 22px 46px rgba(37, 99, 235, 0.38);
  font-size: 2rem;
}

.play-layer strong {
  font-size: 1.2rem;
}

.detail-section {
  margin-top: 26px;
  padding: 30px;
}

.detail-section p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 1.02rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.detail-facts dl {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.detail-facts dl div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.detail-facts dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-facts dd {
  margin: 0;
  color: var(--deep);
}

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

.site-footer {
  margin-top: 60px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  gap: 22px;
}

.footer-brand strong {
  color: #fff;
  font-size: 1.35rem;
}

.footer-brand p {
  max-width: 680px;
  margin: 10px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

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

.footer-copy {
  margin: 0;
  color: #94a3b8;
  font-size: 0.92rem;
}

@media (max-width: 1120px) {
  .header-search {
    display: none;
  }

  .hero,
  .layout-two,
  .detail-hero,
  .split-section {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-poster-wrap {
    max-width: 320px;
  }
}

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

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

  .hero-content {
    padding: 42px 28px 78px;
  }

  .hero-dots {
    left: 28px;
  }

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

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

  .page-hero,
  .detail-hero,
  .detail-section {
    padding: 28px;
  }
}

@media (max-width: 540px) {
  .brand-text em {
    display: none;
  }

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

  .hero-content h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.3rem;
  }

  .hero-rail,
  .category-grid,
  .overview-grid,
  .movie-grid,
  .all-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 38px 0;
  }

  .page-hero {
    margin-top: 18px;
  }

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

  .rank-row em {
    display: none;
  }
}
