:root {
  --primary: #2563eb;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --dark: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --warm: #fff7ed;
  --radius: 1rem;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
  background: #f8fafc;
}

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

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

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

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

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.brand-text {
  font-size: 1.18rem;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.94rem;
}

.nav-link {
  color: #475569;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.menu-button {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--primary);
  border-radius: 999px;
}

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

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--cyan), var(--teal));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: white;
  max-width: 760px;
  padding: 90px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-intro p {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.detail-facts,
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  margin: 30px 0 26px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.primary-button {
  color: var(--primary);
  background: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.15);
}

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

.hero-meta span,
.detail-facts span {
  padding: 8px 14px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
}

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

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

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

.site-section {
  padding: 72px 0;
}

.white-section {
  background: white;
}

.warm-section {
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.category-section {
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  color: #111827;
}

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

.section-more {
  color: var(--primary);
  background: #eff6ff;
}

.search-panel {
  position: relative;
  margin-bottom: 28px;
}

.search-panel input {
  width: 100%;
  height: 58px;
  padding: 0 56px 0 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  font-size: 1rem;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

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

.search-icon {
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.4rem;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: radial-gradient(circle at 20% 20%, #dbeafe, #0ea5e9 45%, #0f172a);
}

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

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

.play-mark {
  position: absolute;
  inset: auto 14px 14px auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.card-badge,
.rank-num {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #ef4444, #f97316);
  font-size: 0.75rem;
  font-weight: 800;
}

.rank-num {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

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

.movie-card h3 {
  min-height: 2.8em;
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.4;
  color: #111827;
}

.card-desc {
  min-height: 3.2em;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #64748b;
  font-size: 0.78rem;
}

.movie-meta span,
.tag-row span {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  color: #2563eb;
  font-size: 0.78rem;
}

.category-showcase {
  margin-top: 38px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.page-hero,
.detail-hero {
  color: white;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4, #14b8a6);
}

.page-hero {
  padding: 86px 0;
}

.compact-hero {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.category-hero {
  background: linear-gradient(135deg, #0f172a, #1d4ed8, #0891b2);
}

.rank-hero {
  background: linear-gradient(135deg, #991b1b, #ea580c, #facc15);
}

.page-hero p {
  max-width: 780px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
}

.breadcrumbs a:hover {
  color: white;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
  padding: 28px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.category-card:hover {
  box-shadow: var(--shadow);
}

.category-kicker {
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--primary);
  background: #eff6ff;
  font-weight: 800;
}

.category-card h2 {
  margin: 0;
  font-size: 1.6rem;
}

.category-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-arrow {
  color: var(--primary);
  font-weight: 800;
}

.detail-hero {
  padding: 62px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.large-poster {
  border-radius: 26px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.32);
}

.detail-intro h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.detail-tags span {
  color: white;
  background: rgba(255, 255, 255, 0.18);
}

.detail-main {
  display: grid;
  gap: 30px;
}

.player-card,
.content-card,
.related-card {
  padding: 28px;
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.1),
    rgba(15, 23, 42, 0.64)
  );
  cursor: pointer;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 15px 45px rgba(37, 99, 235, 0.42);
  font-size: 2rem;
}

.player-start strong {
  font-size: 1.1rem;
}

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

.player-card h2,
.content-card h2 {
  margin: 24px 0 10px;
  color: #111827;
}

.player-card p,
.content-card p {
  color: #475569;
  line-height: 1.85;
  font-size: 1.02rem;
}

.site-footer {
  padding: 46px 0;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 34px;
}

.site-footer p {
  max-width: 460px;
  color: #94a3b8;
  line-height: 1.75;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 1rem;
}

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

.footer-links.compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links a:hover {
  color: white;
}

.is-filtered-out {
  display: none !important;
}

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

  .menu-button {
    display: flex;
  }

  .movie-grid,
  .featured-grid,
  .rank-grid,
  .poster-grid,
  .small-grid,
  .category-movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    padding: 72px 0;
  }

  .site-section {
    padding: 52px 0;
  }

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

  .movie-grid,
  .featured-grid,
  .rank-grid,
  .poster-grid,
  .small-grid,
  .category-movie-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .category-showcase,
  .player-card,
  .content-card,
  .related-card {
    padding: 18px;
    border-radius: 20px;
  }

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

  .detail-poster {
    width: min(280px, 100%);
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .featured-grid,
  .rank-grid,
  .poster-grid,
  .small-grid,
  .category-movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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