:root {
  --page-bg: #f5f8f6;
  --text: #14221b;
  --muted: #65736b;
  --green: #16a34a;
  --green-dark: #166534;
  --emerald: #059669;
  --slate: #0f172a;
  --card: #ffffff;
  --line: rgba(20, 34, 27, 0.1);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(22, 163, 74, 0.12), transparent 34rem), var(--page-bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, #166534, #047857);
  box-shadow: 0 12px 30px rgba(4, 120, 87, 0.24);
}

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

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

.site-logo {
  font-size: 21px;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #bbf7d0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 650;
}

.main-nav a {
  padding: 9px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #dcfce7;
  border-color: #bbf7d0;
}

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

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

.home-hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #0f172a;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 46, 22, 0.94), rgba(6, 78, 59, 0.74) 44%, rgba(15, 23, 42, 0.35)), linear-gradient(0deg, rgba(15, 23, 42, 0.65), transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 52px;
  align-items: center;
  color: #ffffff;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #86efac;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  margin: 22px 0 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  font-size: 12px;
  font-weight: 750;
  padding: 5px 10px;
}

.hero-tags span {
  color: #dcfce7;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #059669);
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.32);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #86efac;
}

.quick-search {
  position: relative;
  z-index: 6;
  margin-top: -58px;
}

.search-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel label {
  color: var(--green-dark);
  font-weight: 900;
}

.search-panel input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(22, 163, 74, 0.5);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.search-panel button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--green);
  color: #ffffff;
  padding: 0 22px;
  font-weight: 850;
  cursor: pointer;
}

.quick-categories {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.quick-categories a,
.category-card,
.story-card,
.side-panel {
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--soft-shadow);
}

.quick-categories a {
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-categories a:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.quick-categories strong,
.quick-categories span {
  display: block;
}

.quick-categories strong {
  color: var(--green-dark);
  font-size: 17px;
}

.quick-categories span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.section-block {
  padding: 70px 0 0;
}

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

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading span {
  display: block;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading a,
.category-more {
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 850;
}

.section-heading.compact {
  align-items: start;
  display: block;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 160px;
  gap: 12px;
  margin-bottom: 22px;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #d1fae5;
}

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

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent 55%);
  opacity: 0.85;
}

.card-badge,
.card-duration {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 10px;
}

.card-badge {
  left: 12px;
  top: 12px;
  background: linear-gradient(135deg, #22c55e, #059669);
}

.card-duration {
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.72);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.28;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body em {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

.card-meta span {
  border-radius: 999px;
  background: #f0fdf4;
  padding: 4px 8px;
}

.tag-row {
  margin-top: auto;
}

.side-panel {
  padding: 22px;
  position: sticky;
  top: 88px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-radius: 16px;
}

.compact-card .card-cover {
  aspect-ratio: auto;
  height: 100%;
}

.compact-card .card-body strong {
  min-height: auto;
  font-size: 16px;
  -webkit-line-clamp: 1;
}

.compact-card .card-body em,
.compact-card .tag-row,
.compact-card .card-duration {
  display: none;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 46px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #dcfce7;
  color: var(--green-dark);
  font-weight: 900;
}

.ranking-row img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-text strong,
.rank-text em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.rank-text strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  -webkit-line-clamp: 1;
}

.rank-text em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-style: normal;
  -webkit-line-clamp: 2;
}

.rank-score {
  color: var(--green);
  font-size: 22px;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 82px;
  background: linear-gradient(135deg, #064e3b, #14532d 52%, #0f172a);
  color: #ffffff;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(134, 239, 172, 0.16);
  filter: blur(4px);
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.breadcrumb a::after {
  content: "/";
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.4);
}

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

.category-card {
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-head span,
.category-head em {
  display: block;
}

.category-head span {
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 900;
}

.category-head em {
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.mini-cover-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.mini-cover-row img {
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 14px;
  object-fit: cover;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
  color: #ffffff;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 46, 22, 0.94), rgba(15, 23, 42, 0.82) 48%, rgba(15, 23, 42, 0.45)), linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 55%);
}

.detail-head {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 40px 0;
}

.detail-head .breadcrumb {
  grid-column: 1 / -1;
  align-self: end;
  margin-bottom: 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.watch-player {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.26);
  aspect-ratio: 16 / 9;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.2));
  color: #ffffff;
  cursor: pointer;
}

.play-layer.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.play-ring {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #059669);
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.35);
  font-size: 30px;
}

.play-layer strong {
  font-size: 19px;
  letter-spacing: 0.08em;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 34px;
}

.story-card {
  padding: 26px;
}

.story-card h2 {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 900;
}

.story-card p {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 1.95;
}

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

.site-footer {
  margin-top: 80px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 34px;
  padding: 44px 0;
}

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

.site-footer p {
  max-width: 460px;
  color: #cbd5e1;
  line-height: 1.75;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1050px) {
  .main-nav {
    gap: 12px;
    font-size: 13px;
  }

  .hero-content,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .side-panel {
    display: none;
  }

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 18px;
    background: #166534;
    padding: 12px;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

  .quick-categories,
  .movie-grid,
  .featured-grid,
  .category-grid,
  .ranking-grid,
  .detail-content,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-head .breadcrumb {
    grid-column: auto;
  }

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

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

  .site-logo {
    font-size: 18px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-copy p {
    font-size: 15px;
  }

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

  .ranking-row {
    grid-template-columns: 38px 60px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }
}
