* {
  box-sizing: border-box;
}

:root {
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --teal-500: #14b8a6;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 16px 45px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 25px 80px rgba(4, 120, 87, 0.22);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(16, 185, 129, 0.18);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  min-height: 74px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--emerald-700), var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.desktop-nav a,
.mobile-nav a {
  transition: color 0.25s ease, background 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--emerald-600);
}

.header-cta,
.primary-button,
.secondary-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-cta,
.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.23);
}

.header-cta {
  padding: 10px 18px;
}

.primary-button {
  padding: 14px 24px;
}

.secondary-button {
  padding: 14px 24px;
  color: var(--emerald-700);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

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

.text-link {
  color: var(--emerald-700);
  font-weight: 800;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #ecfdf5;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--emerald-700);
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  max-width: 1280px;
  margin: 0 auto;
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(236, 253, 245, 0.8);
  font-weight: 700;
}

.hero-section {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  background: linear-gradient(135deg, #d1fae5 0%, #f0fdfa 45%, #fef3c7 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image: linear-gradient(rgba(6, 95, 70, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(6, 95, 70, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
}

.hero-slider {
  position: relative;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 70px 24px 120px;
}

.hero-slide {
  position: absolute;
  inset: 70px 24px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  align-items: center;
  gap: 56px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy {
  max-width: 720px;
}

.hero-eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald-700);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 14px;
}

.hero-copy h1 {
  margin: 22px 0 14px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, var(--emerald-800), var(--teal-500), var(--emerald-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  color: var(--gray-900);
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  font-size: 18px;
  color: var(--gray-700);
}

.hero-tags,
.tag-list,
.detail-meta,
.ranking-meta,
.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin: 24px 0 28px;
}

.hero-tags span,
.tag-list span,
.detail-meta span,
.ranking-meta span,
.movie-card-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--emerald-700);
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.22);
  font-size: 13px;
  font-weight: 700;
}

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

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(6, 78, 59, 0.42));
}

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

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 5;
}

.hero-arrow,
.hero-dot {
  border: 0;
  background: rgba(255, 255, 255, 0.84);
  color: var(--emerald-700);
  box-shadow: var(--shadow-sm);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: min(760px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(16, 185, 129, 0.22);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.hero-search input,
.filter-form input,
.filter-form select {
  width: 100%;
  border: 1px solid var(--gray-200);
  outline: 0;
  background: var(--white);
  color: var(--gray-900);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search input {
  border: 0;
  padding: 0 18px;
  background: transparent;
}

.hero-search input:focus,
.filter-form input:focus,
.filter-form select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 13px 24px;
  color: var(--white);
  font-weight: 800;
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 76px 24px;
}

.soft-section {
  max-width: none;
  padding-left: max(24px, calc((100% - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100% - 1280px) / 2 + 24px));
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.75), rgba(255, 255, 255, 0.95));
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 10px;
  color: var(--gray-900);
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.section-heading p,
.page-hero p,
.category-overview-head p {
  color: var(--gray-600);
  margin: 0;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(16, 185, 129, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(6, 78, 59, 0.78);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.movie-card-body {
  padding: 18px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.28;
}

.movie-card h3 a:hover,
.ranking-content h3 a:hover {
  color: var(--emerald-700);
}

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

.movie-card-meta span {
  color: var(--gray-600);
  background: var(--gray-100);
  border-color: transparent;
}

.movie-card-compact .movie-card-body {
  padding: 14px;
}

.movie-card-compact h3 {
  font-size: 16px;
}

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

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

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.1), rgba(6, 78, 59, 0.86));
  z-index: 1;
}

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

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

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

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

.home-ranking {
  max-width: 980px;
  margin: 0 auto;
}

.ranking-item {
  display: grid;
  grid-template-columns: 86px 56px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 185, 129, 0.14);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.ranking-cover {
  width: 86px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: #ecfdf5;
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-rank {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  font-weight: 900;
}

.ranking-content h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

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

.section-more {
  text-align: center;
  margin-top: 32px;
}

.page-hero,
.detail-hero {
  background: linear-gradient(135deg, #d1fae5 0%, #f0fdfa 55%, #fef3c7 100%);
}

.small-hero {
  padding: 82px 24px;
}

.page-hero-inner,
.detail-hero,
.detail-text-section,
.player-section {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero-inner {
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.filter-panel {
  margin: 0 0 34px;
  padding: 18px;
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 220px 220px;
  gap: 14px;
  align-items: end;
}

.filter-form label {
  display: grid;
  gap: 8px;
  color: var(--gray-700);
  font-weight: 800;
  font-size: 14px;
}

.filter-form input,
.filter-form select {
  height: 48px;
  border-radius: 14px;
  padding: 0 14px;
}

.category-overview-list {
  display: grid;
  gap: 34px;
}

.category-overview-block {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(16, 185, 129, 0.14);
  box-shadow: var(--shadow-sm);
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-overview-head h2 {
  margin: 12px 0 6px;
  font-size: 32px;
}

.detail-hero {
  padding: 42px 24px 70px;
}

.detail-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--gray-600);
  font-weight: 700;
}

.detail-crumbs a {
  color: var(--emerald-700);
}

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

.detail-copy h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
}

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

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

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

.detail-cover {
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 4;
  background: #ecfdf5;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.35);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #020617;
}

.player-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.42));
  transition: opacity 0.25s ease;
}

.player-shell.is-playing::after {
  opacity: 0;
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 999px;
  padding: 16px 26px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  box-shadow: 0 16px 45px rgba(5, 150, 105, 0.35);
  font-weight: 900;
}

.player-shell.is-playing .player-button {
  opacity: 0;
  pointer-events: none;
}

.player-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.player-status {
  position: absolute;
  left: 24px;
  bottom: 18px;
  z-index: 4;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

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

.detail-columns article {
  padding: 30px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(16, 185, 129, 0.14);
  box-shadow: var(--shadow-sm);
}

.detail-columns h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(16, 185, 129, 0.16);
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-inner p {
  margin: 16px 0 0;
  color: var(--gray-600);
  max-width: 440px;
}

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

.footer-links a {
  color: var(--gray-600);
  font-weight: 700;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 34px;
  color: var(--gray-500);
  font-weight: 700;
}

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

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

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

@media (max-width: 860px) {
  .desktop-nav,
  .header-cta {
    display: none;
  }

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

  .hero-section {
    min-height: 820px;
  }

  .hero-slider {
    min-height: 740px;
    padding-top: 46px;
  }

  .hero-slide {
    inset: 46px 24px 130px;
    grid-template-columns: 1fr;
    gap: 26px;
  }

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

  .hero-controls {
    bottom: 102px;
  }

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

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

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

  .ranking-item .text-link {
    grid-column: 3;
    justify-content: flex-start;
  }

  .ranking-cover {
    width: 70px;
  }

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

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

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

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

@media (max-width: 560px) {
  .header-inner {
    padding: 0 16px;
  }

  .site-logo,
  .footer-logo {
    font-size: 20px;
  }

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

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

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

  .content-section,
  .soft-section {
    padding: 56px 16px;
  }

  .small-hero,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .player-button {
    padding: 13px 18px;
  }
}
