:root {
  --bg: #f6f7fb;
  --paper: #ffffff;
  --paper-soft: rgba(255, 255, 255, 0.78);
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --accent: #ec4899;
  --gold: #f59e0b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(236, 72, 153, 0.12), transparent 30rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.brand-text {
  white-space: nowrap;
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: rgba(37, 99, 235, 0.09);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 6px 8px;
}

.header-search button,
.primary-btn,
.secondary-btn,
.play-btn,
.section-more {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-btn,
.play-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.26);
}

.header-search button {
  padding: 8px 14px;
}

.primary-btn,
.secondary-btn,
.play-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
}

.secondary-btn,
.section-more {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.header-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.play-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

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

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

.mobile-panel.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-link {
  padding: 11px 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
}

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

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 40px;
  position: relative;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 40px;
  padding: 76px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.56s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.46;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.28)),
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.46), transparent 28rem),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.32), transparent 24rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.hero .eyebrow {
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.12);
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(40px, 8vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-desc {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 28px;
  color: #e0f2fe;
  font-weight: 800;
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 40px;
  bottom: 30px;
  display: flex;
  gap: 10px;
}

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

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

.hero-quick {
  position: absolute;
  right: 34px;
  bottom: -24px;
  z-index: 5;
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(16px);
}

.hero-quick a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
}

.hero-quick a:hover {
  color: var(--brand);
  background: rgba(37, 99, 235, 0.09);
}

.content-section,
.page-hero,
.detail-layout,
.player-section,
.related-section,
.category-card,
.filter-panel {
  margin: 34px 0;
}

.page-hero {
  padding: 46px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 24rem);
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--line);
}

.page-hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

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

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.06em;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.36);
}

.card-body {
  padding: 16px;
}

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

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.card-body h3 a:hover {
  color: var(--brand);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  margin: 0;
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.category-card p {
  color: var(--muted);
  margin: 0 0 18px;
}

.mini-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.mini-strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.filter-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px 180px;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
  font-size: 13px;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  outline: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
}

.no-results {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.detail-poster {
  position: sticky;
  top: 96px;
  overflow: hidden;
  border-radius: 30px;
  background: #e2e8f0;
  box-shadow: var(--shadow);
}

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

.detail-info {
  padding: 34px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.detail-info h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-lead {
  color: var(--muted);
  font-size: 18px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
}

.text-block {
  margin-top: 26px;
}

.text-block h2 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.text-block p {
  margin: 0;
  color: #334155;
}

.player-section {
  overflow: hidden;
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.player-frame {
  position: relative;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.68)),
    radial-gradient(circle at center, rgba(37, 99, 235, 0.36), transparent 26rem);
  cursor: pointer;
}

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

.play-btn {
  min-width: 160px;
  min-height: 54px;
  font-size: 18px;
}

.player-caption {
  padding: 18px 22px 22px;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer {
  margin-top: 70px;
  padding: 44px 0 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
}

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

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

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

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

@media (max-width: 980px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-shell {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 34px;
  }

  .hero-poster {
    width: min(260px, 68vw);
    justify-self: center;
  }

  .hero-quick {
    position: static;
    margin: 12px auto 0;
    width: fit-content;
    flex-wrap: wrap;
    border-radius: 24px;
  }

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

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

  .detail-layout,
  .footer-inner,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    position: static;
    max-width: 360px;
  }
}

@media (max-width: 680px) {
  .header-inner,
  main,
  .hero,
  .footer-inner,
  .copyright,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

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

  .hero {
    margin-top: 18px;
  }

  .hero-shell {
    min-height: 680px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 24px;
  }

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

  .hero-controls {
    left: 24px;
    bottom: 20px;
  }

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

  .page-hero,
  .detail-info {
    padding: 24px;
    border-radius: 24px;
  }

  .detail-actions {
    display: grid;
  }
}

@media (max-width: 430px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

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