:root {
  --green-950: #052e1b;
  --green-900: #064e2e;
  --green-800: #166534;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-400: #4ade80;
  --green-200: #bbf7d0;
  --gray-950: #0f172a;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
  --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", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: #f8faf9;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--green-950), var(--green-800));
  color: var(--white);
  box-shadow: 0 14px 30px rgba(5, 46, 27, 0.28);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--green-400), var(--green-700));
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(74, 222, 128, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.03em;
}

.brand-text em {
  font-size: 12px;
  color: var(--green-200);
  font-style: normal;
}

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

.nav-link,
.mobile-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-strip input,
.search-page-panel input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(22, 101, 52, 0.25);
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
  width: 190px;
  background: rgba(5, 46, 27, 0.8);
  border-color: rgba(187, 247, 208, 0.22);
  color: var(--white);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(187, 247, 208, 0.75);
}

.header-search input:focus,
.mobile-search input:focus,
.search-strip input:focus,
.search-page-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--green-500, #22c55e);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.13);
}

.header-search button,
.mobile-search button,
.search-strip button,
.search-page-panel button,
.btn-primary {
  border: 0;
  border-radius: 14px;
  padding: 11px 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.24);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-strip button:hover,
.search-page-panel button:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 14px;
  padding: 11px 18px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  flex: 1;
  width: auto;
}

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

.hero-carousel {
  position: relative;
  min-height: 680px;
  height: 72vh;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  filter: brightness(0.42);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 68% 40%, rgba(74, 222, 128, 0.22), transparent 32%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 0.22) 50%, rgba(5, 46, 27, 0.85));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  gap: 54px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green-300, #86efac);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 800;
  color: var(--green-200);
}

.hero-summary {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-tags,
.detail-meta,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-meta span,
.movie-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
}

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

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.44);
  transform: rotate(2deg);
}

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

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--green-400);
}

.search-strip,
.content-section,
.page-shell,
.detail-content,
.player-section,
.rank-entry {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-strip {
  margin-top: -48px;
  position: relative;
  z-index: 5;
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-strip form label {
  display: block;
  margin-bottom: 12px;
  font-weight: 800;
  color: var(--green-900);
}

.search-strip form div,
.search-page-panel form {
  display: flex;
  gap: 12px;
}

.search-strip input,
.search-page-panel input {
  flex: 1;
  min-width: 0;
  background: var(--white);
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-cats a,
.category-samples a,
.text-link {
  color: var(--green-800);
  font-weight: 700;
}

.quick-cats a {
  border-radius: 999px;
  padding: 8px 12px;
  background: #ecfdf5;
}

.content-section {
  padding: 70px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.rank-entry h2,
.story-card h2,
.category-card h2 {
  margin: 0;
  color: var(--gray-900);
  font-weight: 900;
  line-height: 1.2;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading p,
.page-hero p,
.rank-entry p,
.category-card p,
.story-card p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-more {
  color: var(--green-800);
  font-weight: 800;
}

.movie-grid,
.movie-list-grid,
.category-grid-page,
.rank-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 48px rgba(15, 23, 42, 0.16);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--gray-900);
}

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

.movie-card:hover .movie-cover img {
  transform: scale(1.06);
}

.cover-play,
.rank-badge {
  position: absolute;
  z-index: 2;
}

.cover-play {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(22, 163, 74, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--white);
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-body {
  padding: 16px;
}

.movie-meta span {
  color: var(--green-900);
  background: #ecfdf5;
}

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

.movie-body p {
  margin: 0;
  min-height: 52px;
  color: var(--gray-600);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--green-800);
  background: #f0fdf4;
  font-size: 12px;
  font-weight: 700;
}

.rank-entry {
  margin-top: 70px;
  border-radius: 28px;
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 20%, rgba(74, 222, 128, 0.26), transparent 25%),
    linear-gradient(135deg, var(--green-950), var(--green-800));
  box-shadow: var(--shadow);
}

.rank-entry h2,
.rank-entry p {
  color: var(--white);
}

.rank-entry p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
}

.page-shell {
  padding: 42px 0 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 52px;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(74, 222, 128, 0.3), transparent 32%),
    linear-gradient(135deg, var(--green-950), var(--gray-900));
  box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero p {
  color: var(--white);
}

.page-hero h1 {
  font-size: clamp(32px, 4vw, 54px);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.8);
}

.small-hero {
  padding: 42px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

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

.filter-panel,
.search-page-panel {
  margin: 28px 0;
  border-radius: 22px;
  padding: 22px;
  display: flex;
  gap: 16px;
  background: var(--white);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  font-weight: 800;
  color: var(--green-900);
}

.category-grid-page {
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  border-radius: 24px;
  padding: 18px;
  background: var(--white);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.category-image {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 4 / 5;
}

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0;
  font-size: 14px;
}

.detail-page {
  background: #f8faf9;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
}

.detail-shadow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(74, 222, 128, 0.22), transparent 24%),
    linear-gradient(0deg, #f8faf9 0%, rgba(3, 7, 18, 0.12) 24%, rgba(3, 7, 18, 0.86) 100%);
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 620px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: center;
  gap: 46px;
  padding: 60px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
}

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

.detail-copy h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
}

.detail-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.large-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.detail-copy .btn-primary {
  display: inline-block;
  margin-top: 28px;
}

.player-section {
  margin-top: -70px;
  position: relative;
  z-index: 4;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.05));
  cursor: pointer;
}

.player-cover span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 4px;
  background: rgba(22, 163, 74, 0.92);
  font-size: 34px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 34px;
}

.story-card {
  border-radius: 24px;
  padding: 28px;
  background: var(--white);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.related-section {
  padding-bottom: 80px;
}

.site-footer {
  margin-top: 80px;
  padding: 52px 0 0;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--gray-900), #020617);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
}

.footer-brand {
  color: var(--white);
  font-weight: 900;
  font-size: 20px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

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

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 9px;
}

.site-footer a:hover {
  color: var(--green-400);
}

.footer-bottom {
  margin-top: 38px;
  padding: 20px 16px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

@media (max-width: 1024px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-content,
  .detail-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-poster {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .movie-list-grid,
  .category-movie-grid,
  .rank-grid,
  .search-results,
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .header-inner {
    height: 64px;
  }

  .brand-text em {
    display: none;
  }

  .hero-carousel {
    min-height: 640px;
    height: auto;
  }

  .hero-content {
    padding: 68px 0 92px;
  }

  .hero-actions,
  .search-strip form div,
  .search-page-panel form,
  .rank-entry,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .search-strip {
    margin-top: -30px;
  }

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

  .movie-grid,
  .featured-grid,
  .movie-list-grid,
  .category-movie-grid,
  .rank-grid,
  .search-results,
  .compact-grid,
  .category-grid-page,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .category-card {
    grid-template-columns: 120px 1fr;
  }

  .page-hero,
  .small-hero,
  .rank-entry,
  .story-card {
    padding: 24px;
    border-radius: 22px;
  }

  .detail-inner {
    min-height: auto;
    padding: 36px 0 120px;
  }

  .detail-poster {
    max-width: 260px;
  }

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