:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #10b981;
  --accent-2: #f59e0b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.site-header.is-scrolled {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.36);
}

.brand-text {
  font-size: 1.25rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
  font-size: 0.95rem;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: #6ee7b7;
  border-bottom-color: rgba(16, 185, 129, 0.8);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
}

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

.mobile-link {
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--soft);
}

.mobile-link:hover {
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  min-height: min(85vh, 820px);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.1)),
    linear-gradient(0deg, #020617, transparent 44%);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 40px;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 0.9rem;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.4rem, 8vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 640px;
  color: var(--soft);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 30px;
  color: var(--soft);
}

.hero-meta span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
  padding: 8px 12px;
  border-radius: 999px;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.34);
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-arrow:hover {
  background: rgba(16, 185, 129, 0.55);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #10b981;
}

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

.section.compact {
  padding: 42px 0;
}

.section-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.48));
  box-shadow: var(--shadow);
}

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

.section-head h1,
.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.lead {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.category-tile {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.26), transparent 46%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.48);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 1.45rem;
}

.category-tile p {
  color: var(--soft);
  line-height: 1.7;
  margin: 0 0 18px;
}

.category-tile span {
  color: #6ee7b7;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px;
  gap: 14px;
  margin-bottom: 26px;
}

.search-box,
.filter-select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #64748b;
}

.filter-select {
  padding: 0 14px;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 56%);
  opacity: 0.88;
}

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.88);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.rating-chip,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.92);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: rgba(16, 185, 129, 0.92);
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  margin: 0 0 9px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.tag-row span {
  color: var(--soft);
  background: rgba(51, 65, 85, 0.74);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.75rem;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 0.82rem;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 48px 92px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  border-color: rgba(16, 185, 129, 0.46);
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  font-weight: 900;
}

.ranking-item img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-item h2 {
  margin: 0 0 7px;
  font-size: 1rem;
}

.ranking-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.score {
  color: #fbbf24;
  font-weight: 900;
}

.page-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 30px;
}

.page-hero h1 {
  max-width: 820px;
  margin: 14px 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  line-height: 1.8;
  font-size: 1.08rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a:hover {
  color: #6ee7b7;
}

.detail-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 70px;
}

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

.player-card,
.info-card,
.related-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  color: #fff;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
}

.player-cover span {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 20px 48px rgba(16, 185, 129, 0.36);
  font-size: 2rem;
}

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

.player-title {
  padding: 22px;
}

.player-title h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.player-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.info-card {
  padding: 24px;
}

.info-card h2,
.related-card h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.info-list {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.info-list strong {
  color: var(--text);
}

.article-block {
  margin-top: 26px;
}

.article-block h2 {
  font-size: 1.55rem;
  margin: 0 0 12px;
}

.article-block p {
  color: var(--soft);
  line-height: 2;
  margin: 0 0 18px;
}

.related-card {
  margin-top: 26px;
  padding: 24px;
}

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

.compact-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.48);
}

.compact-card:hover {
  border-color: rgba(16, 185, 129, 0.42);
}

.compact-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card span {
  font-weight: 800;
  line-height: 1.35;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.84);
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

.site-footer h2 {
  font-size: 1rem;
  margin: 0 0 12px;
}

.site-footer a {
  display: block;
  color: var(--muted);
  padding: 5px 0;
}

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: #64748b;
  padding: 20px 0 28px;
  font-size: 0.9rem;
}

.empty-state {
  display: none;
  color: var(--muted);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

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

  .menu-button {
    display: block;
  }

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

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

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

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

  .search-box {
    grid-column: 1 / -1;
  }

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

@media (max-width: 680px) {
  .hero {
    min-height: 720px;
  }

  .hero-arrow {
    display: none;
  }

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

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .section-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .section-head {
    display: block;
  }

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

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

  .ranking-item {
    grid-template-columns: 42px 76px 1fr;
  }

  .ranking-item .score {
    grid-column: 3;
  }

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