:root {
  --bg: #0a0a0a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f5f3;
  --muted: #8f8f8c;
  --accent: #f5f5f3;
  --accent-2: #d8c7a0;
  --grad: #f5f5f3;
  --radius: 18px;
  --max: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ---------- Background orbs ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.06; }
.orb-1 { width: 540px; height: 540px; background: #ffffff; top: -160px; left: -120px; }
.orb-2 { width: 480px; height: 480px; background: #d8c7a0; bottom: -180px; right: -120px; opacity: 0.05; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 5vw, 56px);
  background: rgba(8, 8, 12, 0.6);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem; font-weight: 700; letter-spacing: -0.5px;
  display: inline-flex; align-items: center; gap: 4px;
}
.logo-dot { font-size: 0.7rem; color: var(--accent-2); }
.nav { display: flex; gap: 30px; }
.nav a { font-size: 0.92rem; color: var(--muted); font-weight: 500; transition: color 0.2s; }
.nav a:hover { color: var(--text); }
.header-right { display: flex; align-items: center; gap: 12px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 100px;
  font-family: "Space Grotesk", sans-serif; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.btn-sm { padding: 9px 20px; font-size: 0.88rem; }
.btn:active { transform: scale(0.96); }
.btn-primary { color: #0a0a0a; background: var(--accent); }
.btn-primary:hover { background: #ffffff; box-shadow: 0 10px 34px -10px rgba(255, 255, 255, 0.25); }
.btn-ghost { color: var(--text); background: var(--surface); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.2); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(48px, 9vw, 110px) clamp(18px, 5vw, 56px) clamp(40px, 7vw, 80px);
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: "Space Grotesk", sans-serif; font-size: 0.78rem; font-weight: 500;
  color: var(--accent-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 7px 16px; margin-bottom: 26px;
}
.hero-title {
  font-family: "Space Grotesk", sans-serif; font-weight: 700;
  font-size: clamp(2.6rem, 7.5vw, 5.4rem); line-height: 1.02; letter-spacing: -2px;
  margin-bottom: 26px;
}
.grad-text { color: var(--accent-2); }
.hero-text { max-width: 480px; color: var(--muted); font-size: 1.06rem; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }
.hero-meta { display: flex; gap: 32px; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
.hero-meta strong { color: var(--text); font-weight: 600; font-family: "Space Grotesk", sans-serif; }

/* ---------- Hero feature card ---------- */
.feature-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 26px; padding: 14px; backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7);
}
.feature-poster {
  position: relative; aspect-ratio: 4 / 5; border-radius: 14px;
  background: #161614 center/cover no-repeat;
  display: flex; align-items: flex-start; justify-content: space-between; padding: 16px;
  overflow: hidden; cursor: pointer;
}
.feature-poster::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 35%, rgba(0,0,0,0.35) 100%);
}
.feature-tag {
  position: relative; z-index: 1; font-family: "Space Grotesk", sans-serif;
  font-size: 0.74rem; font-weight: 500; background: rgba(8,8,12,0.55);
  border: 1px solid var(--line); border-radius: 100px; padding: 5px 12px;
}
.feature-play {
  position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.8rem; color: #0a0a0a;
  background: var(--accent); box-shadow: 0 6px 20px -6px rgba(0,0,0,0.6);
}
.feature-info { padding: 16px 8px 6px; }
.feature-info h3 { font-family: "Space Grotesk", sans-serif; font-size: 1.25rem; font-weight: 600; }
.feature-info p { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.feature-rating { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.88rem; }
.feature-rating span:first-child { color: var(--accent-2); font-weight: 600; }
.feature-rating .dot { color: var(--muted); }

/* ---------- Sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 7vw, 80px) clamp(18px, 5vw, 56px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 38px; }
.section-head h2 { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -1px; }
.section-sub { color: var(--muted); font-size: 0.98rem; margin-top: 6px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: "Space Grotesk", sans-serif; font-size: 0.84rem; font-weight: 500;
  color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  border-radius: 100px; padding: 8px 16px; cursor: pointer; transition: all 0.2s ease;
}
.chip:hover { color: var(--text); }
.chip.active { color: #0a0a12; background: var(--text); border-color: var(--text); }

/* ---------- Genre filter row ---------- */
.genre-row { position: relative; margin-top: 18px; max-width: 100%; }
.chips-scroll {
  flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-behavior: smooth;
}
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-scroll .chip { flex: 0 0 auto; }

.genre-arrow {
  position: absolute; top: calc(50% - 3px); transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; padding-bottom: 3px;
  display: grid; place-items: center; line-height: 1;
  background: rgba(12,12,16,0.92); border: 1px solid var(--line); color: var(--text);
  font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.genre-arrow:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.25); }
.genre-arrow:active { transform: translateY(-50%) scale(0.92); }
.genre-arrow[hidden] { display: none; }
.genre-arrow-left { left: -4px; }
.genre-arrow-right { right: -4px; }
/* fade под стрелками, чтобы чипы «уходили» под них */
.genre-row::before, .genre-row::after {
  content: ""; position: absolute; top: 0; bottom: 6px; width: 56px; z-index: 1; pointer-events: none;
}
.genre-row::before { left: 0; background: linear-gradient(90deg, var(--bg) 30%, transparent); }
.genre-row::after { right: 0; background: linear-gradient(270deg, var(--bg) 30%, transparent); }
.genre-row.at-start::before { display: none; }
.genre-row.at-end::after { display: none; }
/* на тач-устройствах листаем свайпом — стрелки и фейд не нужны */
@media (max-width: 720px), (pointer: coarse) {
  .genre-arrow, .genre-row::before, .genre-row::after { display: none !important; }
}

/* ---------- Search ---------- */
#search-section { padding-top: clamp(20px, 4vw, 40px); padding-bottom: 0; }
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 100px;
  padding: 6px 6px 6px 20px; max-width: 640px;
}
.search-bar:focus-within { border-color: rgba(255,255,255,0.25); }
.search-ico { color: var(--muted); font-size: 1.2rem; }
.search-bar input {
  flex: 1; background: none; border: none; outline: none; color: var(--text);
  font-family: "Inter", sans-serif; font-size: 1rem; padding: 10px 0;
}
.search-bar input::placeholder { color: var(--muted); }
.search-clear {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  cursor: pointer; font-size: 0.8rem; transition: background 0.2s;
}
.search-clear:hover { background: rgba(255,255,255,0.14); }
#search-results { margin-top: 28px; }
.search-count { color: var(--muted); font-family: "Space Grotesk", sans-serif; font-size: 0.9rem; margin-bottom: 20px; }

/* ---------- Show more ---------- */
.show-more {
  display: block; margin: 32px auto 0; padding: 12px 30px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font-family: "Space Grotesk", sans-serif; font-size: 0.92rem; font-weight: 500;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.show-more:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.22); }
.show-more:active { transform: scale(0.97); }

/* ---------- Movie grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: clamp(16px, 2.4vw, 26px); }
.card { cursor: pointer; }
.poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: flex-end; padding: 16px; border: 1px solid var(--line);
  background: #161616;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease, border-color 0.3s ease;
}
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.card:hover .poster {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 28px 50px -24px rgba(0,0,0,0.85);
  border-color: rgba(255,255,255,0.22);
}
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.6) 100%); }
.poster-year { position: relative; z-index: 1; font-family: "Space Grotesk", sans-serif; font-size: 0.78rem; letter-spacing: 1px; color: rgba(255,255,255,0.88); }
.poster-rating {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  background: rgba(8,8,12,0.55); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 100px;
  padding: 4px 11px; font-size: 0.76rem; font-weight: 600; color: var(--accent-2);
  font-family: "Space Grotesk", sans-serif;
}
.card-body { padding: 14px 4px 0; }
.card-title { font-family: "Space Grotesk", sans-serif; font-size: 1rem; font-weight: 600; }
.card-genre { font-size: 0.84rem; color: var(--muted); margin-top: 2px; }

/* ---------- Collections ---------- */
.collections { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(14px, 2vw, 22px); }
.collection {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; cursor: pointer; background: var(--surface);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.collection:hover { border-color: rgba(255,255,255,0.22); transform: translateY(-5px); }
.collection-glow { position: absolute; inset: 0; opacity: 0.5; transition: opacity 0.3s ease; }
.collection:hover .collection-glow { opacity: 0.85; }
.collection-count { position: relative; font-family: "Space Grotesk", sans-serif; font-size: 0.76rem; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.collection-name { position: relative; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.5rem; margin-top: 6px; letter-spacing: -0.5px; }

/* ---------- CTA ---------- */
.cta { max-width: var(--max); margin: 0 auto; padding: clamp(30px, 6vw, 60px) clamp(18px, 5vw, 56px); }
.cta-inner {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 40px);
  background: radial-gradient(120% 140% at 50% 0%, rgba(255,255,255,0.06), transparent 60%), var(--surface);
}
.cta-inner h2 { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -1px; }
.cta-inner p { color: var(--muted); margin-top: 10px; margin-bottom: 28px; }
.cta-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 480px; margin: 0 auto; }
.cta-form input {
  flex: 1; min-width: 220px; padding: 14px 20px; border-radius: 100px;
  background: rgba(8,8,12,0.6); border: 1px solid var(--line); color: var(--text);
  font-family: "Inter", sans-serif; font-size: 0.95rem; outline: none; transition: border-color 0.2s;
}
.cta-form input:focus { border-color: var(--accent); }
.cta-form input::placeholder { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px clamp(18px, 5vw, 56px); max-width: var(--max); margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer-nav { display: flex; gap: 26px; }
.footer-nav a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--text); }
.footer-note { color: var(--muted); font-size: 0.85rem; margin-top: 24px; }

/* ---------- Play hover on posters ---------- */
.poster-play {
  position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.85rem; color: #0a0a0a; background: var(--accent);
  opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,0.7);
}
.card:hover .poster-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- Player modal ---------- */
.player-modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: clamp(16px, 4vw, 48px);
}
.player-modal.open { display: flex; }
.player-backdrop { position: absolute; inset: 0; background: rgba(5,5,7,0.82); backdrop-filter: blur(8px); animation: fade 0.25s ease; }
.player-dialog {
  position: relative; z-index: 1; width: 100%; max-width: 880px;
  max-height: 92vh; overflow-y: auto;
  background: #111113; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.85);
  animation: pop 0.3s cubic-bezier(.2,.8,.2,1);
}
.pm-tabs { display: flex; gap: 8px; padding: 12px 14px; background: #0d0d0f; border-bottom: 1px solid var(--line); }
.pm-tab {
  font-family: "Space Grotesk", sans-serif; font-size: 0.85rem; font-weight: 500;
  color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  border-radius: 100px; padding: 7px 16px; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.pm-tab:hover { color: var(--text); border-color: rgba(255,255,255,0.22); }
.pm-tab.active { color: #0a0a0a; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.player-media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player-media ins { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.player-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-poster { position: absolute; inset: 0; background-size: cover; background-position: center; }
.player-info { padding: clamp(18px, 3vw, 28px); }
.player-info h3 { font-family: "Space Grotesk", sans-serif; font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 600; letter-spacing: -0.5px; }
.pm-meta { color: var(--accent-2); font-family: "Space Grotesk", sans-serif; font-size: 0.88rem; margin-top: 8px; }
.pm-desc { color: var(--muted); font-size: 0.98rem; margin-top: 14px; line-height: 1.65; }
.pm-watch-wrap { margin-top: 24px; }
.pm-watch-label { font-family: "Space Grotesk", sans-serif; font-size: 0.76rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.pm-watch { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.watch-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 100px;
  padding: 8px 16px 8px 8px; font-size: 0.88rem; font-weight: 500;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.watch-btn:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.22); transform: translateY(-2px); }
.watch-btn img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: #fff; }
.player-close {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(8,8,12,0.65); backdrop-filter: blur(8px); border: 1px solid var(--line); color: var(--text);
  cursor: pointer; font-size: 0.85rem; transition: background 0.2s, transform 0.15s;
}
.player-close:hover { background: rgba(255,255,255,0.18); }
.player-close:active { transform: scale(0.92); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: clamp(36px, 8vw, 70px); }
  .hero-feature { max-width: 360px; margin: 0 auto; width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 62px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(8,8,12,0.96); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); transform: translateY(-130%); transition: transform 0.3s ease;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 16px clamp(18px, 5vw, 56px); border-bottom: 1px solid var(--line); }
  .nav-toggle { display: flex; }
  .header-right .btn-sm { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .section-head { margin-bottom: 26px; }
  .hero-title { letter-spacing: -1px; }
  .hero-meta { gap: 22px; }
}
@media (max-width: 520px) {
  .site-header { padding: 14px 16px; }
  .section { padding-left: 16px; padding-right: 16px; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .poster { padding: 12px; border-radius: 14px; }
  .card-body { padding-top: 10px; }
  .card-title { font-size: 0.9rem; }
  .card-genre { font-size: 0.76rem; }
  .poster-rating { padding: 3px 9px; font-size: 0.72rem; top: 9px; right: 9px; }
  .badge { margin-bottom: 18px; }
  .hero-text { font-size: 1rem; margin-bottom: 26px; }
  .hero-actions { margin-bottom: 32px; }
  .hero-actions .btn { width: 100%; }
  .search-bar { padding-left: 16px; }
  .cta-form input { min-width: 100%; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 360px) {
  .grid { gap: 10px; }
  .card-title { font-size: 0.84rem; }
}
