:root {
  --blue: #2563eb;
  --cyan: #0891b2;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 52%, #ecfeff 100%);
  min-height: 100vh;
}

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

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

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

.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

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

.brand-text strong {
  display: block;
  line-height: 1.05;
  font-size: 20px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.section-more,
.filter-button,
.form-control,
.play-button,
.pager-link,
.hero-button,
.hero-ghost {
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  color: #374151;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  background: #eff6ff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 20px 18px;
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: #374151;
  font-weight: 700;
}

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

.main-wrap,
.detail-wrap,
.category-wrap,
.search-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 0;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 0 0 42px 42px;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #0891b2 100%);
  color: #fff;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.25;
}

.hero::before {
  width: 380px;
  height: 380px;
  right: 8%;
  top: -120px;
  background: #67e8f9;
}

.hero::after {
  width: 300px;
  height: 300px;
  left: 4%;
  bottom: -120px;
  background: #60a5fa;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 20px 58px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: 48px;
}

.hero-slide.active {
  display: grid;
}

.hero-copy {
  max-width: 720px;
}

.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #dff8ff;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.83);
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.movie-tag,
.detail-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.hero-button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 16px 36px rgba(8, 145, 178, 0.28);
  border: 0;
  font-weight: 800;
}

.hero-button:hover,
.play-button:hover,
.section-more:hover,
.pager-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.20);
}

.hero-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.30);
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  font-weight: 800;
}

.hero-art {
  position: relative;
}

.hero-poster {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06));
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster img,
.movie-poster img,
.compact-poster img,
.detail-cover img,
.player-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster::after,
.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.hero-card {
  position: absolute;
  left: -26px;
  bottom: 34px;
  max-width: 310px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  box-shadow: var(--shadow);
}

.hero-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.hero-card span {
  color: var(--muted);
  font-size: 13px;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 36px;
}

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

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

.quick-cats {
  max-width: 1240px;
  margin: -42px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.quick-cat {
  display: block;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.86);
}

.quick-cat strong {
  display: block;
  color: #0f172a;
  margin-bottom: 8px;
}

.quick-cat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.content-section {
  max-width: 1240px;
  margin: 46px auto 0;
  padding: 0 20px;
}

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

.section-kicker {
  display: inline-block;
  width: 8px;
  height: 32px;
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
}

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-more,
.pager-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  color: var(--blue);
  background: #eff6ff;
  font-weight: 800;
}

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

.movie-card,
.compact-card,
.category-tile,
.info-panel,
.detail-main,
.related-panel,
.search-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.13);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ecfeff);
}

.movie-region {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.movie-meta-line {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.movie-play-dot {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 56px;
  height: 56px;
  margin: auto;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .movie-play-dot {
  opacity: 1;
  transform: scale(1);
}

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

.movie-card-body h3,
.compact-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.movie-card-body h3 a:hover,
.compact-card h3 a:hover {
  color: var(--blue);
}

.movie-card-body p {
  min-height: 44px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.movie-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

.movie-card-foot a {
  color: var(--blue);
  font-weight: 800;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
}

.compact-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #dbeafe, #ecfeff);
}

.rank-num {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  font-size: 12px;
  font-weight: 900;
}

.compact-card p {
  margin: 6px 0;
  color: #64748b;
  font-size: 13px;
}

.compact-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.page-title {
  margin-bottom: 26px;
  padding: 34px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #2563eb 60%, #0891b2);
  box-shadow: var(--shadow);
}

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

.category-tile {
  padding: 22px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-tile h2 {
  margin: 0;
  font-size: 21px;
}

.category-tile p {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tool-bar,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.form-control {
  min-height: 46px;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 0 14px;
  color: #0f172a;
  outline: none;
}

.form-control:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.search-panel {
  padding: 18px;
}

.search-panel .form-control {
  flex: 1 1 280px;
}

.breadcrumbs {
  color: #64748b;
  font-size: 14px;
  margin: 4px 0 18px;
}

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

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

.detail-main {
  overflow: hidden;
}

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

.player-shell video,
.player-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-cover {
  position: absolute;
  inset: 0;
  opacity: 0.76;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.54));
  pointer-events: auto;
}

.player-shell.playing .player-overlay,
.player-shell.playing .player-cover {
  display: none;
}

.detail-content {
  padding: 28px;
}

.detail-title h1 {
  margin-bottom: 12px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0 18px;
}

.detail-tag {
  background: #eff6ff;
  color: var(--blue);
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.meta-item {
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.meta-item span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 4px;
}

.meta-item strong {
  font-size: 14px;
}

.article-block {
  margin-top: 24px;
}

.article-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.article-block p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  font-size: 16px;
}

.related-panel {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 94px;
}

.related-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.related-list {
  display: grid;
  gap: 12px;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ecfeff);
  margin-bottom: 16px;
}

.no-results {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  margin-top: 70px;
  color: #e5e7eb;
  background: linear-gradient(135deg, #0f172a, #1f2937);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 20px 26px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  display: inline-flex;
  color: #fff;
  font-size: 22px;
  margin-bottom: 12px;
}

.site-footer p {
  color: #cbd5e1;
  line-height: 1.8;
  margin: 0;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1120px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .hero-art {
    max-width: 560px;
  }

  .related-panel {
    position: static;
  }
}

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

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

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

  .site-header-inner {
    min-height: 64px;
  }

  .hero {
    border-radius: 0 0 28px 28px;
  }

  .hero-inner {
    padding-top: 38px;
  }

  .hero-card {
    position: static;
    margin-top: 16px;
    max-width: none;
  }

  .quick-cats,
  .movie-grid,
  .rank-grid,
  .category-grid,
  .footer-grid,
  .meta-list {
    grid-template-columns: 1fr 1fr;
  }

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

  .detail-content {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .quick-cats,
  .movie-grid,
  .rank-grid,
  .category-grid,
  .footer-grid,
  .meta-list {
    grid-template-columns: 1fr;
  }

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
