:root {
  color-scheme: dark;
  --night-950: #080b10;
  --night-900: #0d1117;
  --night-850: #121821;
  --night-800: #161b22;
  --night-700: #21262d;
  --night-600: #30363d;
  --night-400: #8b949e;
  --night-300: #b1bac4;
  --night-100: #d0d7de;
  --moss-700: #3a5937;
  --moss-600: #4d7348;
  --moss-500: #648d5e;
  --moss-400: #7aaa73;
  --moss-300: #96c48f;
  --swamp-900: #121a16;
  --swamp-800: #1a2620;
  --swamp-700: #243329;
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 12px 34px rgba(0, 0, 0, 0.28);
  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;
  background:
    radial-gradient(circle at 18% 0%, rgba(77, 115, 72, 0.25), transparent 34rem),
    linear-gradient(180deg, var(--night-900), var(--night-950) 45%, var(--swamp-900));
  color: var(--night-100);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(36, 51, 41, 0.95);
  background: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--moss-300);
  background: linear-gradient(135deg, var(--swamp-800), var(--moss-700));
  box-shadow: inset 0 0 0 1px rgba(150, 196, 143, 0.22);
  font-weight: 800;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  color: var(--moss-300);
  font-size: 19px;
  line-height: 1;
}

.brand-text em {
  color: var(--night-400);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link,
.mobile-link {
  color: var(--night-300);
  font-weight: 600;
  transition: color 0.25s ease, transform 0.25s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: var(--night-800);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--night-100);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--swamp-700);
  background: var(--night-800);
  padding: 14px 24px 20px;
}

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

.hero-carousel {
  position: relative;
  min-height: clamp(520px, 72vh, 780px);
  overflow: hidden;
  background: var(--night-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 0.9s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 11, 16, 0.96), rgba(13, 17, 23, 0.72) 46%, rgba(13, 17, 23, 0.18)),
    linear-gradient(0deg, var(--night-900), rgba(13, 17, 23, 0.1) 46%, rgba(13, 17, 23, 0.25));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: clamp(520px, 72vh, 780px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 86px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(150, 196, 143, 0.25);
  border-radius: 999px;
  color: var(--moss-300);
  background: rgba(26, 38, 32, 0.68);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1 {
  max-width: 780px;
  margin: 18px 0 16px;
  color: #ffffff;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--night-300);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.7;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--night-100);
  background: rgba(33, 38, 45, 0.78);
  border: 1px solid rgba(139, 148, 158, 0.18);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--moss-600), var(--moss-500));
  box-shadow: 0 12px 30px rgba(77, 115, 72, 0.35);
}

.btn.ghost {
  color: var(--night-100);
  border-color: rgba(150, 196, 143, 0.25);
  background: rgba(22, 27, 34, 0.65);
}

.btn.link {
  color: var(--moss-300);
  background: transparent;
  padding: 0 8px;
}

.btn.block {
  width: 100%;
  margin-top: 12px;
}

.hero-control {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(150, 196, 143, 0.2);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(13, 17, 23, 0.72);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(177, 186, 196, 0.35);
  cursor: pointer;
}

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

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

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

.section-heading h2 {
  margin: 0;
  color: var(--moss-300);
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading a,
.text-link {
  color: var(--moss-300);
  font-weight: 800;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading.compact h2 {
  font-size: 26px;
}

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

.category-card,
.category-overview-card,
.article-card,
.related-panel,
.filter-panel,
.detail-side,
.player-card {
  border: 1px solid rgba(36, 51, 41, 0.95);
  border-radius: 22px;
  background: rgba(22, 27, 34, 0.82);
  box-shadow: var(--shadow-card);
}

.category-card {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.58;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 11, 16, 0.9), transparent 72%);
}

.category-card span {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.category-card strong {
  color: #ffffff;
  font-size: 19px;
}

.category-card em {
  color: var(--night-300);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  padding: 16px;
  margin-bottom: 28px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--night-300);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(139, 148, 158, 0.18);
  border-radius: 14px;
  outline: none;
  color: var(--night-100);
  background: var(--night-900);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(150, 196, 143, 0.72);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(22, 27, 34, 0.86);
  border: 1px solid rgba(36, 51, 41, 0.72);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(150, 196, 143, 0.42);
  background: var(--night-700);
}

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

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

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(77, 115, 72, 0.92);
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.movie-card-body strong {
  color: #ffffff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.movie-line {
  color: var(--night-400);
  font-size: 13px;
  line-height: 1.5;
}

.movie-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 28px;
}

.stacked-panels {
  display: grid;
  gap: 28px;
}

.rank-list,
.wide-list {
  display: grid;
  gap: 12px;
}

.rank-row,
.wide-card {
  display: grid;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(36, 51, 41, 0.72);
  border-radius: 18px;
  background: rgba(22, 27, 34, 0.82);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.rank-row:hover,
.wide-card:hover {
  transform: translateY(-2px);
  border-color: rgba(150, 196, 143, 0.42);
  background: var(--night-700);
}

.rank-row {
  grid-template-columns: 54px 82px minmax(0, 1fr) 88px;
  padding: 10px 14px 10px 10px;
}

.rank-number {
  color: var(--moss-300);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img,
.wide-card img {
  width: 100%;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rank-info strong,
.wide-card strong {
  color: #ffffff;
}

.rank-info em,
.rank-info small,
.wide-card em,
.wide-card small {
  color: var(--night-400);
  font-style: normal;
  line-height: 1.45;
}

.rank-info small,
.wide-card small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-score {
  justify-self: end;
  color: var(--moss-300);
  font-size: 13px;
  font-weight: 900;
}

.wide-card {
  grid-template-columns: 118px minmax(0, 1fr);
  padding: 10px;
}

.wide-card img {
  height: 78px;
}

.wide-card span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 74px;
  border-bottom: 1px solid var(--swamp-700);
  background:
    radial-gradient(circle at 20% 10%, rgba(150, 196, 143, 0.2), transparent 28rem),
    linear-gradient(135deg, rgba(22, 27, 34, 0.88), rgba(18, 26, 22, 0.96));
}

.page-hero.slim {
  padding: 70px 0 58px;
}

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

.compact-actions {
  margin-top: 24px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
}

.category-overview-card img {
  width: 100%;
  height: 180px;
  border-radius: 16px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 4px 0 10px;
  color: #ffffff;
}

.category-overview-card p {
  color: var(--night-300);
  line-height: 1.7;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.mini-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--night-100);
  background: var(--night-700);
  font-size: 13px;
}

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

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

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

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

.player-card {
  padding: 12px;
  overflow: hidden;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.16));
  cursor: pointer;
}

.player-layer.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.big-play {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(77, 115, 72, 0.94);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  font-size: 36px;
  text-indent: 4px;
}

.player-layer strong {
  max-width: min(680px, 90%);
  text-align: center;
  font-size: clamp(20px, 3vw, 32px);
}

.detail-side {
  position: sticky;
  top: 90px;
  padding: 16px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.article-card,
.related-panel {
  padding: 28px;
}

.article-card h1 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

.article-card h2,
.related-panel h2 {
  margin: 28px 0 12px;
  color: var(--moss-300);
}

.article-card p {
  margin: 0 0 14px;
  color: var(--night-300);
  font-size: 16px;
  line-height: 1.9;
}

.movie-meta.large {
  margin-bottom: 18px;
}

.related-panel {
  align-self: start;
  position: sticky;
  top: 90px;
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid var(--swamp-700);
  background: rgba(22, 27, 34, 0.85);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 34px;
}

.footer-shell h2 {
  margin: 0 0 14px;
  color: var(--moss-300);
  font-size: 20px;
}

.footer-shell p,
.footer-shell a {
  color: var(--night-400);
  line-height: 1.75;
}

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

.footer-shell ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(36, 51, 41, 0.68);
  color: var(--night-500, #484f58);
  text-align: center;
  font-size: 13px;
}

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

@media (max-width: 1100px) {
  .category-grid,
  .poster-grid,
  .poster-grid.dense {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .two-column,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .related-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-content {
    padding-bottom: 90px;
  }

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

  .filter-panel,
  .detail-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .section-shell,
  .detail-top,
  .footer-shell,
  .copyright,
  .page-hero > div,
  .hero-content,
  .hero-control {
    width: min(100% - 24px, 1180px);
  }

  .brand-text em {
    display: none;
  }

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

  .poster-grid,
  .poster-grid.dense {
    gap: 12px;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-line {
    display: none;
  }

  .wide-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .article-card,
  .related-panel {
    padding: 20px;
  }
}
