:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --indigo: #4f46e5;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f3f4f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.site-nav {
  max-width: 1180px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  color: #374151;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--blue);
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #1f2937;
  background: #eef2ff;
  cursor: pointer;
}

.quick-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 10px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.quick-nav a {
  flex: 0 0 auto;
  padding: 6px 12px;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 13px;
  transition: all 0.2s ease;
}

.quick-nav a:hover {
  color: var(--blue);
  border-color: rgba(37, 99, 235, 0.35);
  background: #eff6ff;
}

.main-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 20px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: var(--white);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.66) 43%, rgba(15, 23, 42, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1180px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 82px 20px 110px;
  display: flex;
  align-items: center;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  font-size: 14px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-tags {
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-tags span,
.tag-row span,
.detail-tag,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-tags span {
  padding: 8px 14px;
  color: var(--white);
  background: rgba(37, 99, 235, 0.92);
}

.hero-tags span:nth-child(2n) {
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(10px);
}

.hero-actions,
.section-head,
.category-head,
.card-meta,
.detail-actions {
  display: flex;
  align-items: center;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--blue-dark);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.30);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  bottom: 32px;
  left: 50%;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 36px;
  background: var(--white);
}

.section {
  margin-bottom: 58px;
}

.section.panel {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
}

.section-head {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3.3vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  height: 230px;
  overflow: hidden;
  background: #dbeafe;
}

.movie-card.compact .poster-link {
  height: 190px;
}

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

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

.poster-link::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(15, 23, 42, 0.0);
  font-size: 42px;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
  background: rgba(15, 23, 42, 0.36);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 10px;
  color: var(--white);
  background: var(--blue);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: #111827;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.card-title:hover {
  color: var(--blue);
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

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

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

.tag-row span,
.detail-tag,
.meta-chip {
  padding: 5px 9px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

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

.category-card {
  padding: 24px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
}

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

.category-head {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

.mini-item {
  display: grid;
  grid-template-columns: auto 74px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-item:hover {
  transform: translateX(4px);
  background: #eff6ff;
}

.mini-item img {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-item em {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.rank-num {
  min-width: 34px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(135deg, #0f172a, #1d4ed8 55%, #4f46e5);
}

.page-hero .main-shell {
  padding-top: 58px;
  padding-bottom: 58px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.05em;
}

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

.breadcrumb {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
}

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

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

.detail-main,
.detail-side,
.player-panel,
.info-panel {
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.detail-main {
  overflow: hidden;
}

.player-panel {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 24px 24px 0 0;
  box-shadow: none;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.34);
  font-size: 34px;
}

.play-overlay.hidden {
  display: none;
}

.info-panel {
  padding: 26px;
  box-shadow: none;
  border-radius: 0 0 24px 24px;
}

.info-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.meta-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-row {
  margin: 16px 0;
}

.detail-copy h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-copy p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.detail-side {
  padding: 18px;
}

.detail-side h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.search-panel {
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input {
  flex: 1;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
}

.search-box input:focus {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-results {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.search-empty {
  margin: 18px 0 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 50px;
  color: #cbd5e1;
  background: #111827;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: var(--white);
}

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

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  background: rgba(37, 99, 235, 0.44);
}

.copyright {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 30px;
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.wide,
  .search-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .site-nav {
    height: auto;
    min-height: 62px;
    flex-wrap: wrap;
  }

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

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 0 0 14px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 0;
  }

  .quick-nav {
    padding-bottom: 8px;
  }

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

  .hero-content {
    align-items: flex-end;
    padding-bottom: 94px;
  }

  .movie-grid,
  .movie-grid.wide,
  .category-grid,
  .search-results,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section.panel {
    padding: 22px;
  }

  .section-head,
  .category-head,
  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

  .poster-link {
    height: 250px;
  }

  .main-shell {
    padding-top: 34px;
    padding-bottom: 34px;
  }
}
