:root {
  --green-900: #14532d;
  --green-800: #166534;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --gray-950: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--green-800), var(--emerald-700));
  box-shadow: 0 10px 30px rgba(20, 83, 45, 0.26);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--green-800);
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  font-size: 15px;
  font-weight: 650;
}

.site-nav a,
.mobile-nav a {
  opacity: 0.95;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover,
.mobile-nav a:hover {
  color: #dcfce7;
  opacity: 1;
}

.nav-toggle {
  display: none;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 22px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
}

.hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
  background: radial-gradient(circle at 15% 20%, rgba(34, 197, 94, 0.42), transparent 28%), linear-gradient(135deg, #064e3b, #0f172a 62%, #020617);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.46), rgba(2, 6, 23, 0.88));
  pointer-events: none;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.01);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  padding: 68px 0 78px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 14px;
  color: #d1fae5;
  background: rgba(22, 163, 74, 0.26);
  border: 1px solid rgba(187, 247, 208, 0.28);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 24px;
  max-width: 640px;
  color: #d1d5db;
  font-size: 17px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--green-600), var(--emerald-600));
  box-shadow: 0 18px 30px rgba(22, 163, 74, 0.28);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.hero-panel img {
  position: static;
  width: 100%;
  height: 370px;
  object-fit: cover;
  opacity: 1;
  border-radius: 20px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-tags span,
.tag-row span,
.meta-pill,
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-tags span {
  padding: 7px 12px;
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

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

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

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

.section {
  padding: 52px 0;
}

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

.section-title {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--gray-500);
}

.search-panel {
  position: relative;
  z-index: 10;
  margin-top: -36px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.search-input,
.sort-select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: var(--gray-800);
  background: #f9fafb;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  min-height: 36px;
  padding: 0 15px;
  color: var(--green-700);
  background: #dcfce7;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.chip:hover {
  color: var(--white);
  background: var(--green-600);
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #dcfce7, #0f172a);
}

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

.movie-card:hover .poster img,
.compact-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 58%);
  opacity: 0.68;
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--white);
  background: rgba(22, 163, 74, 0.86);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.poster:hover .play-icon,
.movie-card:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  border-radius: 8px;
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

.card-body h2,
.list-body h2 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--gray-800);
  font-size: 18px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.card-body a:hover h2,
.list-body a:hover h2 {
  color: var(--green-600);
}

.card-body p,
.list-body p {
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--gray-500);
  font-size: 13px;
}

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

.tag-row span,
.meta-pill {
  padding: 4px 9px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 12px;
}

.tag-row .primary-tag {
  color: var(--green-700);
  background: #dcfce7;
}

.featured-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
}

.featured-card {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  color: var(--white);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.featured-card img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.featured-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 30px;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.10));
}

.featured-overlay h2 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.15;
}

.featured-overlay p {
  max-width: 680px;
  margin: 0 0 18px;
  color: #e5e7eb;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.compact-card {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.compact-card img {
  width: 100%;
  height: 126px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.compact-card span {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 14px 12px;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.74), transparent);
  font-weight: 800;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(120deg, var(--green-700), var(--emerald-600));
  padding: 56px 0;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dcfce7;
}

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

.category-card {
  min-height: 210px;
  padding: 26px;
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2 {
  margin: 0 0 12px;
  color: var(--gray-800);
  font-size: 24px;
}

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

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

.toolbar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 160px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.rank-number {
  color: var(--green-700);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-card img {
  width: 160px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-card h2 {
  margin: 0 0 7px;
  font-size: 20px;
}

.rank-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 14px;
}

.rank-hot {
  padding: 6px 12px;
  color: var(--white);
  background: var(--green-600);
  border-radius: 999px;
  font-weight: 800;
}

.breadcrumb {
  padding: 22px 0 0;
  color: var(--gray-500);
  font-size: 14px;
}

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

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

.detail-main,
.detail-side,
.detail-info {
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.detail-main {
  overflow: hidden;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.16));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  background: rgba(22, 163, 74, 0.9);
  border-radius: 999px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  font-size: 32px;
  transform: translateX(3px);
}

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

.detail-info {
  margin-top: 18px;
  padding: 26px;
}

.detail-info h1 {
  margin: 0 0 12px;
  color: var(--gray-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 20px;
}

.detail-info h2,
.detail-side h2 {
  margin: 26px 0 12px;
  color: var(--gray-800);
  font-size: 22px;
}

.detail-info p {
  color: var(--gray-700);
}

.review-box {
  padding: 20px;
  background: linear-gradient(120deg, #f0fdf4, #ecfdf5);
  border-left: 5px solid var(--green-600);
  border-radius: 16px;
}

.detail-side {
  position: sticky;
  top: 86px;
  padding: 20px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 112px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
}

.related-item h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-item span {
  color: var(--gray-500);
  font-size: 12px;
}

.list-card {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  padding: 0;
}

.list-thumb {
  position: relative;
  min-height: 150px;
  overflow: hidden;
}

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

.list-body {
  padding: 18px 18px 18px 0;
}

.empty-state {
  display: none;
  padding: 32px;
  color: var(--gray-500);
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  text-align: center;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 12px;
  color: var(--white);
}

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

.site-footer p {
  margin: 0;
  color: #cbd5e1;
}

.site-footer ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover,
.footer-link {
  color: #86efac;
}

.footer-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 800;
}

.footer-bottom {
  padding: 18px 0;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
}

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

  .nav-toggle {
    display: inline-flex;
  }

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

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

  .detail-side {
    position: static;
  }

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

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

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

  .brand {
    font-size: 18px;
  }

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

  .hero-content {
    padding: 46px 0 82px;
  }

  .hero-panel img {
    height: 240px;
  }

  .search-box,
  .toolbar,
  .rank-card,
  .list-card {
    grid-template-columns: 1fr;
  }

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

  .rank-card img {
    width: 100%;
    height: 180px;
  }

  .rank-number {
    text-align: left;
  }

  .list-body {
    padding: 16px;
  }

  .section-header {
    display: block;
  }
}

@media (max-width: 520px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }
}
