:root {
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-300: #6ee7b7;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --amber-500: #f59e0b;
  --text-900: #111827;
  --text-700: #374151;
  --text-600: #4b5563;
  --text-500: #6b7280;
  --line: #d1fae5;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(4, 120, 87, 0.15);
  --shadow-strong: 0 28px 70px rgba(4, 120, 87, 0.28);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-900);
  background: linear-gradient(180deg, var(--emerald-50), #ffffff 34%, #ffffff);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(90deg, var(--emerald-700), #16a34a);
  box-shadow: 0 14px 34px rgba(6, 78, 59, 0.22);
}

.nav-shell {
  max-width: var(--max);
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

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

.nav-links a,
.mobile-nav a {
  color: #ffffff;
  border-radius: 12px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.nav-links a {
  padding: 10px 16px;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(255, 255, 255, 0.14);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
}

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--emerald-950);
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: brightness(0.44) saturate(1.04);
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 44, 34, 0.92), rgba(6, 95, 70, 0.62) 48%, rgba(2, 44, 34, 0.55));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 560px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 20px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 340px;
  gap: 44px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--emerald-100);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font-size: 14px;
  font-weight: 700;
}

.hero-title {
  margin: 18px 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-title span {
  color: var(--emerald-300);
}

.hero-desc {
  margin: 0 0 28px;
  color: var(--emerald-100);
  font-size: clamp(18px, 2.5vw, 23px);
  line-height: 1.7;
}

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

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

.button-primary {
  color: var(--emerald-800);
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
}

.button-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.button-ghost {
  color: var(--emerald-700);
  background: var(--emerald-50);
  box-shadow: inset 0 0 0 1px var(--line);
}

.button-primary:hover,
.button-soft:hover,
.button-ghost:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.hero-poster-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-strong);
  transform: rotate(1deg);
}

.hero-poster-card img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.hero-poster-meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(2, 44, 34, 0.72);
  backdrop-filter: blur(10px);
}

.hero-poster-meta strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hero-dot.active {
  width: 32px;
  background: #ffffff;
}

.quick-search {
  margin-top: -34px;
  position: relative;
  z-index: 5;
}

.search-card {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.search-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 0 20px;
  color: var(--text-900);
  background: #ffffff;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.search-input:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.12);
}

.section {
  padding: 68px 0;
}

.section.compact {
  padding: 42px 0;
}

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

.section-kicker {
  color: var(--emerald-600);
  font-weight: 900;
  letter-spacing: 0.16em;
  font-size: 13px;
  text-transform: uppercase;
}

.section-title,
.page-title {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-desc,
.page-desc {
  color: var(--text-600);
  line-height: 1.8;
  margin: 10px 0 0;
  max-width: 760px;
}

.feature-grid,
.category-grid,
.movie-grid,
.related-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.feature-card,
.category-card,
.movie-card,
.ranking-card,
.info-panel,
.article-panel,
.player-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.feature-card,
.category-card,
.article-panel,
.info-panel {
  padding: 24px;
}

.feature-card {
  text-align: center;
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--emerald-100);
  color: var(--emerald-700);
  font-size: 28px;
}

.category-card {
  position: relative;
  min-height: 184px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(4, 120, 87, 0.92), rgba(16, 185, 129, 0.72));
  z-index: 1;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62) saturate(1.1);
}

.category-card-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

.category-card h3,
.feature-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 900;
}

.category-card p,
.feature-card p {
  margin: 0;
  color: var(--text-600);
  line-height: 1.7;
}

.category-card p {
  color: var(--emerald-100);
}

.category-card:hover,
.movie-card:hover,
.ranking-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.movie-card {
  display: block;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  background: var(--emerald-900);
}

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

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

.badge,
.badge-soft,
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.badge {
  padding: 5px 9px;
  color: #ffffff;
  background: var(--emerald-600);
}

.badge-soft {
  padding: 5px 9px;
  color: var(--emerald-700);
  background: var(--emerald-50);
  box-shadow: inset 0 0 0 1px var(--line);
}

.poster-frame .badge.year {
  position: absolute;
  top: 10px;
  right: 10px;
}

.poster-frame .badge.type {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(17, 24, 39, 0.78);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-500);
  font-size: 13px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 28px 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--emerald-700);
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.filter-button.active,
.filter-button:hover {
  color: #ffffff;
  background: var(--emerald-600);
  border-color: var(--emerald-600);
}

.no-results {
  display: none;
  margin: 28px 0 0;
  padding: 22px;
  border-radius: var(--radius-md);
  color: var(--emerald-800);
  background: var(--emerald-50);
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 74px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-badge {
  width: 54px;
  height: 54px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-500));
  font-size: 20px;
}

.ranking-card img {
  width: 96px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 900;
}

.ranking-card p {
  margin: 0;
  color: var(--text-600);
  line-height: 1.65;
}

.page-hero {
  padding: 58px 0 34px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(110, 231, 183, 0.32), transparent 32%), linear-gradient(120deg, var(--emerald-900), var(--emerald-700));
}

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

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-card {
  padding: 14px;
}

.cinema-player {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
}

.cinema-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 44, 34, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.play-layer:hover {
  transform: scale(1.01);
}

.play-circle {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-800);
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
  font-size: 34px;
}

.play-title {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  font-weight: 900;
}

.cinema-player.is-playing .play-layer {
  opacity: 0;
  pointer-events: none;
}

.detail-aside .poster-frame img {
  aspect-ratio: 3 / 4;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.meta-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--text-600);
}

.meta-row strong {
  color: var(--text-900);
}

.article-panel {
  margin-top: 24px;
}

.article-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.article-panel p {
  color: var(--text-700);
  line-height: 1.9;
  margin: 0 0 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.site-footer {
  margin-top: 40px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--emerald-900), var(--emerald-950));
}

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--emerald-300);
  font-size: 18px;
}

.site-footer p,
.site-footer a {
  color: var(--emerald-100);
  line-height: 1.8;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(209, 250, 229, 0.15);
  padding: 18px 20px;
  text-align: center;
  color: var(--emerald-100);
}

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

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

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

  .nav-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: block;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 48px;
  }

  .hero-poster-card {
    display: none;
  }

  .search-card,
  .toolbar,
  .section-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .ranking-card {
    grid-template-columns: 54px 82px minmax(0, 1fr);
  }

  .ranking-card .button-ghost {
    grid-column: 2 / -1;
  }

  .ranking-card img {
    width: 82px;
    height: 110px;
  }

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

@media (max-width: 560px) {
  .container,
  .nav-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand {
    font-size: 18px;
  }

  .hero-slider,
  .hero-inner {
    min-height: 520px;
  }

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

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

  .ranking-card {
    grid-template-columns: 46px 72px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-badge {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .ranking-card img {
    width: 72px;
    height: 96px;
  }

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