:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --teal-500: #14b8a6;
  --amber-50: #fffbeb;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-xl: 28px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, #ffffff 0%, #f8fffc 45%, #ffffff 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--emerald-100);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--emerald-700);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.3);
  font-size: 13px;
}

.brand-text {
  font-size: clamp(18px, 2.2vw, 24px);
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--emerald-700), var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  color: var(--gray-700);
  font-weight: 700;
  transition: color 0.25s ease;
}

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

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 14px;
  padding: 8px 12px;
  color: var(--emerald-700);
  background: var(--emerald-50);
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

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

.mobile-nav a {
  padding: 11px 14px;
  border-radius: 14px;
  color: var(--gray-700);
  background: var(--emerald-50);
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 660px;
  background: linear-gradient(135deg, var(--emerald-100), #f0fdfa 52%, var(--amber-50));
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image: linear-gradient(rgba(17, 24, 39, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(17, 24, 39, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(0deg, #ffffff, rgba(255, 255, 255, 0));
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, var(--container));
  min-height: 660px;
  margin: 0 auto;
  display: grid;
  align-items: center;
}

.hero-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: 54px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--emerald-100);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero h1 {
  margin: 0 0 6px;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, var(--emerald-700), var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.18;
}

.hero p {
  max-width: 660px;
  margin: 0 0 30px;
  color: var(--gray-700);
  font-size: clamp(17px, 2vw, 21px);
}

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

.button-primary,
.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button-primary {
  color: var(--white);
  background: var(--emerald-600);
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.28);
}

.button-primary:hover,
.button-outline:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button-outline {
  color: var(--emerald-700);
  background: rgba(255, 255, 255, 0.86);
  border: 2px solid var(--emerald-600);
}

.hero-art {
  position: relative;
  justify-self: end;
  width: min(100%, 380px);
  border-radius: 32px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0.65));
}

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

.hero-art span {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 20px;
  color: var(--white);
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 0;
  bottom: 64px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.26);
}

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

.section {
  padding: 72px 0;
}

.section-compact {
  padding: 52px 0;
}

.section-tint {
  background: linear-gradient(90deg, rgba(236, 253, 245, 0.8), rgba(240, 253, 250, 0.8), rgba(255, 251, 235, 0.58));
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  margin: 12px auto 0;
  color: var(--gray-500);
  font-size: 17px;
}

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

.category-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--emerald-100);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-pill:hover,
.movie-card:hover,
.category-card:hover,
.ranking-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--gray-100);
}

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

.movie-card:hover .movie-poster img,
.ranking-row:hover img,
.category-card:hover img {
  transform: scale(1.06);
}

.year-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: var(--emerald-600);
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, #f59e0b, var(--emerald-600));
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.movie-info h3 a:hover,
.ranking-content h2 a:hover {
  color: var(--emerald-600);
}

.movie-info p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--gray-500);
  font-size: 14px;
}

.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.movie-meta span,
.tag-row span {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 12px;
  font-weight: 700;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--emerald-700);
  background: var(--emerald-50);
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 22px;
  overflow-x: auto;
  padding: 0 0 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

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

.page-hero,
.detail-hero {
  padding: 58px 0;
  background: linear-gradient(135deg, var(--emerald-50), #f0fdfa 55%, var(--amber-50));
}

.small-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--gray-500);
  font-size: 14px;
}

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

.filter-bar,
.search-panel {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin-top: 24px;
}

.filter-bar input,
.search-panel input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--emerald-100);
  border-radius: 999px;
  outline: none;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

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

.search-panel button {
  min-width: 110px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--emerald-600);
  font-weight: 800;
}

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 190px;
  overflow: hidden;
}

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

.category-card-body {
  padding: 24px;
}

.category-card-body span {
  color: var(--emerald-600);
  font-weight: 800;
}

.category-card-body h2 {
  margin: 5px 0 8px;
  font-size: 26px;
}

.category-card-body p {
  margin: 0;
  color: var(--gray-500);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 94px 58px minmax(0, 1fr) 74px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-cover {
  overflow: hidden;
  border-radius: 14px;
}

.ranking-cover img {
  width: 94px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ranking-number {
  color: var(--emerald-600);
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}

.ranking-content h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.ranking-content p {
  margin: 0 0 12px;
  color: var(--gray-500);
}

.score-badge {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  font-weight: 900;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
}

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

.detail-copy h1 {
  margin-bottom: 16px;
}

.detail-one-line {
  margin: 0 0 20px;
  color: var(--gray-700);
  font-size: 20px;
}

.detail-meta {
  margin-bottom: 16px;
}

.tag-row-large span {
  padding: 7px 12px;
  font-size: 13px;
}

.detail-copy .button-primary {
  margin-top: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow-lg);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--emerald-700);
  background: var(--white);
  box-shadow: var(--shadow-md);
  font-size: 30px;
}

.player-overlay strong {
  max-width: min(80%, 760px);
  font-size: clamp(22px, 4vw, 40px);
  text-align: center;
}

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

.text-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.text-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

.search-results {
  display: grid;
  gap: 16px;
}

.search-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.search-item img {
  width: 86px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.search-item h2 {
  margin: 0 0 6px;
  font-size: 21px;
}

.search-item p {
  margin: 0 0 10px;
  color: var(--gray-500);
}

.empty-state {
  padding: 30px;
  border-radius: var(--radius-lg);
  color: var(--gray-500);
  background: var(--gray-50);
  text-align: center;
}

.site-footer {
  padding: 44px 0;
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.76);
}

.footer-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 30px;
}

.footer-brand {
  margin-bottom: 10px;
  color: var(--white);
  font-size: 22px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

[hidden] {
  display: none !important;
}

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

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

  .hero-slide,
  .detail-layout,
  .detail-text-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-grid,
  .hero {
    min-height: 820px;
  }

  .hero-slide {
    gap: 28px;
    align-content: center;
  }

  .hero-art {
    justify-self: start;
    width: min(100%, 300px);
  }

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

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

  .brand-text {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero,
  .hero-grid {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-art {
    width: 230px;
  }

  .hero-dots {
    bottom: 34px;
  }

  .section {
    padding: 50px 0;
  }

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

  .ranking-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .ranking-cover img {
    width: 74px;
  }

  .ranking-number,
  .score-badge {
    display: none;
  }

  .filter-bar,
  .search-panel {
    flex-direction: column;
  }

  .search-panel button {
    min-height: 50px;
  }

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