:root {
  --dark-900: #060708;
  --dark-850: #080a0d;
  --dark-800: #0b0d10;
  --dark-700: #101419;
  --dark-650: #151a21;
  --dark-600: #151a21;
  --dark-500: #1a2129;
  --dark-400: #333d47;
  --primary-600: #d66d0f;
  --primary-500: #f5871f;
  --primary-400: #f79f3f;
  --text-100: #ffffff;
  --text-200: #e5e7eb;
  --text-300: #d1d5db;
  --text-400: #9ca3af;
  --text-500: #6b7280;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--dark-800);
  color: var(--text-300);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: var(--dark-500);
}

body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: var(--primary-500);
  border-radius: 999px;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(21, 26, 33, 0.95);
  border-bottom: 1px solid var(--dark-400);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-100);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo:hover,
.footer-logo:hover {
  color: var(--primary-400);
}

.logo-icon,
.footer-logo span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-500);
  color: #111;
  font-size: 14px;
  box-shadow: 0 0 26px rgba(245, 135, 31, 0.35);
}

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

.nav-link,
.mobile-link {
  color: var(--text-300);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--primary-500);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--dark-700);
  color: var(--text-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--dark-400);
  background: var(--dark-700);
}

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

.hero-slider {
  position: relative;
  min-height: 680px;
  height: 72vh;
  max-height: 820px;
  overflow: hidden;
  background: var(--dark-900);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(245, 135, 31, 0.18), transparent 30%),
    linear-gradient(90deg, #060708 0%, rgba(11, 13, 16, 0.92) 36%, rgba(11, 13, 16, 0.42) 66%, rgba(11, 13, 16, 0.88) 100%),
    linear-gradient(0deg, #0b0d10 0%, transparent 38%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 48%;
  width: min(1180px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  max-width: 1180px;
}

.hero-content > * {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--primary-500);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero-content h1,
.hero-content h2,
.inner-hero h1 {
  margin: 0;
  color: var(--text-100);
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-desc {
  margin: 22px 0 0;
  color: var(--text-300);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

.hero-tags {
  margin: 28px 0 0;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(245, 135, 31, 0.16);
  color: var(--primary-400);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--primary-500);
  color: #141414;
}

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

.btn-ghost {
  border: 1px solid var(--dark-400);
  background: rgba(16, 20, 25, 0.75);
  color: var(--text-100);
}

.btn-ghost:hover {
  border-color: var(--primary-500);
  color: var(--primary-400);
}

.btn.full {
  width: 100%;
  margin-top: 18px;
}

.hero-panel {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 32px;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr auto;
  gap: 18px;
  align-items: stretch;
}

.hero-search,
.filter-bar {
  display: flex;
  gap: 10px;
  background: rgba(16, 20, 25, 0.88);
  border: 1px solid var(--dark-400);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  width: 100%;
  border: 1px solid transparent;
  outline: none;
  border-radius: 12px;
  background: var(--dark-600);
  color: var(--text-100);
  padding: 12px 14px;
}

.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-500);
}

.hero-search button {
  border: 0;
  border-radius: 12px;
  background: var(--primary-500);
  color: #141414;
  padding: 0 18px;
  font-weight: 800;
}

.hero-mini-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hero-mini {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  background: rgba(16, 20, 25, 0.82);
  border: 1px solid var(--dark-400);
  border-radius: 16px;
  padding: 10px;
  color: var(--text-100);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-mini:hover {
  border-color: var(--primary-500);
  transform: translateY(-2px);
}

.hero-mini span {
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 12px;
}

.hero-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mini strong {
  display: block;
  overflow: hidden;
  color: var(--text-100);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-controls {
  display: grid;
  grid-template-columns: 42px auto 42px;
  gap: 8px;
  align-items: center;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: var(--text-100);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(16, 20, 25, 0.88);
  font-size: 28px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  background: var(--dark-400);
}

.hero-dot.is-active {
  width: 28px;
  background: var(--primary-500);
}

.page-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 24px 0;
}

.section-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-heading > span {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-600);
  box-shadow: inset 0 0 0 1px var(--dark-400);
}

.section-heading h2,
.side-card h2,
.detail-card h2,
.site-footer h2,
.rank-preview h2,
.catalog-block h2 {
  margin: 0;
  color: var(--text-100);
  font-size: 26px;
  line-height: 1.25;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--text-400);
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--dark-600);
  color: var(--text-100);
  box-shadow: 0 0 0 1px rgba(51, 61, 71, 0.75);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  background: var(--dark-500);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(245, 135, 31, 0.45);
}

.poster {
  position: relative;
  display: block;
  height: 318px;
  overflow: hidden;
  background: var(--dark-700);
}

.movie-card-small .poster {
  height: 228px;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, transparent 48%);
}

.play-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-100);
  font-size: 36px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.25);
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.year-badge,
.region-badge {
  position: absolute;
  z-index: 2;
  border-radius: 8px;
  color: var(--text-100);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.region-badge {
  left: 10px;
  bottom: 10px;
  background: rgba(245, 135, 31, 0.92);
}

.card-body {
  display: block;
  padding: 16px;
}

.card-body strong,
.rank-info strong,
.mini-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-100);
  font-size: 16px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body em,
.rank-info em,
.mini-card em {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 7px;
  color: var(--text-400);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  border-radius: 8px;
  background: var(--dark-700);
  color: var(--text-300);
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-tile {
  min-height: 170px;
  padding: 24px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 80% 0%, rgba(245, 135, 31, 0.22), transparent 36%),
    linear-gradient(135deg, var(--dark-600), var(--dark-700));
  border: 1px solid var(--dark-400);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--primary-500);
}

.category-tile span {
  color: var(--text-100);
  font-size: 22px;
  font-weight: 850;
}

.category-tile em {
  margin-top: 10px;
  color: var(--text-400);
  font-style: normal;
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--dark-600);
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  background: var(--dark-500);
  transform: translateX(3px);
}

.mini-poster {
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 12px;
}

.mini-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-preview,
.side-card,
.detail-card,
.player-card {
  border: 1px solid var(--dark-400);
  border-radius: var(--radius);
  background: var(--dark-700);
  box-shadow: var(--shadow);
}

.rank-preview {
  padding: 28px;
  align-self: start;
  position: sticky;
  top: 88px;
}

.rank-preview p,
.side-card p,
.detail-card p,
.inner-hero p {
  color: var(--text-400);
}

.rank-preview .btn {
  width: 100%;
  margin-top: 14px;
}

.inner-hero {
  background:
    radial-gradient(circle at 82% 0%, rgba(245, 135, 31, 0.24), transparent 30%),
    linear-gradient(135deg, var(--dark-900), var(--dark-700));
  border-bottom: 1px solid var(--dark-400);
}

.inner-hero > div {
  max-width: 1180px;
  margin: 0 auto;
  padding: 78px 24px;
}

.inner-hero p:last-child {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
}

.filter-bar {
  margin-bottom: 26px;
  box-shadow: none;
}

.filter-bar select {
  max-width: 220px;
}

.searchable-item.is-hidden {
  display: none;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--dark-600);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: var(--primary-500);
  background: var(--dark-500);
}

.rank-num {
  color: var(--primary-500);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-poster {
  width: 92px;
  height: 92px;
  overflow: hidden;
  border-radius: 14px;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info small {
  display: block;
  margin-top: 8px;
  color: var(--primary-400);
}

.rank-action {
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(245, 135, 31, 0.16);
  color: var(--primary-400);
  font-size: 13px;
  font-weight: 850;
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-400);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--primary-500);
}

.player-card {
  overflow: hidden;
  margin-bottom: 22px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
  color: var(--text-100);
  transition: opacity 0.2s ease;
}

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

.player-play {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  background: var(--primary-500);
  color: #111;
  font-size: 32px;
  box-shadow: 0 0 34px rgba(245, 135, 31, 0.42);
}

.detail-card {
  margin-bottom: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 18px;
  color: var(--text-100);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.meta-row {
  margin-bottom: 18px;
  color: var(--text-400);
}

.meta-row span {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--dark-600);
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-card section + section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--dark-500);
}

.detail-card h2 {
  margin-bottom: 12px;
}

.detail-card .lead {
  color: var(--primary-400);
  font-size: 17px;
  font-style: italic;
}

.detail-side {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 88px;
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin-bottom: 16px;
  font-size: 22px;
}

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

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

.catalog-block {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--dark-700);
  border: 1px solid var(--dark-400);
}

.catalog-block ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.catalog-block a {
  color: var(--text-300);
}

.catalog-block a:hover {
  color: var(--primary-500);
}

.catalog-block span {
  color: var(--text-500);
  font-size: 13px;
}

.site-footer {
  margin-top: 86px;
  padding: 46px 24px 26px;
  border-top: 1px solid var(--dark-500);
  background: var(--dark-700);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-grid p {
  max-width: 520px;
  color: var(--text-400);
}

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

.site-footer li a {
  color: var(--text-400);
  font-size: 14px;
}

.site-footer li a:hover {
  color: var(--primary-500);
}

.footer-bottom {
  max-width: 1280px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--dark-500);
  color: var(--text-500);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1120px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .detail-side,
  .rank-preview {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .header-inner {
    padding: 0 16px;
  }

  .hero-slider {
    min-height: 760px;
    height: auto;
  }

  .hero-content {
    top: 40%;
    width: calc(100% - 32px);
  }

  .hero-panel {
    bottom: 18px;
    width: calc(100% - 32px);
  }

  .hero-search,
  .filter-bar {
    flex-direction: column;
  }

  .filter-bar select {
    max-width: none;
  }

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

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

  .page-section,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .rank-action {
    display: none;
  }

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

@media (max-width: 560px) {
  .logo {
    font-size: 17px;
  }

  .hero-content h1,
  .hero-content h2,
  .inner-hero h1 {
    font-size: 36px;
  }

  .hero-mini-list,
  .movie-grid,
  .catalog-grid,
  .category-grid,
  .related-grid,
  .catalog-index {
    grid-template-columns: 1fr;
  }

  .poster,
  .movie-card-small .poster {
    height: 300px;
  }

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