:root {
  --bg: #07111f;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --card: #ffffff;
  --text: #e5efff;
  --muted: #94a3b8;
  --ink: #0f172a;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --red: #ef4444;
  --ring: rgba(34, 211, 238, 0.35);
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(59, 130, 246, 0.26), transparent 24rem),
    radial-gradient(circle at 92% 0%, rgba(34, 211, 238, 0.2), transparent 24rem),
    #f8fafc;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #0f172a, #1e3a8a 48%, #0f172a);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.28);
}

.nav-shell {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.3);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #bfdbfe, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 15px;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: #67e8f9;
}

.nav-search {
  display: flex;
  align-items: center;
  width: min(280px, 26vw);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.nav-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  font: inherit;
}

.nav-search input {
  min-width: 0;
  padding: 10px 14px;
  color: #fff;
  background: transparent;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.nav-search button,
.hero-search button,
.filter-bar button {
  border: 0;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue), #0891b2);
}

.nav-search button {
  align-self: stretch;
  padding: 0 15px;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  flex-direction: column;
  gap: 12px;
  background: rgba(15, 23, 42, 0.98);
}

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

.hero {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(340px, 0.72fr);
  gap: 24px;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.85s ease;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #172554, #0f172a);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.66) 46%, rgba(15, 23, 42, 0.2)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 52%);
}

.hero-copy {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(32px, 7vw, 82px);
  max-width: 680px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(147, 197, 253, 0.26);
}

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-action:hover,
.movie-card:hover,
.category-tile:hover,
.category-card:hover {
  transform: translateY(-3px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 64px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 42px;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
}

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

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

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: 24px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 56px;
  background: #22d3ee;
}

.hero-side-card {
  min-height: 620px;
  padding: 32px;
  border-radius: 34px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.88)),
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.3), transparent 18rem);
  box-shadow: var(--shadow);
}

.hero-side-card h2 {
  margin: 0 0 16px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-side-card p {
  color: #dbeafe;
  line-height: 1.8;
}

.hero-search {
  display: flex;
  margin: 24px 0;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(2, 8, 23, 0.18);
}

.hero-search input {
  padding: 15px 16px;
}

.hero-search button {
  padding: 0 20px;
}

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

.hero-thumb {
  position: relative;
  min-height: 136px;
  overflow: hidden;
  border-radius: 18px;
  background: #172554;
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
}

.hero-thumb span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

.content-section,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 0;
}

.intro-section {
  max-width: 960px;
  text-align: center;
}

.intro-section h2,
.section-head h2,
.detail-content h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.16;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.intro-section p {
  color: #475569;
  font-size: 18px;
  line-height: 1.9;
}

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

.section-action {
  color: #1d4ed8;
  background: #dbeafe;
}

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

.category-tile,
.category-card {
  display: block;
  min-height: 164px;
  padding: 24px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile span,
.category-card h2 {
  display: block;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
}

.category-tile p,
.category-card p,
.card-body p,
.detail-content p {
  color: #64748b;
  line-height: 1.72;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}

.category-posters img {
  height: 92px;
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  background: #172554;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 24px 58px rgba(37, 99, 235, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #172554, #0f172a);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 55%);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(37, 99, 235, 0.9);
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(239, 68, 68, 0.92);
}

.card-body {
  padding: 17px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.meta-line a {
  color: #2563eb;
}

.card-body h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 950;
}

.card-body p {
  min-height: 72px;
  margin: 0 0 12px;
  font-size: 14px;
}

.card-body .tag-row span {
  color: #1e40af;
  background: #eff6ff;
  border-color: #dbeafe;
  font-size: 12px;
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 148px 1fr;
}

.movie-card-wide .poster-wrap {
  aspect-ratio: auto;
  min-height: 220px;
}

.movie-card-wide .card-body {
  padding: 22px;
}

.page-hero,
.detail-hero {
  border-radius: 34px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.9)),
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.32), transparent 22rem);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(34px, 6vw, 72px);
}

.filter-bar {
  position: sticky;
  top: 84px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.filter-bar input,
.filter-bar select {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  color: #0f172a;
  background: #f8fafc;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 22px;
  color: #475569;
  font-size: 14px;
}

.breadcrumb a {
  color: #2563eb;
  font-weight: 800;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  padding: clamp(24px, 5vw, 56px);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #172554;
  box-shadow: 0 30px 80px rgba(2, 8, 23, 0.34);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-tags {
  margin-bottom: 16px;
}

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

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: 0 30px 80px rgba(2, 8, 23, 0.28);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #2563eb;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.08));
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #2563eb;
  font-size: 36px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 54px rgba(2, 8, 23, 0.35);
}

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

.detail-content {
  max-width: 980px;
}

.detail-content h2 {
  margin-top: 28px;
  margin-bottom: 12px;
}

.detail-content p {
  color: #334155;
  font-size: 18px;
}

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

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-shell p {
  max-width: 620px;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
  white-space: nowrap;
}

[data-filter-card].is-hidden {
  display: none;
}

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

  .nav-search {
    margin-left: auto;
  }

  .mobile-toggle {
    display: block;
  }

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

  .hero-side-card,
  .hero-stage {
    min-height: 520px;
  }

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

@media (max-width: 900px) {
  .nav-shell {
    padding: 0 16px;
  }

  .nav-search {
    display: none;
  }

  .hero,
  .content-section,
  .page-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-stage,
  .hero-side-card {
    min-height: 500px;
    border-radius: 26px;
  }

  .hero-copy {
    left: 22px;
    right: 22px;
    bottom: 54px;
  }

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

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

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

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

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

  .filter-bar {
    grid-template-columns: 1fr;
    position: static;
  }

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

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 18px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 32px;
  }

  .hero-stage,
  .hero-side-card {
    min-height: 460px;
  }

  .hero-control {
    display: none;
  }

  .hero-thumb-grid,
  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .library-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-card-wide .poster-wrap {
    min-height: auto;
    aspect-ratio: 2 / 3;
  }

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