:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.95);
  border-bottom: 1px solid var(--gray-200);
  backdrop-filter: blur(6px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  font-weight: 800;
  box-shadow: var(--shadow-md);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  transition: color 0.2s ease;
}

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

.brand:hover .brand-title,
.footer-brand:hover .brand-title {
  color: var(--emerald-600);
}

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

.nav-link {
  position: relative;
  padding: 23px 0;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

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

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

.nav-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 12px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-search:hover {
  color: var(--emerald-700);
  background: var(--emerald-50);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--gray-700);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  padding: 12px 18px 18px;
}

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

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

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--emerald-700);
  background: var(--emerald-50);
}

.hero-carousel {
  position: relative;
  height: 60vh;
  min-height: 480px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.92), rgb(0 0 0 / 0.56), rgb(0 0 0 / 0.16));
}

.hero-content {
  position: absolute;
  inset: auto 0 0;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 24px 70px;
  color: var(--white);
}

.hero-content-inner {
  max-width: 780px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--emerald-50);
  background: rgb(5 150 105 / 0.72);
  backdrop-filter: blur(4px);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 22px 42px rgb(0 0 0 / 0.35);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 26px;
  color: var(--gray-200);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
  text-shadow: 0 10px 22px rgb(0 0 0 / 0.42);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.button-primary {
  color: var(--white);
  background: var(--emerald-600);
  box-shadow: var(--shadow-lg);
}

.button-primary:hover {
  background: var(--emerald-700);
  transform: scale(1.04);
  box-shadow: var(--shadow-xl);
}

.button-secondary {
  color: var(--white);
  background: rgb(255 255 255 / 0.16);
  border: 1px solid rgb(255 255 255 / 0.28);
  backdrop-filter: blur(6px);
}

.button-secondary:hover {
  background: rgb(255 255 255 / 0.24);
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100% - 1280px) / 2 + 24px));
  bottom: 34px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.52);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.hero-search {
  display: flex;
  width: min(100%, 540px);
  margin-top: 26px;
  padding: 6px;
  border-radius: 16px;
  background: rgb(255 255 255 / 0.94);
  box-shadow: var(--shadow-xl);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 14px;
  background: transparent;
  color: var(--gray-900);
}

.hero-search button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  color: var(--white);
  background: var(--emerald-600);
  font-weight: 800;
  cursor: pointer;
}

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

.page-hero.dark {
  background: linear-gradient(135deg, var(--gray-900), #064e3b);
}

.page-hero-inner,
.content-shell,
.footer-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 24px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 740px;
  margin: 0;
  color: var(--emerald-50);
  font-size: 19px;
  line-height: 1.8;
}

.content-shell {
  padding-top: 48px;
  padding-bottom: 64px;
}

.section-block {
  margin-bottom: 64px;
}

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

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-wrap h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
}

.section-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--emerald-700);
  background: var(--emerald-50);
  font-weight: 900;
}

.section-more {
  color: var(--emerald-600);
  font-weight: 800;
  white-space: nowrap;
}

.section-more span {
  display: inline-block;
  transition: transform 0.2s ease;
}

.section-more:hover span {
  transform: translateX(4px);
}

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
}

.movie-card.horizontal {
  display: flex;
  gap: 16px;
  min-height: 132px;
  padding: 0;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  background: var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.horizontal-cover {
  width: 210px;
  flex: 0 0 210px;
  border-radius: 14px 0 0 14px;
  box-shadow: none;
}

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

.movie-card:hover .card-cover img,
.category-card:hover img,
.related-card:hover img {
  transform: scale(1.1);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.62), transparent 60%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.play-hover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 42px;
  opacity: 0;
  text-shadow: 0 6px 20px rgb(0 0 0 / 0.45);
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--white);
  background: rgb(0 0 0 / 0.72);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
  box-shadow: var(--shadow-md);
}

.card-body {
  padding-top: 14px;
}

.horizontal .card-body {
  flex: 1;
  padding: 14px 18px 14px 0;
  min-width: 0;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--gray-900);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.card-title:hover,
.movie-card:hover .card-title {
  color: var(--emerald-600);
}

.card-line {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 0;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: var(--gray-500);
  font-size: 14px;
}

.card-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.card-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 10px;
  color: var(--emerald-700);
  background: var(--emerald-50);
  font-size: 12px;
  font-weight: 800;
}

.feature-band {
  margin-left: -24px;
  margin-right: -24px;
  padding: 44px 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--emerald-50), #f0fdfa);
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--gray-100);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

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

.category-media {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--gray-200);
}

.category-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.62), transparent 66%);
}

.category-media h2,
.category-media h3 {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  margin: 0;
  color: var(--white);
  font-size: 24px;
}

.category-body {
  padding: 18px;
}

.category-body p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.category-go {
  display: inline-flex;
  margin-top: 14px;
  color: var(--emerald-600);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  outline: 0;
  padding: 0 12px;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgb(16 185 129 / 0.12);
}

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

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

.breadcrumb {
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}

.breadcrumb-inner {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--gray-600);
  font-weight: 700;
}

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

.detail-grid {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 34px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 32px;
}

.detail-main,
.related-panel {
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: var(--white);
  background: rgb(0 0 0 / 0.18);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.76), rgb(0 0 0 / 0.16));
}

.player-button {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgb(5 150 105 / 0.92);
  box-shadow: 0 22px 45px rgb(0 0 0 / 0.35);
  font-size: 34px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-overlay:hover .player-button {
  transform: scale(1.06);
  background: var(--emerald-700);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--white);
  background: rgb(17 24 39 / 0.88);
  text-align: center;
}

.player-message.is-visible {
  display: block;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
}

.detail-tags {
  margin-bottom: 28px;
}

.prose-section {
  margin-top: 28px;
}

.prose-section h2 {
  margin: 0 0 12px;
  color: var(--gray-900);
  font-size: 22px;
}

.prose-section p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.9;
}

.review-box {
  border-left: 4px solid var(--emerald-600);
  border-radius: 0 14px 14px 0;
  background: var(--gray-50);
  padding: 20px;
}

.related-panel {
  align-self: start;
  position: sticky;
  top: 88px;
  padding: 22px;
}

.related-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

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

.related-card {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.related-card img {
  width: 132px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--gray-200);
  flex: 0 0 132px;
  transition: transform 0.3s ease;
}

.related-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 15px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.related-card:hover h3 {
  color: var(--emerald-600);
}

.related-card p {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
}

.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding-top: 46px;
  padding-bottom: 36px;
}

.footer-brand .brand-title {
  color: var(--white);
}

.footer-brand .brand-subtitle {
  color: var(--gray-400);
}

.footer-main p {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--gray-400);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  font-weight: 700;
}

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

.footer-bottom {
  border-top: 1px solid rgb(255 255 255 / 0.08);
  padding: 18px 24px;
  color: var(--gray-500);
  text-align: center;
  font-size: 14px;
}

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

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

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

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

  .related-panel {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: inline-block;
  }

  .nav-shell {
    padding: 0 16px;
  }

  .hero-carousel {
    height: 68vh;
    min-height: 540px;
  }

  .hero-content {
    padding: 0 18px 58px;
  }

  .hero-dots {
    left: 18px;
    bottom: 24px;
  }

  .hero-search {
    flex-direction: column;
    gap: 8px;
  }

  .hero-search input {
    min-height: 42px;
  }

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

  .movie-card.horizontal {
    display: block;
  }

  .horizontal-cover {
    width: 100%;
    border-radius: 14px 14px 0 0;
  }

  .horizontal .card-body {
    padding: 14px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .footer-shell {
    display: grid;
  }
}

@media (max-width: 560px) {
  .brand-title {
    font-size: 17px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .hero-carousel {
    min-height: 500px;
  }

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

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-content {
    padding: 22px;
  }

  .detail-grid,
  .content-shell,
  .page-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .related-card img {
    width: 112px;
    flex-basis: 112px;
  }
}
