:root {
  --green: #16a34a;
  --emerald: #047857;
  --yellow: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --shadow: 0 18px 40px rgba(15, 23, 42, .12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 48%, #fefce8 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, #16a34a, #047857);
  box-shadow: 0 12px 24px rgba(4, 120, 87, .22);
}

.nav-shell {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon,
.footer-logo span {
  font-size: 32px;
  line-height: 1;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  padding: 9px 0;
  font-weight: 650;
  opacity: .92;
  transition: .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fde047;
}

.nav-link:last-child {
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}

.mobile-toggle {
  display: none;
  border: 0;
  color: white;
  background: rgba(255, 255, 255, .15);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  padding: 10px 24px 18px;
  background: #065f46;
}

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

.mobile-nav a {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.hero-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(120deg, #16a34a, #059669 45%, #0f766e);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(250, 204, 21, .35), transparent 26%),
    radial-gradient(circle at 88% 15%, rgba(45, 212, 191, .32), transparent 30%),
    linear-gradient(180deg, rgba(0, 0, 0, .26), rgba(0, 0, 0, .18));
}

.hero-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background: linear-gradient(0deg, #ffffff, transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 76px 24px 120px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
  min-height: 430px;
  color: #ffffff;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp .6s ease both;
}

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

.eyebrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: #14532d;
  background: #fef08a;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
}

.hero-copy h1 {
  margin-top: 22px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -.05em;
}

.hero-copy h2 {
  margin-top: 16px;
  font-size: clamp(24px, 3vw, 38px);
  color: #fef3c7;
}

.hero-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dcfce7;
  font-size: 20px;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
}

.hero-actions,
.detail-info .btn {
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: .2s ease;
}

.btn.primary {
  color: #1f2937;
  background: #facc15;
  box-shadow: 0 14px 30px rgba(250, 204, 21, .28);
}

.btn.primary:hover {
  background: #fde047;
  transform: translateY(-2px) scale(1.02);
}

.btn.ghost {
  margin-left: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .24);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, .24);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .38));
}

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

.hero-poster:hover img {
  transform: scale(1.07);
}

.hero-dots {
  position: absolute;
  left: 24px;
  bottom: 78px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  width: 34px;
  background: #facc15;
}

.stats-grid,
.content-section,
.page-hero,
.filter-bar,
.player-section {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: -54px;
  position: relative;
  z-index: 5;
}

.stat-card {
  min-height: 150px;
  color: #ffffff;
  padding: 26px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.stat-card span {
  display: block;
  font-size: 38px;
  margin-bottom: 12px;
}

.stat-card strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.stat-card em {
  display: block;
  margin-top: 9px;
  font-style: normal;
  opacity: .85;
}

.stat-card.rose {
  background: linear-gradient(135deg, #ec4899, #e11d48);
}

.stat-card.blue {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.stat-card.orange {
  background: linear-gradient(135deg, #f97316, #d97706);
}

.stat-card.green {
  background: linear-gradient(135deg, #22c55e, #059669);
}

.content-section {
  padding-top: 64px;
  padding-bottom: 20px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -.03em;
}

.section-head a {
  color: #059669;
  font-weight: 800;
}

.section-head.compact h2 {
  font-size: 26px;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
  transition: .24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, .16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e5e7eb;
}

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

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

.card-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  font-weight: 800;
}

.card-badge {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #ef4444;
}

.play-chip {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, .9);
  transform: translate(-50%, -50%) scale(.86);
  opacity: 0;
  transition: .2s ease;
}

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

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 46px;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover {
  color: #059669;
}

.card-body p {
  display: -webkit-box;
  min-height: 42px;
  margin: 10px 0 12px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  color: #047857;
  background: #dcfce7;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: #6b7280;
  font-size: 13px;
}

.card-meta a {
  color: #2563eb;
  font-weight: 700;
}

.soft-panel {
  margin-top: 28px;
  padding-top: 40px;
  padding-bottom: 48px;
  border-radius: 36px;
  background: rgba(255, 255, 255, .7);
}

.category-grid,
.category-panels {
  display: grid;
  gap: 18px;
}

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

.category-tile,
.category-panel {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  transition: .2s ease;
}

.category-tile {
  min-height: 130px;
  padding: 24px;
  display: grid;
  align-content: center;
  gap: 8px;
}

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

.category-tile span {
  font-size: 34px;
}

.category-tile strong,
.category-panel strong {
  font-size: 18px;
}

.category-tile em,
.category-panel em {
  color: #6b7280;
  font-style: normal;
  font-size: 13px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 34px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: .2s ease;
}

.rank-item:hover {
  background: #ecfdf5;
  transform: translateX(4px);
}

.rank-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  margin-top: 5px;
  color: #6b7280;
  font-style: normal;
  font-size: 12px;
}

.rank-score {
  color: #f59e0b;
  font-weight: 900;
}

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero {
  margin-top: 36px;
  margin-bottom: 20px;
  padding-top: 54px;
  padding-bottom: 54px;
  border-radius: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 20%, rgba(250, 204, 21, .28), transparent 30%),
    linear-gradient(135deg, #16a34a, #047857);
  box-shadow: var(--shadow);
}

.page-hero.small {
  min-height: 260px;
}

.page-hero h1 {
  max-width: 920px;
  margin: 20px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #dcfce7;
  font-size: 18px;
  line-height: 1.8;
}

.hero-icon {
  display: block;
  font-size: 56px;
  margin-bottom: 10px;
}

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

.category-panel {
  padding: 22px;
}

.category-panel-head {
  display: grid;
  gap: 6px;
}

.category-panel-head span {
  font-size: 36px;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-preview a {
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  color: #047857;
  background: #dcfce7;
  font-size: 13px;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 18px;
  margin-top: 24px;
  margin-bottom: 10px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-size: 14px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 50px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  padding: 0 16px;
  font: inherit;
  background: #ffffff;
  outline: none;
  transition: .2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .12);
}

.filter-bar.embedded {
  max-width: none;
  padding: 0;
  grid-template-columns: 1fr;
}

.sticky-filter {
  position: sticky;
  top: 84px;
  z-index: 20;
  padding-top: 18px;
  padding-bottom: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.ranking-wide .rank-list.full {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.1);
}

.detail-shell {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .38);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #bbf7d0;
  font-size: 14px;
}

.breadcrumb a {
  font-weight: 800;
}

.breadcrumb em {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  font-style: normal;
}

.detail-info h1 {
  margin: 20px 0 12px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.detail-one-line {
  max-width: 820px;
  color: #dcfce7;
  font-size: 19px;
  line-height: 1.8;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 26px 0 0;
}

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
}

.detail-meta dt,
.detail-meta dd {
  margin: 0;
}

.detail-meta dt {
  color: #bbf7d0;
  font-size: 12px;
}

.detail-meta dd {
  margin-top: 4px;
  font-weight: 900;
}

.player-section {
  padding-top: 54px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, .14), rgba(2, 6, 23, .48));
  cursor: pointer;
  transition: .22s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  background: rgba(34, 197, 94, .92);
  box-shadow: 0 18px 45px rgba(34, 197, 94, .34);
}

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

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #ffffff;
  font-size: 13px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.article-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-card p {
  margin: 0;
  color: #374151;
  line-height: 2;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 60%, #111827);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-grid h3 {
  margin: 0 0 15px;
  color: #fde047;
}

.footer-grid p {
  color: #9ca3af;
  line-height: 1.8;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-grid a:hover {
  color: #fde047;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding: 18px 24px;
  text-align: center;
  color: #9ca3af;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #059669);
  box-shadow: var(--shadow);
  font-size: 22px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: .2s ease;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none;
}

@media (max-width: 1180px) {
  .movie-grid.cols-6,
  .movie-grid.cols-5 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .two-column {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-slide,
  .hero-slide.active {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-poster {
    max-width: 260px;
    margin: 0 auto;
  }

  .stats-grid,
  .footer-grid,
  .detail-shell,
  .detail-meta,
  .category-panels,
  .ranking-wide .rank-list.full,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .movie-grid.cols-3,
  .movie-grid.cols-4,
  .movie-grid.cols-5,
  .movie-grid.cols-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-shell {
    padding-top: 48px;
  }

  .detail-cover {
    max-width: 240px;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .stats-grid,
  .content-section,
  .page-hero,
  .filter-bar,
  .player-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-inner {
    padding: 54px 16px 100px;
  }

  .hero-copy p,
  .detail-one-line,
  .page-hero p {
    font-size: 16px;
  }

  .btn.ghost {
    margin-left: 0;
    margin-top: 12px;
  }

  .hero-actions {
    display: grid;
    gap: 10px;
    max-width: 220px;
  }

  .movie-grid.cols-3,
  .movie-grid.cols-4,
  .movie-grid.cols-5,
  .movie-grid.cols-6 {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 30px 52px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }
}
