* {
  box-sizing: border-box;
}

:root {
  --green: #16a34a;
  --emerald: #047857;
  --teal: #0f766e;
  --yellow: #facc15;
  --orange: #f97316;
  --pink: #ec4899;
  --blue: #2563eb;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 22px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 48%, #fefce8 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, var(--green), var(--emerald));
  box-shadow: 0 12px 30px rgba(4, 120, 87, 0.26);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  font-size: 32px;
  line-height: 1;
}

.brand-text {
  font-size: 20px;
}

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

.nav-link {
  padding: 9px 2px;
  font-weight: 650;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: var(--yellow);
  opacity: 1;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  padding: 10px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 2px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: #065f46;
}

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

.mobile-link {
  display: block;
  padding: 14px 24px;
  font-weight: 650;
}

.section-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #16a34a, #0d9488);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(250, 204, 21, 0.32), transparent 26%),
    linear-gradient(90deg, rgba(5, 46, 22, 0.88) 0%, rgba(6, 78, 59, 0.76) 42%, rgba(15, 23, 42, 0.42) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  gap: 56px;
  align-items: center;
  padding: 58px 0 76px;
}

.hero-copy {
  max-width: 760px;
  animation: fadeUp 0.9s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #134e4a;
  background: rgba(250, 204, 21, 0.92);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  line-height: 1.05;
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-intro {
  margin: 22px 0 0;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.72;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 650;
}

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

.tag-row.large span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #1f2937;
  background: var(--yellow);
  box-shadow: 0 16px 30px rgba(250, 204, 21, 0.28);
}

.btn.glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.46);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: inherit;
  z-index: 2;
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 5;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.hero-dot {
  width: 11px !important;
  height: 11px !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44) !important;
}

.hero-dot.is-active {
  width: 34px !important;
  background: var(--yellow) !important;
}

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

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

.stat-card div {
  font-size: 38px;
  margin-bottom: 10px;
}

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

.stat-card span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.82);
}

.stat-1 { background: linear-gradient(135deg, #ec4899, #e11d48); }
.stat-2 { background: linear-gradient(135deg, #3b82f6, #0891b2); }
.stat-3 { background: linear-gradient(135deg, #f97316, #d97706); }
.stat-4 { background: linear-gradient(135deg, #22c55e, #059669); }

.section-title,
.panel-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section-title > span {
  font-size: 30px;
}

.section-title h2,
.panel-title h2,
.content-card h2,
.related-section h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.2;
}

.section-title p,
.panel-title p {
  margin: 6px 0 0;
  color: var(--gray-500);
}

.section-title > a,
.panel-title > a,
.filter-bar a {
  margin-left: auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-weight: 750;
}

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

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

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

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

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

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #064e3b;
}

.card-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-movie-grid .card-cover img,
.leading-grid .card-cover img {
  aspect-ratio: 3 / 4;
}

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

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

.card-label,
.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.92);
  font-size: 12px;
  font-weight: 850;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: #ef4444;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  color: var(--gray-800);
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--green);
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  min-height: 72px;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.7;
}

.card-desc.compact {
  -webkit-line-clamp: 2;
  min-height: 48px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #047857;
  font-size: 13px;
  font-weight: 700;
}

.card-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #ecfdf5;
}

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

.category-card,
.category-overview-card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #16a34a, #047857);
  color: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card {
  padding: 28px;
  text-align: center;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 58px rgba(4, 120, 87, 0.25);
}

.category-icon {
  display: block;
  margin-bottom: 12px;
  font-size: 42px;
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 21px;
}

.category-card em,
.overview-samples span {
  font-style: normal;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.55;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

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

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

.rank-row,
.ranking-line {
  display: grid;
  grid-template-columns: 34px 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: var(--gray-50);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover,
.ranking-line:hover {
  transform: translateX(4px);
  background: #ecfdf5;
}

.rank-num,
.ranking-line > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--orange);
  font-weight: 900;
}

.rank-row img,
.ranking-line img {
  width: 62px;
  height: 46px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gray-800);
}

.rank-text em,
.ranking-line em,
.ranking-line small {
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 20%, rgba(250, 204, 21, 0.28), transparent 24%),
    linear-gradient(120deg, #16a34a, #047857 55%, #0f766e);
}

.page-hero-inner {
  padding: 70px 0;
}

.page-hero h1 {
  max-width: 920px;
}

.compact-actions {
  margin-top: 24px;
}

.overview-main {
  display: block;
  padding: 28px;
}

.overview-main p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.overview-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 28px 28px;
}

.overview-samples span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.filter-bar,
.search-panel {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.1);
}

.filter-bar input,
.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--gray-200);
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  background: #ffffff;
}

.search-panel select {
  max-width: 220px;
}

.filter-bar input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--green);
}

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

.detail-backdrop,
.detail-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-backdrop {
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
  opacity: 0.55;
}

.detail-overlay {
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.92), rgba(15, 23, 42, 0.76));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 36px 0 64px;
}

.breadcrumb,
.breadcrumb-sep {
  display: inline-flex;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.breadcrumb:hover {
  color: var(--yellow);
}

.breadcrumb-sep {
  margin-left: 8px;
  margin-right: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #134e4a;
  background: rgba(250, 204, 21, 0.92);
  font-weight: 800;
}

.detail-main {
  display: grid;
  gap: 26px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-poster {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  color: #ffffff;
  background: #000000;
  z-index: 4;
}

.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.94);
  color: #111827;
  font-size: 36px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.player-box.is-started .player-poster {
  display: none;
}

.content-card {
  padding: 30px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.1);
}

.content-card h2 {
  margin-bottom: 16px;
}

.content-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.9;
}

.content-card p + p {
  margin-top: 14px;
}

.related-section {
  padding-top: 18px;
}

.leading-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 30px;
}

.ranking-lines {
  display: grid;
  gap: 12px;
}

.ranking-line {
  grid-template-columns: 44px 86px minmax(0, 1fr) 1fr 90px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.ranking-line img {
  width: 86px;
  height: 58px;
}

.ranking-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #059669);
  box-shadow: var(--shadow);
  font-size: 24px;
  z-index: 50;
}

.back-top.is-visible {
  display: block;
}

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

.footer-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.footer-brand span {
  font-size: 30px;
}

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

.site-footer p,
.site-footer ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: #9ca3af;
  line-height: 1.8;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  color: #9ca3af;
}

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

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

@media (max-width: 1120px) {
  .movie-grid,
  .compact-grid,
  .category-movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .ranking-panel {
    position: static;
  }

  .hero-content {
    grid-template-columns: 1fr 280px;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    align-content: center;
  }

  .hero-poster {
    width: 190px;
    transform: none;
  }

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

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

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

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

  .ranking-line {
    grid-template-columns: 38px 70px minmax(0, 1fr);
  }

  .ranking-line em,
  .ranking-line small {
    display: none;
  }
}

@media (max-width: 580px) {
  .brand-text {
    font-size: 18px;
  }

  .section-shell,
  .nav-shell,
  .footer-shell,
  .hero-content,
  .hero-controls {
    width: min(100% - 24px, 1280px);
  }

  .section-shell {
    padding: 36px 0;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero p,
  .page-hero p,
  .detail-intro {
    font-size: 16px;
  }

  .stat-grid,
  .category-grid,
  .overview-grid,
  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .leading-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .search-panel,
  .section-title,
  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .section-title > a,
  .panel-title > a,
  .filter-bar a {
    margin-left: 0;
    text-align: center;
  }

  .search-panel select {
    max-width: none;
  }

  .content-card {
    padding: 22px;
  }

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