:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --emerald: #059669;
  --emerald-dark: #047857;
  --emerald-soft: #d1fae5;
  --shadow: 0 18px 45px 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;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

main {
  min-height: 68vh;
}

.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.88);
}

.navbar {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--emerald-dark);
  background: var(--emerald-soft);
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--surface-soft);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #0f172a;
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 32%), linear-gradient(135deg, #ecfdf5, #ffffff 45%, #f0fdfa);
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 42px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

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

.hero-slide:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72) 52%, rgba(15, 23, 42, 0.36));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 72px 52px;
  color: white;
  align-self: end;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(6, 95, 70, 0.62);
  font-weight: 800;
  font-size: 14px;
}

.hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  max-width: 780px;
}

.hero p {
  color: #e2e8f0;
  max-width: 690px;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 16px 26px rgba(5, 150, 105, 0.32);
}

.btn-soft {
  color: white;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster {
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: center;
  width: min(320px, 72%);
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  left: 52px;
  bottom: 36px;
  z-index: 4;
  display: flex;
  gap: 9px;
}

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

.hero-dot.is-active {
  background: #34d399;
}

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

.section {
  padding: 48px 0 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

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

.section-more {
  white-space: nowrap;
  color: var(--emerald-dark);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(16, 185, 129, 0.35);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #d1fae5, #e2e8f0);
}

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 12px 26px rgba(5, 150, 105, 0.35);
  font-size: 13px;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: white;
  font-weight: 900;
  font-style: normal;
  background: rgba(15, 23, 42, 0.82);
}

.card-body {
  padding: 16px;
}

.card-tags {
  min-height: 26px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  color: #047857;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.category-tile {
  position: relative;
  min-height: 170px;
  padding: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.category-tile:after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  padding: 52px 0 30px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
  border-bottom: 1px solid #e2e8f0;
}

.page-hero h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 12px;
  margin: 24px 0;
  padding: 14px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
  color: var(--text);
  background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  border: 1px solid #e2e8f0;
}

.detail-hero {
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 32%), linear-gradient(135deg, #0f172a, #064e3b);
  color: white;
}

.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.08);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.detail-title p {
  margin: 0;
  color: #d1fae5;
  max-width: 820px;
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 20px 45px rgba(5, 150, 105, 0.45);
  font-size: 34px;
  cursor: pointer;
}

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

.prose-card,
.side-card {
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.prose-card h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.prose-card p,
.side-card p {
  margin: 0 0 16px;
  color: #334155;
}

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

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
  color: var(--muted);
}

.meta-row strong {
  color: var(--text);
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 72px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #e2e8f0;
}

.related-item strong {
  display: block;
  line-height: 1.3;
}

.related-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 520px);
  gap: 28px;
}

.footer-brand p {
  max-width: 560px;
  color: #94a3b8;
}

.footer-logo .brand-text {
  color: white;
}

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

.footer-links a {
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    padding: 14px;
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow);
    justify-content: start;
  }

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

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

  .hero-poster {
    display: none;
  }

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

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

  .detail-cover {
    width: min(260px, 70vw);
  }

  .footer-links {
    justify-content: start;
  }
}

@media (max-width: 640px) {
  .navbar,
  .container,
  .hero-inner,
  .detail-hero-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-stage {
    min-height: 560px;
    border-radius: 26px;
  }

  .hero-content {
    padding: 54px 26px 82px;
  }

  .hero-dots {
    left: 26px;
  }

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

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

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

  .page-hero {
    padding: 38px 0 20px;
  }

  .card-body {
    padding: 13px;
  }

  .movie-card h3 {
    font-size: 15px;
  }
}
