:root {
  --page-bg: #f7faf8;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --green-50: #ecfdf5;
  --green-100: #d1fae5;
  --green-500: #10b981;
  --green-600: #059669;
  --green-700: #047857;
  --green-800: #065f46;
  --green-900: #064e3b;
  --teal-900: #134e4a;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbf9 0%, #ffffff 48%, #f4fbf6 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.7;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--green-800), var(--green-700), #0f766e);
  box-shadow: 0 10px 30px rgba(4, 120, 87, 0.28);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--green-900);
  background: #ffffff;
  box-shadow: inset 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 650;
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
  opacity: 0.95;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #bbf7d0;
  opacity: 1;
}

.nav-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 16px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

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

.hero {
  position: relative;
  min-height: 560px;
  color: #ffffff;
  overflow: hidden;
  background: linear-gradient(110deg, var(--green-900), var(--green-800) 48%, var(--teal-900));
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero::before {
  width: 420px;
  height: 420px;
  right: -130px;
  top: -120px;
  background: rgba(16, 185, 129, 0.28);
  filter: blur(6px);
}

.hero::after {
  width: 520px;
  height: 520px;
  left: -230px;
  bottom: -260px;
  background: rgba(45, 212, 191, 0.18);
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 560px;
  align-items: center;
  padding: 76px 0;
}

.hero-slide.active {
  display: flex;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.17;
  background-size: cover;
  background-position: center;
  filter: blur(4px) saturate(1.2);
  transform: scale(1.05);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.62fr);
  align-items: center;
  gap: 48px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #d1fae5;
  font-weight: 700;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 0 0 22px;
  max-width: 780px;
  font-size: clamp(42px, 8vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero h1 span {
  display: block;
  color: #86efac;
}

.hero p {
  max-width: 710px;
  margin: 0 0 30px;
  color: #ecfdf5;
  font-size: clamp(17px, 2vw, 22px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--green-500);
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: var(--green-600);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.38);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.hero-chips,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-chips a,
.chip-row a,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.13);
  color: #ecfdf5;
  font-size: 14px;
  font-weight: 650;
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.42);
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.1);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.64));
}

.hero-floating {
  position: absolute;
  left: -20px;
  bottom: 22px;
  z-index: 3;
  width: min(86%, 320px);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  background: rgba(6, 78, 59, 0.74);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-floating strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.hero-floating span {
  display: block;
  color: #d1fae5;
  font-size: 14px;
}

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

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

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

.main-section {
  padding: 72px 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.section-head p {
  margin: 0;
  max-width: 740px;
  color: var(--muted);
}

.text-link {
  color: var(--green-700);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(209, 250, 229, 0.85);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.38);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover img {
  transform: scale(1.08);
  opacity: 0.86;
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.46));
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 4;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #064e3b;
  background: #bbf7d0;
  font-weight: 900;
}

.card-body {
  padding: 17px;
}

.card-tags,
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-tags a {
  color: var(--green-700);
  font-weight: 800;
}

.card-body h2,
.card-body h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
  color: var(--green-600);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-800), var(--green-600));
  box-shadow: var(--soft-shadow);
}

.category-card::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -70px;
  top: -70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  position: relative;
  margin: 0;
  color: #ecfdf5;
  font-size: 14px;
}

.feature-block {
  background: linear-gradient(90deg, var(--green-700), var(--green-600), #0f766e);
  color: #ffffff;
}

.feature-block .section-head h2,
.feature-block .section-head p {
  color: #ffffff;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  margin-bottom: 26px;
}

.search-input,
.sort-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  background: #f9fafb;
}

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

.page-hero {
  color: #ffffff;
  background: linear-gradient(90deg, var(--green-800), var(--green-600), #0f766e);
  padding: 62px 0;
}

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

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #ecfdf5;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--green-700);
  font-weight: 700;
}

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

.detail-card,
.side-panel {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-card {
  overflow: hidden;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #050706;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.7));
}

.player-layer.is-hidden {
  display: none;
}

.play-trigger {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green-500);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.35);
  cursor: pointer;
  font-size: 28px;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 14px;
  color: #111827;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.18;
}

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

.detail-meta span,
.detail-meta a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--green-700);
  background: var(--green-50);
  font-size: 14px;
  font-weight: 700;
}

.detail-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--border);
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  margin: 0 0 16px;
  color: #374151;
}

.review-box {
  padding: 20px;
  border-left: 4px solid var(--green-500);
  border-radius: 16px;
  background: linear-gradient(90deg, #f0fdf4, #ecfeff);
}

.side-panel {
  position: sticky;
  top: 90px;
  padding: 20px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 120px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: -webkit-box;
  color: #111827;
  line-height: 1.35;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-item em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.side-item:hover strong {
  color: var(--green-600);
}

.site-footer {
  color: #d1d5db;
  background: #0f172a;
  padding: 48px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
}

.site-footer h2 {
  color: #ffffff;
  font-size: 18px;
  margin: 0 0 14px;
}

.site-footer p {
  margin: 0;
}

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

.footer-links a {
  color: #d1d5db;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
  color: #86efac;
}

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

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

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

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

  .hero-poster {
    max-width: 420px;
  }

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    padding: 46px 0 76px;
  }

  .hero-grid {
    gap: 28px;
  }

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

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

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

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

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

  .main-section {
    padding: 48px 0;
  }

  .detail-content {
    padding: 20px;
  }

  .side-item {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .side-item img {
    width: 104px;
    height: 70px;
  }
}
