:root {
  --green-950: #052e16;
  --green-900: #14532d;
  --green-800: #166534;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --slate-950: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(22, 101, 52, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--green-50) 0%, #ffffff 360px);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  color: var(--white);
  background: linear-gradient(90deg, var(--green-900), var(--green-700));
  box-shadow: 0 8px 30px rgba(20, 83, 45, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--green-700);
  background: var(--white);
  border-radius: 12px;
  box-shadow: inset 0 -2px 0 rgba(20, 83, 45, 0.12);
}

.brand-name {
  white-space: nowrap;
  font-size: 1.18rem;
}

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

.nav-link {
  padding: 9px 13px;
  color: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

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

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  min-width: 190px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  outline: none;
}

.header-search input,
.mobile-search input {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.play-overlay,
.filter-btn {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  border-radius: 999px;
}

.header-search button,
.mobile-search button {
  height: 40px;
  padding: 0 16px;
  color: var(--green-800);
  background: var(--white);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--white);
}

.mobile-menu {
  display: none;
  padding: 0 16px 18px;
}

.mobile-menu.open {
  display: grid;
  gap: 10px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at top left, #22c55e, var(--green-900) 45%, var(--green-950));
}

.hero::after {
  position: absolute;
  inset: auto -10% -35% 35%;
  height: 420px;
  content: "";
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 62%);
}

.hero-slider {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 42px;
  align-items: center;
  padding: 64px 0 74px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 13px;
  color: var(--green-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.7rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-actions,
.hero-chips,
.detail-actions,
.filter-row,
.pagination-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  margin-top: 30px;
}

.primary-btn,
.secondary-btn,
.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.primary-btn {
  color: var(--green-800);
  background: var(--white);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.secondary-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

.hero-chips {
  margin-top: 24px;
}

.hero-chips a,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
}

.hero-chips a {
  color: var(--green-100);
  background: rgba(255, 255, 255, 0.12);
}

.hero-art {
  position: relative;
  z-index: 1;
}

.hero-poster {
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--green-700), var(--green-950));
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--white);
}

.main-section {
  padding: 54px 0;
}

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

.section-head h2,
.footer-grid h2,
.detail-section h2 {
  margin: 0;
  color: var(--slate-950);
}

.section-head p,
.page-hero p,
.category-card p,
.movie-card p,
.rank-item p,
.detail-section p,
.footer-grid p {
  color: var(--slate-600);
  line-height: 1.75;
}

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

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

.category-card,
.stat-card,
.filter-panel,
.movie-card,
.rank-item,
.detail-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.category-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.category-card strong {
  color: var(--slate-950);
  font-size: 1.12rem;
}

.category-card span {
  color: var(--green-700);
  font-weight: 800;
}

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

.stat-card {
  padding: 20px;
}

.stat-card strong {
  display: block;
  color: var(--green-700);
  font-size: 2rem;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--slate-500);
}

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

.movie-card {
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-100), #ffffff);
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  color: var(--white);
  font-weight: 800;
  background: rgba(20, 83, 45, 0.82);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.movie-info {
  padding: 16px;
}

.movie-meta-line {
  color: var(--green-700);
  font-size: 0.9rem;
  font-weight: 800;
}

.movie-card h2,
.rank-item h2 {
  margin: 8px 0 8px;
  color: var(--slate-950);
  font-size: 1.06rem;
  line-height: 1.35;
}

.movie-card p,
.rank-item p {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.meta-pill {
  color: var(--green-800);
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--green-100);
}

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

.page-hero .hero-panel {
  padding: 36px;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
}

.filter-input,
.filter-select {
  color: var(--slate-800);
  background: var(--white);
  border: 1px solid var(--slate-200);
}

.filter-btn {
  color: var(--white);
  background: var(--green-700);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-num {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  border-radius: 16px;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
}

.rank-thumb img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0;
  color: var(--slate-500);
  font-size: 0.95rem;
}

.breadcrumb a {
  color: var(--green-700);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.45fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 58px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 1.05rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(5, 46, 22, 0.55));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  padding-left: 5px;
  color: var(--green-800);
  font-size: 2rem;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.player-shell.playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-card {
  padding: 24px;
}

.detail-title h1 {
  color: var(--slate-950);
}

.detail-title p {
  color: var(--slate-600);
  font-size: 1.05rem;
  line-height: 1.85;
}

.detail-actions {
  margin-top: 18px;
}

.detail-actions .primary-btn {
  color: var(--white);
  background: var(--green-700);
}

.detail-section {
  margin-top: 24px;
}

.detail-section p {
  margin: 12px 0 0;
}

.side-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hidden-card {
  display: none !important;
}

.site-footer {
  padding: 46px 0 24px;
  color: rgba(255, 255, 255, 0.84);
  background: linear-gradient(135deg, var(--green-950), var(--green-800));
}

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

.footer-grid h2 {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 1.05rem;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
}

.footer-brand {
  color: var(--white);
  font-size: 1.25rem;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.74);
}

.footer-bottom {
  margin-top: 26px;
  padding-top: 18px;
  color: rgba(255, 255, 255, 0.68);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

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

  .hero-slider {
    min-height: 780px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 44px 0 84px;
  }

  .hero-art {
    max-width: 420px;
  }

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

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

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero-slider {
    min-height: 760px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 2.15rem;
  }

  .hero-poster {
    border-width: 6px;
    border-radius: 22px;
  }

  .section-head {
    display: grid;
  }

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

  .rank-item {
    grid-template-columns: 46px 72px 1fr;
    gap: 12px;
  }

  .rank-num {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .rank-thumb img {
    width: 72px;
  }

  .page-hero .hero-panel,
  .detail-card {
    padding: 22px;
  }
}
