:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-900: #14532d;
  --teal-600: #0d9488;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-600: #ea580c;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-600: #9333ea;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --black: #020617;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-hover: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.74));
  backdrop-filter: blur(16px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.header-inner {
  width: min(var(--container), calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-2deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 24px;
  color: var(--gray-900);
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--gray-700);
  font-weight: 700;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--green-600);
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--green-600);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  overflow: hidden;
}

.header-search input,
.mobile-search input {
  width: 220px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: var(--gray-700);
  background: transparent;
}

.header-search button,
.mobile-search button {
  border: 0;
  padding: 10px 16px;
  color: var(--white);
  background: var(--green-600);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--gray-800);
}

.mobile-panel {
  display: none;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--gray-700);
  font-weight: 700;
}

.mobile-link.is-active,
.mobile-link:hover {
  color: var(--white);
  background: var(--green-600);
}

.page-main {
  min-height: 100vh;
}

.home-main {
  padding-top: 0;
}

.inner-main {
  padding-top: 96px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-900), var(--green-700), var(--teal-600));
}

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

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

.hero-backdrop,
.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42);
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.25) 58%, rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-direction: column;
  color: var(--white);
  padding-top: 72px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--green-500);
  color: var(--white);
  padding: 4px 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.hero-main-title {
  margin: 16px 0 0;
  font-size: clamp(28px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  max-width: 820px;
}

.hero h2 {
  margin: 10px 0 0;
  font-size: clamp(24px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 900;
  max-width: 780px;
}

.hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.detail-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.52);
}

.hero-actions,
.detail-info .primary-button {
  margin-top: 28px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-button {
  color: var(--white);
  background: var(--green-600);
  box-shadow: 0 18px 34px rgba(22, 163, 74, 0.28);
}

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

.primary-button:hover {
  background: var(--green-700);
}

.ghost-button {
  margin-left: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.stats-strip,
.content-section,
.category-section,
.toolbar-section,
.detail-content,
.player-section {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.stats-strip {
  padding: 54px 0 28px;
}

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

.stat-card {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1;
}

.stat-card span {
  margin-top: 10px;
  color: var(--gray-700);
  font-weight: 800;
}

.stat-orange {
  color: var(--orange-600);
  background: linear-gradient(135deg, var(--orange-50), var(--orange-100));
}

.stat-blue {
  color: var(--blue-600);
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
}

.stat-green {
  color: var(--green-600);
  background: linear-gradient(135deg, var(--green-50), var(--green-100));
}

.stat-purple {
  color: var(--purple-600);
  background: linear-gradient(135deg, var(--purple-50), var(--purple-100));
}

.content-section,
.category-section {
  padding: 48px 0;
}

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-heading a {
  color: var(--green-600);
  font-weight: 900;
}

.section-heading-light,
.section-heading-light a {
  color: var(--white);
}

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

.movie-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.poster-box {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-900), var(--teal-600));
}

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

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

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
}

.duration-badge {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tags span,
.detail-tags span,
.genre-links a {
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--green-700);
  background: var(--green-100);
  font-size: 12px;
  font-weight: 800;
}

.movie-card strong {
  margin-top: 10px;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

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

.movie-card em {
  margin-top: 8px;
  color: var(--gray-600);
  font-style: normal;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  padding-top: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

.category-section {
  width: 100%;
  max-width: none;
  padding: 58px max(16px, calc((100% - var(--container)) / 2));
  background: linear-gradient(180deg, var(--white), var(--gray-50));
}

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

.category-card {
  position: relative;
  min-height: 240px;
  display: flex;
  justify-content: end;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 22px;
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18));
}

.category-card strong,
.category-card em,
.category-card span:not(.category-overlay) {
  position: relative;
  z-index: 1;
}

.category-card strong {
  font-size: 24px;
}

.category-card em {
  margin-top: 4px;
  font-style: normal;
  font-weight: 800;
  color: var(--green-100);
}

.category-card span:not(.category-overlay) {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
}

.ranking-band {
  width: 100%;
  max-width: none;
  padding: 64px max(16px, calc((100% - var(--container)) / 2));
  color: var(--white);
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

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

.ranking-grid .movie-card {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ranking-grid .movie-card strong,
.ranking-grid .movie-card em,
.ranking-grid .card-meta {
  color: var(--white);
}

.page-hero {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: linear-gradient(135deg, var(--green-900), var(--green-700), var(--teal-600));
  box-shadow: var(--shadow-soft);
}

.compact-hero {
  padding: 54px;
}

.dark-compact {
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.page-hero h1 {
  margin: 14px 0 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.overview-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.overview-covers img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}

.overview-info {
  display: flex;
  flex-direction: column;
}

.overview-info strong {
  font-size: 26px;
}

.overview-info em {
  margin-top: 4px;
  color: var(--green-600);
  font-style: normal;
  font-weight: 800;
}

.overview-info span {
  margin-top: 12px;
  color: var(--gray-600);
}

.toolbar-section {
  padding-top: 28px;
}

.search-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-filter-bar input {
  min-width: min(420px, 100%);
  flex: 1;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  outline: 0;
  padding: 12px 18px;
}

.search-filter-bar input:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 800;
}

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

.empty-result {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--gray-600);
}

.empty-result.is-visible {
  display: block;
}

.detail-main {
  background: var(--gray-50);
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: var(--gray-900);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 108px 0 58px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: center;
  margin-top: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

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

.detail-info h1 {
  margin: 16px 0 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
}

.detail-info p {
  max-width: 780px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.detail-tags {
  margin-top: 20px;
}

.player-section {
  padding: 42px 0 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--black);
  box-shadow: var(--shadow-hover);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: rgba(2, 6, 23, 0.36);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-symbol {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding-left: 5px;
  color: var(--green-700);
  background: var(--white);
  box-shadow: 0 20px 60px rgba(255, 255, 255, 0.22);
  font-size: 34px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 24px 0 36px;
}

.article-panel,
.info-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.article-panel h2,
.info-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.article-panel h2:not(:first-child) {
  margin-top: 28px;
}

.article-panel p {
  color: var(--gray-700);
  font-size: 17px;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px 10px;
  margin: 0;
}

.info-panel dt {
  color: var(--gray-500);
  font-weight: 800;
}

.info-panel dd {
  margin: 0;
  color: var(--gray-800);
}

.genre-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.related-section {
  padding-bottom: 70px;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: var(--gray-900);
}

.footer-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 42px 0;
}

.footer-brand {
  color: var(--white);
  font-size: 24px;
}

.footer-inner p {
  max-width: 680px;
  margin: 12px 0 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--white);
}

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

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

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

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

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

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

@media (max-width: 760px) {
  .header-inner {
    height: 68px;
  }

  .brand-subtitle,
  .desktop-nav {
    display: none;
  }

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

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

  .hero {
    height: 620px;
  }

  .hero-content {
    padding-top: 82px;
  }

  .ghost-button {
    margin: 12px 0 0;
  }

  .hero-actions {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .compact-hero {
    padding: 34px 24px;
  }

  .detail-hero-inner {
    padding-top: 92px;
  }

  .detail-layout {
    gap: 24px;
  }

  .detail-info p {
    font-size: 16px;
  }

  .article-panel,
  .info-panel {
    padding: 22px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
