:root {
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --yellow: #facc15;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #f8fafc;
  --dark: #07160d;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  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: #f3f6f4;
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--green-700), var(--green-500));
  color: #fff;
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.24);
}

.nav-inner {
  max-width: 1280px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

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

.nav-link {
  font-size: 15px;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--green-100);
  opacity: 1;
  font-weight: 700;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 30vw);
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.top-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 8px 10px;
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.top-search button {
  border: 0;
  border-radius: 999px;
  color: var(--green-700);
  background: #fff;
  padding: 8px 15px;
  cursor: pointer;
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(34, 197, 94, 0.35), transparent 36%),
    linear-gradient(90deg, rgba(5, 15, 10, 0.94) 0%, rgba(5, 15, 10, 0.70) 45%, rgba(5, 15, 10, 0.34) 100%),
    linear-gradient(0deg, rgba(5, 15, 10, 0.92) 0%, rgba(5, 15, 10, 0.08) 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 640px;
  margin: 0 auto;
  padding: 92px 22px 150px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 48px;
  color: #fff;
}

.hero-kicker,
.section-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--green-100);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags .chip {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 20px;
}

.primary-btn,
.ghost-btn,
.section-more,
.form-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 21px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--green-700);
  background: #fff;
  box-shadow: 0 16px 40px rgba(255, 255, 255, 0.18);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.form-btn:hover {
  transform: translateY(-2px);
}

.hero-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.hero-meta span,
.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.12);
}

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

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

.hero-dot {
  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-dot.is-active {
  width: 34px;
  background: #fff;
}

.hero-mini-strip {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 4;
  width: min(1120px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  transform: translateX(-50%);
}

.hero-mini-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-mini-card img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.hero-mini-card span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 700;
  line-height: 1.35;
}

.section,
.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px;
}

.section-head,
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 26px;
}

.section-head h2,
.page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.section-kicker {
  color: var(--green-600);
}

.section-more,
.form-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--green-700), var(--green-500));
  box-shadow: 0 14px 28px rgba(22, 163, 74, 0.24);
  flex-shrink: 0;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.22), rgba(15, 23, 42, 0.9));
}

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

.movie-card:hover .poster-link img,
.rank-card:hover img,
.related-card:hover img,
.category-tile:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.64));
}

.score-badge,
.type-badge,
.rank-number {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.score-badge {
  right: 10px;
  top: 10px;
  color: #2b2100;
  background: var(--yellow);
}

.type-badge {
  left: 10px;
  bottom: 10px;
  color: #fff;
  background: rgba(22, 163, 74, 0.92);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.related-card h3 a:hover,
.rank-card h3 a:hover {
  color: var(--green-600);
}

.movie-line {
  min-height: 45px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.meta-row {
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  margin-top: 12px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: linear-gradient(90deg, var(--green-700), var(--green-500));
  color: #fff;
}

.stat-strip div {
  padding: 34px 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
}

.stat-strip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1;
}

.stat-strip span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

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

.category-tile {
  overflow: hidden;
  display: block;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  aspect-ratio: 16 / 6;
  overflow: hidden;
  background: #eaf8ee;
}

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

.category-body {
  padding: 20px;
}

.category-body h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 14px 18px 14px 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.rank-cover {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
}

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

.rank-number {
  position: static;
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  font-size: 16px;
}

.rank-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 22px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--green-600);
}

.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 22px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.9fr);
  gap: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #030712;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  background: #030712;
  object-fit: contain;
  cursor: pointer;
}

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58)),
    rgba(3, 7, 18, 0.18);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-mask.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--green-700);
  font-size: 34px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

.detail-card,
.content-card,
.related-panel,
.search-panel {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.detail-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.detail-summary {
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 16px;
}

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

.detail-meta div {
  padding: 12px;
  border-radius: 14px;
  background: var(--green-50);
}

.detail-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-meta strong {
  display: block;
  margin-top: 3px;
}

.detail-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 22px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.8fr);
  gap: 28px;
}

.content-card {
  padding: 28px;
  margin-bottom: 24px;
}

.content-card h2,
.related-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  white-space: pre-line;
}

.related-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
}

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

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

.related-card img {
  width: 104px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.35s ease;
}

.related-card h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.35;
}

.related-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.search-panel {
  padding: 20px;
  margin-bottom: 28px;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px auto;
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0 14px;
  outline: 0;
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius);
  background: #fff;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 30px;
  background: #07160d;
  color: #d1fae5;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 620px;
  margin: 0;
  color: rgba(209, 250, 229, 0.78);
}

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

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

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

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

  .hero-content,
  .detail-hero,
  .detail-body {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .hero-mini-card:nth-child(n + 4) {
    display: none;
  }

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

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

  .search-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    flex-wrap: wrap;
    min-height: 62px;
    padding: 10px 16px;
  }

  .mobile-toggle {
    display: block;
  }

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

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

  .nav-link {
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

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

  .hero-content {
    padding: 72px 16px 140px;
  }

  .hero-desc {
    font-size: 16px;
  }

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

  .hero-mini-card:nth-child(n + 2) {
    display: none;
  }

  .section,
  .page-shell {
    padding: 42px 16px;
  }

  .section-head,
  .page-head {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .rank-number {
    position: absolute;
    right: 12px;
    top: 12px;
  }

  .detail-card,
  .content-card,
  .related-panel {
    padding: 20px;
  }

  .detail-meta,
  .search-controls {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: block;
  }

  .footer-inner p,
  .footer-links {
    margin-top: 14px;
  }
}
