:root {
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --green-300: #86efac;
  --green-50: #f0fdf4;
  --blue-50: #eff6ff;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--emerald-50), #ffffff 38%, #ffffff);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--emerald-700), #16a34a);
  box-shadow: 0 16px 38px rgba(4, 120, 87, 0.22);
}

.site-nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 12px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  padding: 10px;
}

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

.hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background: var(--emerald-900);
}

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

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

.hero-slide img,
.page-hero::before,
.detail-hero::before {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  filter: brightness(0.58) saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.92), rgba(6, 95, 70, 0.68) 48%, rgba(2, 44, 34, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  max-width: 1180px;
}

.hero-content > * {
  max-width: 680px;
}

.hero-kicker,
.kicker {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  color: var(--green-300);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-info p {
  margin: 0 0 28px;
  color: var(--emerald-100);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.card-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-action,
.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;
}

.primary-btn {
  padding: 15px 28px;
  background: #ffffff;
  color: var(--emerald-700);
  box-shadow: var(--soft-shadow);
}

.ghost-btn {
  padding: 15px 28px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-action:hover,
.text-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

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

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

.feature-strip,
.content-section,
.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: -56px;
  position: relative;
  z-index: 5;
}

.feature-card {
  border-radius: var(--radius);
  padding: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.feature-card strong {
  display: block;
  font-size: 22px;
  color: var(--emerald-800);
  margin-bottom: 8px;
}

.feature-card span {
  color: var(--muted);
}

.content-section {
  padding: 76px 0;
}

.soft-section {
  width: 100%;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(180deg, var(--green-50), #ffffff);
}

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

.section-head h2 {
  margin: 8px 0;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-action,
.text-link {
  padding: 12px 18px;
  color: var(--emerald-700);
  background: var(--emerald-50);
  border: 1px solid rgba(4, 120, 87, 0.18);
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.18;
  overflow: hidden;
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0.72));
}

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #ffffff;
}

.score {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.9);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(2, 44, 34, 0.82);
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.card-meta span {
  color: var(--emerald-700);
  background: var(--emerald-50);
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 54px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-radius: 22px;
  color: #ffffff;
  background: var(--emerald-900);
  box-shadow: var(--soft-shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  filter: brightness(0.58);
  transition: transform 0.4s ease;
}

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

.category-tile span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  font-size: 20px;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: var(--emerald-900);
}

.page-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
}

.compact-hero {
  min-height: 300px;
}

.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image), linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
  background-size: cover;
  background-position: center;
  filter: brightness(0.5) saturate(1.1);
}

.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.9), rgba(2, 44, 34, 0.56));
}

.page-hero > div {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.filter-panel,
.search-panel-large {
  display: grid;
  gap: 18px;
  margin-bottom: 30px;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.search-panel-large {
  padding: 30px;
}

.filter-panel input,
.search-panel-large input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 15px 20px;
  outline: none;
  color: var(--text);
  background: #f8fafc;
}

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

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tags button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--emerald-800);
  background: var(--emerald-50);
  cursor: pointer;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  padding: 22px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.category-overview-card h2 {
  margin: 10px 0;
  font-size: 28px;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.8;
}

.detail-hero {
  min-height: 540px;
  display: flex;
  align-items: center;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 50px 0;
}

.breadcrumb,
.breadcrumb-sep {
  color: var(--emerald-100);
  font-weight: 700;
}

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

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  max-width: 780px;
}

.detail-info p {
  max-width: 820px;
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.14);
}

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

.player-column {
  min-width: 0;
}

.watch-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.watch-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-button {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.28), rgba(2, 6, 23, 0.36));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-button span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--emerald-700);
  background: #ffffff;
  font-size: 36px;
  box-shadow: var(--shadow);
}

.watch-player.is-playing .player-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-text-card,
.side-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-text-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-text-card p {
  margin: 0 0 16px;
  color: #334155;
  line-height: 2;
}

.detail-text-card p:last-child {
  margin-bottom: 0;
}

.side-card dl {
  margin: 0;
}

.side-card dl div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.side-card dl div:last-child {
  border-bottom: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.side-tags span {
  margin-bottom: 4px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 54px 0 34px;
}

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

.footer-grid h3 {
  margin: 0 0 16px;
  color: var(--green-300);
}

.footer-grid a:not(.footer-logo) {
  display: block;
  color: var(--emerald-100);
  margin: 10px 0;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
  color: var(--emerald-100);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

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

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

  .detail-layout,
  .footer-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-nav-wrap {
    height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: var(--emerald-800);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .feature-strip,
  .movie-grid,
  .home-grid,
  .ranking-list,
  .category-grid,
  .detail-heading,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: grid;
  }

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

  .category-overview-card {
    padding: 18px;
  }

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