:root {
  color-scheme: dark;
  --night-950: #050806;
  --night-900: #0b120f;
  --night-850: #101a15;
  --night-800: #14211a;
  --night-700: #1b2b22;
  --night-600: #26392e;
  --night-400: #8ea399;
  --night-300: #bdd1c7;
  --night-200: #d9e6df;
  --moss-700: #42734d;
  --moss-600: #52905f;
  --moss-500: #63ad72;
  --moss-400: #82d891;
  --moss-300: #9ff0aa;
  --swamp-900: #101b14;
  --swamp-800: #162519;
  --swamp-700: #243329;
  --line: rgba(91, 130, 101, 0.25);
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
}

body.site-body {
  min-height: 100vh;
  background: var(--night-900);
  color: var(--night-200);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 15, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.site-nav {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--moss-300);
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--moss-600), #1f5f37);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 15px 40px rgba(82, 144, 95, 0.32);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

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

.brand-text small {
  margin-top: 4px;
  color: var(--night-400);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: var(--night-300);
  transition: color 0.2s ease, background 0.2s ease;
  text-decoration: none;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--moss-300);
}

.nav-search,
.mobile-search,
.search-page-form,
.filter-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-search input,
.mobile-search input,
.search-page-form input,
.filter-box input {
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 33, 26, 0.86);
  color: var(--night-200);
  padding: 11px 16px;
  outline: none;
}

.search-page-form input,
.filter-box input {
  width: min(100%, 620px);
  border-radius: 18px;
}

.nav-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  background: var(--moss-600);
  color: #fff;
  padding: 11px 18px;
  font-weight: 700;
}

.nav-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.primary-button:hover,
.rank-action:hover,
.category-preview-head a:hover,
.section-more:hover {
  background: var(--moss-500);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 10px;
  background: var(--night-300);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px 24px 22px;
  background: var(--night-850);
}

.mobile-nav.is-open {
  display: grid;
  gap: 14px;
}

.mobile-search {
  margin-top: 10px;
}

.hero-slider {
  position: relative;
  height: 72vh;
  min-height: 540px;
  max-height: 820px;
  overflow: hidden;
  background: var(--night-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 4s ease;
  transform: scale(1.03);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 6, 0.94) 0%, rgba(5, 8, 6, 0.72) 42%, rgba(5, 8, 6, 0.18) 100%),
    linear-gradient(0deg, var(--night-900) 0%, rgba(11, 18, 15, 0.18) 46%, rgba(11, 18, 15, 0.35) 100%);
}

.hero-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 92px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(159, 240, 170, 0.24);
  border-radius: 999px;
  color: var(--moss-300);
  background: rgba(82, 144, 95, 0.14);
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-copy h1,
.page-hero h1 {
  color: #fff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.hero-copy p,
.page-hero p {
  color: var(--night-200);
  font-size: 18px;
  line-height: 1.8;
  max-width: 760px;
}

.hero-meta,
.detail-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin: 22px 0 28px;
}

.hero-meta span,
.detail-meta span,
.meta-row span {
  border: 1px solid var(--line);
  background: rgba(20, 33, 26, 0.74);
  color: var(--night-300);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.section-more,
.rank-action,
.category-preview-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 22px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button,
.rank-action,
.category-preview-head a,
.section-more {
  background: var(--moss-600);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.ghost-button:hover,
.rank-action:hover,
.category-preview-head a:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(11, 18, 15, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--moss-300);
}

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

.section-heading h2 {
  color: var(--moss-300);
  font-size: 34px;
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 8px;
}

.section-heading p {
  color: var(--night-400);
  max-width: 720px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--night-800);
  border: 1px solid var(--line);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(159, 240, 170, 0.34);
  box-shadow: var(--shadow);
  background: var(--night-700);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--night-700);
}

.poster-link img,
.wide-thumb img,
.rank-cover img,
.player-cover-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.12) 58%, rgba(0, 0, 0, 0) 100%);
}

.poster-title {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  color: #fff;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--moss-600);
  color: #fff;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.movie-card-body,
.wide-info {
  padding: 16px;
}

.movie-title {
  display: block;
  color: var(--night-100, #f3fbf6);
  text-decoration: none;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
  margin-bottom: 8px;
}

.movie-title:hover {
  color: var(--moss-300);
}

.movie-card-body p,
.wide-info p,
.rank-info p {
  color: var(--night-400);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 210px;
}

.wide-thumb {
  position: relative;
  display: block;
  min-height: 100%;
  overflow: hidden;
  background: var(--night-700);
}

.play-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--moss-600);
  color: #fff;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 310px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

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

.category-tile,
.category-overview-card,
.category-preview-card,
.detail-card,
.side-card,
.rank-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(20, 33, 26, 0.96), rgba(15, 26, 19, 0.96));
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.18);
}

.category-tile,
.category-overview-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(159, 240, 170, 0.36);
}

.category-tile strong,
.category-overview-card h2 {
  color: var(--moss-300);
  font-size: 22px;
  font-weight: 900;
}

.category-tile span,
.category-overview-card p {
  color: var(--night-400);
  line-height: 1.7;
}

.category-overview-card span {
  color: var(--moss-300);
  font-weight: 800;
}

.category-preview-list {
  display: grid;
  gap: 28px;
}

.category-preview-card {
  padding: 24px;
}

.category-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-preview-head h3 {
  color: var(--moss-300);
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}

.category-preview-head p {
  color: var(--night-400);
}

.page-shell {
  min-height: calc(100vh - 72px);
}

.page-hero {
  position: relative;
  padding: 86px 0 44px;
  background:
    radial-gradient(circle at 12% 8%, rgba(82, 144, 95, 0.3), transparent 34%),
    linear-gradient(180deg, var(--night-850), var(--night-900));
  border-bottom: 1px solid var(--line);
}

.compact-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.filter-box,
.search-page-form {
  margin-top: 26px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 64px 160px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  border-color: rgba(159, 240, 170, 0.34);
}

.rank-number {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  background: rgba(82, 144, 95, 0.16);
  color: var(--moss-300);
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
}

.rank-cover {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: var(--night-700);
}

.detail-top {
  padding: 34px 0 72px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.86fr);
  gap: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--night-400);
  margin-bottom: 20px;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--moss-300);
  text-decoration: none;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  margin-bottom: 24px;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
  color: #fff;
  z-index: 3;
}

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

.player-cover-bg,
.player-cover-shade {
  position: absolute;
  inset: 0;
}

.player-cover-shade {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.32));
}

.player-cover-icon {
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--moss-600);
  box-shadow: 0 20px 50px rgba(82, 144, 95, 0.4);
  font-size: 32px;
  padding-left: 4px;
}

.detail-card,
.side-card {
  padding: 26px;
}

.detail-card h1 {
  color: #fff;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 900;
  margin-bottom: 18px;
}

.detail-meta {
  margin-bottom: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.tag-list span {
  border-radius: 999px;
  background: rgba(82, 144, 95, 0.16);
  color: var(--moss-300);
  padding: 7px 12px;
  font-size: 13px;
}

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

.detail-section h2,
.side-card h2,
.site-footer h2 {
  color: var(--moss-300);
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 14px;
}

.detail-section p,
.site-footer p {
  color: var(--night-300);
  line-height: 1.9;
}

.detail-side {
  min-width: 0;
}

.side-card {
  position: sticky;
  top: 96px;
}

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

.side-rec-list .movie-card-wide {
  grid-template-columns: 132px 1fr;
  min-height: 106px;
  border-radius: 16px;
}

.side-rec-list .wide-info {
  padding: 12px;
}

.side-rec-list .wide-info p,
.side-rec-list .meta-row {
  display: none;
}

.search-status {
  color: var(--night-300);
  margin-bottom: 22px;
  font-size: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--night-950);
  color: var(--night-300);
  padding: 52px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: var(--moss-300);
  font-weight: 900;
  font-size: 26px;
  margin-bottom: 14px;
}

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

.footer-links a {
  color: var(--night-400);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--moss-300);
}

.footer-bottom {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  padding: 22px 24px;
  text-align: center;
  color: var(--night-500, #6f8278);
}

[data-movie-card].is-hidden {
  display: none;
}

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

  .menu-button {
    display: inline-flex;
  }

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

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

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

  .side-card {
    position: static;
  }
}

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

  .brand-text small {
    display: none;
  }

  .hero-slider {
    min-height: 620px;
    height: 78vh;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(5, 8, 6, 0.96) 0%, rgba(5, 8, 6, 0.62) 62%, rgba(5, 8, 6, 0.2) 100%);
  }

  .hero-inner {
    align-items: flex-end;
    padding-bottom: 88px;
  }

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

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

  .hero-arrow {
    display: none;
  }

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

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

  .wide-grid,
  .category-tile-grid,
  .overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 44px 98px 1fr;
    gap: 12px;
  }

  .rank-action {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .detail-card,
  .side-card,
  .category-preview-card {
    padding: 18px;
  }

  .side-rec-list .movie-card-wide {
    grid-template-columns: 118px 1fr;
  }

  .mobile-search {
    flex-direction: column;
    align-items: stretch;
  }

  .mobile-search input,
  .mobile-search button {
    width: 100%;
  }
}
