:root {
  --bg: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --green-900: #14532d;
  --green-800: #166534;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-300: #86efac;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--green-900), var(--green-800));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(20, 83, 45, 0.24);
}

.nav-shell {
  display: flex;
  align-items: center;
  min-height: 68px;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #052e16;
  background: linear-gradient(135deg, var(--green-300), #ffffff);
  font-size: 17px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35), 0 10px 22px rgba(0,0,0,0.16);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 4px;
  font-size: 12px;
  color: #bbf7d0;
}

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

.nav-link {
  color: #dcfce7;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
}

.nav-link.is-active {
  font-weight: 700;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-search input {
  width: 220px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(187, 247, 208, 0.22);
  background: rgba(20, 83, 45, 0.58);
  color: #ffffff;
  padding: 0 14px;
  outline: none;
}

.nav-search input::placeholder {
  color: #bbf7d0;
}

.nav-search button,
.nav-toggle {
  border: 0;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.2);
  color: #ffffff;
  min-width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
}

.nav-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 70vh;
  height: 720px;
  max-height: 820px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.82), rgba(0,0,0,0.44), rgba(0,0,0,0.10)),
    linear-gradient(0deg, rgba(0,0,0,0.70), rgba(0,0,0,0.08) 42%, rgba(0,0,0,0.42));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-copy {
  width: min(780px, 100%);
  color: #ffffff;
}

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

.hero h1,
.hero h2,
.page-hero h1,
.detail-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}

.hero-movie {
  margin-top: -6px;
}

.hero-movie a {
  color: #bbf7d0;
  text-decoration: none;
}

.hero p,
.page-hero p,
.detail-hero p {
  max-width: 760px;
  color: rgba(255,255,255,0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.hero-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  color: #dcfce7;
  background: rgba(20, 83, 45, 0.62);
  border: 1px solid rgba(134, 239, 172, 0.24);
  backdrop-filter: blur(10px);
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: var(--green-600);
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.35);
}

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

.btn-secondary {
  color: #064e3b;
  background: #dcfce7;
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.24);
}

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

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

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

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

.content-band {
  padding: 72px 0;
  background: #ffffff;
}

.soft-band {
  background: linear-gradient(180deg, #f3f4f6, #ffffff);
}

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

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.section-head p {
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  flex-shrink: 0;
  color: var(--green-700);
  font-weight: 800;
  text-decoration: none;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img,
.category-thumbs img,
.rank-cover img,
.detail-poster,
.side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img {
  transition: transform 0.4s ease, opacity 0.2s ease;
}

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

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.92);
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #064e3b;
  background: #dcfce7;
  font-weight: 900;
  font-size: 13px;
}

.card-body {
  padding: 18px;
}

.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.card-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 900;
}

.card-body h3 a,
.rank-copy h2 a {
  color: var(--text);
  text-decoration: none;
}

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

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

.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row a,
.tag-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #166534;
  background: #dcfce7;
  font-size: 13px;
  text-decoration: none;
}

.category-stack {
  display: grid;
  gap: 48px;
}

.category-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.category-heading h3 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 900;
}

.category-heading p {
  color: var(--muted);
}

.category-heading a {
  flex-shrink: 0;
  color: var(--green-700);
  font-weight: 800;
  text-decoration: none;
}

.page-hero,
.detail-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  background-color: #111827;
  overflow: hidden;
}

.compact-hero {
  min-height: 300px;
  background:
    radial-gradient(circle at 18% 20%, rgba(34,197,94,0.28), transparent 30%),
    linear-gradient(135deg, #052e16, #14532d 55%, #111827);
}

.page-hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.78), rgba(0,0,0,0.36));
}

.page-hero-content,
.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 70px 0;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255,255,255,0.82);
  font-size: 14px;
}

.breadcrumbs a {
  color: #bbf7d0;
  text-decoration: none;
}

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

.category-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.category-card a {
  color: inherit;
  text-decoration: none;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  height: 126px;
  background: #111827;
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-card-body p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.category-card-body span {
  color: var(--green-700);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 220px;
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.wide-filter {
  grid-template-columns: minmax(0, 1.4fr) 180px 180px 220px;
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #374151;
  font-weight: 800;
  font-size: 14px;
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 13px;
  padding: 0 12px;
  color: #111827;
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.detail-hero {
  min-height: 520px;
}

.detail-intro {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
}

.detail-poster {
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.38);
}

.detail-meta {
  margin: 18px 0 8px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 56px 0 12px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.10), rgba(0,0,0,0.48));
  cursor: pointer;
  z-index: 3;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.95);
  font-size: 34px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.32);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
  background: var(--green-700);
}

.play-overlay.is-hidden {
  display: none;
}

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

.text-panel h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.text-panel p {
  color: #374151;
  line-height: 1.9;
  font-size: 16px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.info-list div {
  padding: 14px;
  border-radius: 14px;
  background: #f3f4f6;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.info-list dd {
  margin: 0;
  color: #111827;
  font-weight: 800;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 92px;
}

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

.side-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.side-card img {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
}

.side-card strong {
  display: block;
  color: #111827;
  line-height: 1.35;
  margin-bottom: 6px;
}

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

.related-section {
  padding-top: 36px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 140px 58px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #064e3b;
  background: #dcfce7;
  font-weight: 900;
}

.rank-copy h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.rank-copy p {
  color: #4b5563;
  line-height: 1.65;
  margin-bottom: 10px;
}

[hidden] {
  display: none !important;
}

.site-footer {
  margin-top: 70px;
  padding-top: 56px;
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #030712);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 1.2fr;
  gap: 42px;
}

.footer-brand p {
  max-width: 460px;
  color: #9ca3af;
  line-height: 1.8;
  margin-top: 18px;
}

.footer-logo .brand-mark {
  width: 34px;
  height: 34px;
}

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

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

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

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
}

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

.footer-bottom {
  margin-top: 40px;
  padding: 22px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  color: #6b7280;
}

@media (max-width: 1080px) {
  .site-nav {
    gap: 12px;
  }

  .nav-search input {
    width: 180px;
  }

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

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

  .detail-side {
    position: static;
  }

  .filter-panel,
  .wide-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
    min-height: 64px;
    padding: 12px 0;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 0;
  }

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

  .nav-link {
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .nav-search {
    order: 4;
    width: 100%;
  }

  .nav-search input {
    width: 100%;
    flex: 1;
  }

  .hero {
    height: 650px;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-hero h1 {
    font-size: clamp(34px, 10vw, 54px);
  }

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

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

  .detail-poster {
    width: min(100%, 360px);
  }

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

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

  .rank-number {
    position: absolute;
    margin-left: 8px;
    margin-top: 8px;
    width: 42px;
    height: 42px;
  }
}

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

  .brand-copy strong {
    font-size: 18px;
  }

  .movie-grid.four-col,
  .movie-grid,
  .movie-grid.three-col,
  .featured-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .content-section,
  .content-band {
    padding: 48px 0;
  }

  .hero {
    min-height: 620px;
    height: auto;
  }

  .hero-slide {
    min-height: 620px;
  }

  .hero-content {
    padding: 72px 0 96px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .category-thumbs {
    height: 110px;
  }

  .info-list {
    grid-template-columns: 1fr;
  }

  .play-overlay span {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }
}
