:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --teal-600: #0d9488;
  --yellow-300: #fde047;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 25px 50px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: linear-gradient(180deg, var(--green-50), #ffffff 32rem);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  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: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--green-700), var(--emerald-600), var(--teal-600));
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.26);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--green-700);
  background: #ffffff;
  box-shadow: 0 12px 25px rgba(17, 24, 39, 0.16);
}

.brand-text {
  font-size: 1.35rem;
}

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

.desktop-nav a,
.mobile-panel a {
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover {
  color: var(--green-100);
  opacity: 1;
}

.nav-search {
  width: 280px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px;
  background: rgba(22, 101, 52, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.nav-search input,
.mobile-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 10px 14px;
}

.nav-search input::placeholder,
.mobile-panel input::placeholder {
  color: var(--green-200);
}

.nav-search button,
.mobile-panel button {
  border: 0;
  border-radius: 999px;
  color: var(--green-700);
  background: #ffffff;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.3rem;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 14px;
  flex-direction: column;
}

.mobile-panel.open {
  display: flex;
}

.mobile-panel form {
  display: flex;
  border-radius: 999px;
  padding: 4px;
  background: rgba(22, 101, 52, 0.75);
}

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

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-700), var(--emerald-500) 52%, var(--teal-600));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.2) 0 2px, transparent 3px), radial-gradient(circle at 80% 20%, rgba(255,255,255,0.16) 0 2px, transparent 3px);
  background-size: 56px 56px, 84px 84px;
  opacity: 0.45;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.74), rgba(6, 95, 70, 0.28), rgba(17, 24, 39, 0.48));
}

.hero-slider {
  position: relative;
  z-index: 2;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-layout {
  width: min(1180px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.74fr);
  align-items: center;
  gap: 52px;
  padding: 58px 0 74px;
}

.hero-copy {
  animation: fadeUp 0.8s ease both;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--green-800);
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero h1 span {
  color: var(--yellow-300);
}

.hero p {
  margin: 0 0 30px;
  max-width: 720px;
  color: var(--green-50);
  font-size: clamp(1.06rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.btn-primary,
.btn-ghost,
.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: var(--green-700);
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.18);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-line:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(21, 128, 61, 0.52);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px);
}

.btn-line {
  color: var(--green-700);
  background: var(--green-50);
  box-shadow: inset 0 0 0 1px var(--green-200);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 620px;
  gap: 18px;
}

.hero-stat {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.hero-stat strong {
  display: block;
  font-size: 1.85rem;
  line-height: 1;
}

.hero-stat small {
  display: block;
  color: var(--green-100);
  margin-top: 6px;
}

.hero-poster {
  position: relative;
  min-height: 470px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.2deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(17, 24, 39, 0.82));
}

.poster-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.poster-caption strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.poster-caption small {
  color: var(--green-100);
}

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

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

.section {
  padding: 70px 0;
}

.section-soft {
  background: linear-gradient(180deg, #ffffff, var(--green-50));
}

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

.section-head h2,
.page-title h1,
.detail-main h1 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: var(--gray-600);
}

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

.category-tile {
  min-height: 166px;
  padding: 24px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-500), var(--emerald-600));
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.tile-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 18px;
  color: var(--green-700);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 900;
}

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

.category-tile p {
  margin: 0;
  color: var(--green-50);
  font-size: 0.94rem;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  height: 245px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-100), var(--green-300));
}

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

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

.card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.92);
  padding: 5px 11px;
  font-size: 0.8rem;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-800);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
}

.card-title:hover {
  color: var(--green-600);
}

.card-body p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.95rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  color: var(--gray-500);
  font-size: 0.88rem;
}

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

.tag-row span {
  border-radius: 999px;
  color: var(--green-700);
  background: var(--green-50);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 52px 74px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  border-radius: 20px;
  padding: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-600), var(--emerald-500));
  font-weight: 900;
}

.rank-item img {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-info strong,
.rank-info small {
  display: block;
}

.rank-info strong {
  color: var(--gray-800);
  margin-bottom: 5px;
}

.rank-info small {
  color: var(--gray-500);
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-600), var(--emerald-600));
  padding: 64px 0;
}

.page-title {
  max-width: 850px;
}

.page-title h1,
.page-title p {
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--green-100);
  margin-bottom: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.tool-bar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin: 0 0 28px;
}

.tool-bar input,
.tool-bar select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  outline: 0;
  padding: 13px 18px;
  color: var(--gray-800);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--gray-600);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  padding: 50px 0 72px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: 90px;
  height: 90px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--green-700);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-size: 2.4rem;
  padding-left: 6px;
}

.detail-main h1 {
  margin-top: 24px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.detail-meta span {
  border-radius: 999px;
  color: var(--green-700);
  background: var(--green-50);
  padding: 8px 13px;
  font-weight: 800;
  font-size: 0.9rem;
}

.content-panel,
.side-panel {
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  padding: 26px;
  margin-top: 24px;
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  color: var(--gray-800);
  font-size: 1.45rem;
}

.content-panel p {
  margin: 0 0 18px;
  color: var(--gray-600);
}

.side-panel {
  position: sticky;
  top: 98px;
  margin-top: 0;
}

.side-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.side-card:last-child {
  border-bottom: 0;
}

.side-card img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 16px;
}

.side-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--gray-800);
  line-height: 1.35;
}

.side-card small {
  color: var(--gray-500);
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, var(--gray-800), var(--gray-900));
  padding-top: 52px;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.site-footer p {
  margin: 0;
  max-width: 560px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1.05rem;
}

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

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto 0;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .menu-button {
    display: block;
  }

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

  .hero-poster {
    display: none;
  }

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero,
  .hero-slider,
  .hero-layout {
    min-height: 620px;
  }

  .hero-stats,
  .rank-layout,
  .tool-bar,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: block;
  }

  .card-cover {
    height: 210px;
  }
}

@media (max-width: 520px) {
  .nav-wrap {
    min-height: 64px;
  }

  .brand-text {
    font-size: 1.1rem;
  }

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

  .hero-actions {
    display: grid;
  }

  .rank-item {
    grid-template-columns: 42px 64px 1fr;
  }

  .rank-item img {
    width: 64px;
    height: 64px;
  }
}
