/* Тема портала. Палитра и геометрия сняты с дизайн-токенов playgama:
   тёмная «карбоновая» база, фиолетовый акцент, лаймовый hover, радиусы 12/16/24,
   превью игр в 16:9. Вёрстка своя. */

:root{
  --bg:#070708; --surface:#0d0d0f; --surface-2:#1d1d21; --surface-3:#29292e;
  --line:#ffffff14; --line-strong:#ffffff29;
  --text:#fff; --text-dim:#fff9; --text-mute:#a2a2a8;
  --accent:#9747ff; --accent-soft:#aa76ff; --accent-pale:#c7abff;
  --lime:#c0ff47; --gold:#ffc850;
  --grad-accent:linear-gradient(#9747ff 0%, #620fab 100%);
  --r12:12px; --r16:16px; --r24:24px;
  --bar:64px; --side:248px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--text);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button{font:inherit}

/* ----------------------------------------------------------- шапка */
.nv-bar{
  position:fixed; inset:0 0 auto 0; height:var(--bar); z-index:50;
  display:flex; align-items:center; gap:16px; padding:0 16px;
  background:#0d0d0fe6; backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.nv-burger{
  display:none; width:40px; height:40px; flex:0 0 40px; border:0; cursor:pointer;
  border-radius:var(--r12); background:var(--surface-2); color:var(--text);
}
.nv-logo{display:flex; align-items:center; gap:10px; font-weight:800; font-size:19px; letter-spacing:-.02em}
.nv-logo-mark{
  width:32px; height:32px; border-radius:10px; background:var(--grad-accent);
  display:grid; place-items:center; font-size:15px; font-weight:900; color:#fff;
}
.nv-search{flex:1; max-width:520px; margin:0 auto; position:relative}
.nv-search input{
  width:100%; height:42px; padding:0 16px 0 42px; color:var(--text);
  background:var(--surface-2); border:1px solid transparent; border-radius:var(--r12);
  outline:0; transition:border-color .15s, background .15s;
}
.nv-search input::placeholder{color:var(--text-mute)}
.nv-search input:focus{border-color:var(--accent); background:var(--surface-3)}
.nv-search svg{position:absolute; left:14px; top:11px; width:20px; height:20px; fill:var(--text-mute)}
.nv-bar-actions{display:flex; gap:8px; align-items:center}

.nv-btn{
  display:inline-flex; align-items:center; gap:8px; height:42px; padding:0 18px;
  border:0; border-radius:var(--r12); cursor:pointer; font-weight:600; white-space:nowrap;
  background:var(--surface-2); color:var(--text); transition:background .15s, color .15s;
}
.nv-btn:hover{background:var(--surface-3)}
.nv-btn-accent{background:var(--grad-accent); color:#fff}
.nv-btn-accent:hover{filter:brightness(1.12)}
.nv-btn-lime{background:var(--lime); color:#0b1400}
.nv-btn-lime:hover{filter:brightness(1.08)}

/* -------------------------------------------------------- сайдбар */
.nv-side{
  position:fixed; top:var(--bar); bottom:0; left:0; width:var(--side); z-index:40;
  padding:16px 12px 32px; overflow-y:auto; background:var(--surface);
  border-right:1px solid var(--line);
}
.nv-side::-webkit-scrollbar{width:6px}
.nv-side::-webkit-scrollbar-thumb{background:var(--surface-3); border-radius:10px}
.nv-side h4{
  margin:18px 10px 8px; font-size:11px; letter-spacing:.09em; text-transform:uppercase;
  color:var(--text-mute);
}
.nv-nav a{
  display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:var(--r12);
  color:var(--text-dim); font-size:14px; font-weight:500; transition:background .15s, color .15s;
}
.nv-nav a:hover{background:var(--surface-2); color:var(--text)}
.nv-nav a.is-active{background:var(--surface-3); color:var(--text)}
.nv-dot{width:8px; height:8px; border-radius:50%; flex:0 0 8px; background:var(--accent-soft)}
.nv-more summary{
  list-style:none; cursor:pointer; padding:9px 10px; border-radius:var(--r12);
  font-size:14px; font-weight:600; color:var(--accent-pale);
}
.nv-more summary::-webkit-details-marker{display:none}
.nv-more summary:hover{background:var(--surface-2); color:var(--lime)}

/* --------------------------------------------------------- каркас */
.nv-main{margin:var(--bar) 0 0 var(--side); padding:28px 28px 64px; min-height:60vh}
.nv-wrap{max-width:1560px; margin:0 auto}

/* --------------------------------------------------- иконки категорий */
.nv-ico{
  width:20px; height:20px; flex:0 0 20px; fill:none; stroke:currentColor;
  stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
.nv-nav a .nv-ico{color:var(--text-mute); transition:color .15s}
.nv-nav a:hover .nv-ico, .nv-nav a.is-active .nv-ico{color:var(--accent-soft)}
.nv-ico-sec{width:24px; height:24px; flex:0 0 24px; color:var(--accent-soft); vertical-align:-4px; margin-right:9px}

/* ------------------------------------------------ «таблетки» категорий */
.nv-chips{display:flex; flex-wrap:wrap; gap:10px; margin:0 4px 32px}
.nv-chip{
  display:inline-flex; align-items:center; gap:9px; height:44px; padding:0 18px;
  border-radius:999px; background:var(--surface-2); border:1px solid var(--line);
  font-size:14px; font-weight:600; white-space:nowrap; cursor:pointer;
  transition:background .15s, border-color .15s, color .15s;
}
.nv-chip:hover{background:var(--surface-3); border-color:var(--accent-soft); color:#fff}
.nv-chip .nv-ico{color:var(--accent-pale)}
.nv-chip:hover .nv-ico{color:var(--lime)}
.nv-chips-more{display:contents}
.nv-chips-more summary{list-style:none}
.nv-chips-more summary::-webkit-details-marker{display:none}
.nv-chips-rest{display:flex; flex-wrap:wrap; gap:10px; width:100%; margin-top:2px}

.nv-sec{margin-bottom:40px}
.nv-sec-head{display:flex; align-items:baseline; justify-content:space-between; margin:0 4px 16px}
.nv-sec-head h2{margin:0; font-size:22px; font-weight:800; letter-spacing:-.02em}
.nv-sec-head a{font-size:14px; font-weight:600; color:var(--accent-pale)}
.nv-sec-head a:hover{color:var(--lime)}

/* --------------------------------------------------------- карточки */
.nv-grid{display:grid; gap:16px; grid-template-columns:repeat(auto-fill,minmax(228px,1fr))}
.nv-grid-hero{grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}
/* Вертикальные плитки: квадратная иконка игры + подпись под ней — в сумме
   карточка получается «стоячей», и ничего не приходится подрезать. */
.nv-grid-tall{grid-template-columns:repeat(auto-fill,minmax(158px,1fr))}
.nv-card--tall .nv-card-img{aspect-ratio:1/1}

.nv-card{display:block; border-radius:var(--r16); overflow:hidden; background:var(--surface-2); position:relative}
/* Обложки GamePix приходят в разных пропорциях — чаще 16:10 и 3:2, реже
   квадратные. Рамка 3:2 подрезает их минимально, а 16:9 съедала бы у квадратных
   почти половину высоты. */
.nv-card-img{position:relative; aspect-ratio:3/2; overflow:hidden; background:var(--surface-3)}
.nv-card-img img{width:100%; height:100%; object-fit:cover; transition:transform .35s ease}
.nv-card:hover .nv-card-img img{transform:scale(1.07)}
.nv-card::after{
  content:""; position:absolute; inset:0; border-radius:var(--r16); pointer-events:none;
  box-shadow:inset 0 0 0 1px var(--line); transition:box-shadow .2s;
}
.nv-card:hover::after{box-shadow:inset 0 0 0 2px var(--accent-soft)}
.nv-card-body{padding:10px 12px 12px}
.nv-card-title{
  font-size:14px; font-weight:600; line-height:1.3;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.nv-card-cat{margin-top:4px; font-size:12px; color:var(--text-mute)}
.nv-badge{
  position:absolute; top:10px; left:10px; z-index:2; padding:4px 9px; border-radius:999px;
  font-size:11px; font-weight:700; letter-spacing:.02em; background:var(--lime); color:#0b1400;
}
.nv-badge-new{background:var(--gold); color:#2a1a00}
.nv-play{
  position:absolute; inset:0; display:grid; place-items:center; opacity:0;
  background:#07070899; transition:opacity .2s;
}
.nv-card:hover .nv-play{opacity:1}
.nv-play span{
  padding:10px 22px; border-radius:999px; font-weight:700; font-size:14px;
  background:var(--grad-accent); color:#fff;
}

/* ------------------------------------------------------ страница игры */
.nv-stage-wrap{display:grid; grid-template-columns:1fr; gap:20px; margin-bottom:36px}
.nv-stage{
  position:relative; width:100%; background:#000; border-radius:var(--r24); overflow:hidden;
  border:1px solid var(--line-strong); aspect-ratio:16/9; max-height:min(76vh,860px);
}
.nv-stage.is-portrait{aspect-ratio:3/4; max-width:620px; margin:0 auto}
.nv-stage iframe{width:100%; height:100%; border:0; display:block}
/* Постер занимает всю плашку. Размытой подложки здесь нет намеренно:
   она читалась как «картинка не загрузилась».
   Оригиналы обложек у GamePix — 1360–1586 px по ширине и 1.5–1.6 по пропорциям,
   поэтому в кадр 16:9 они входят с небольшой подрезкой сверху и снизу, а выше
   1600 px запрашивать нечего: CDN отдаст тот же снимок, просто увеличенный. */
.nv-stage-cover{
  position:absolute; inset:0; display:grid; place-items:center; gap:18px;
  align-content:center; cursor:pointer; padding:24px;
  background:radial-gradient(120% 90% at 50% 0%, #241a3a 0%, #0d0d0f 62%, #070708 100%);
}
.nv-stage-cover .nv-stage-poster{
  position:absolute; inset:0; width:100%; height:100%;
  max-width:none; max-height:none; object-fit:cover; border-radius:0; box-shadow:none;
}
.nv-stage-veil{
  position:absolute; inset:0;
  background:linear-gradient(180deg,#07070826 0%, #07070880 55%, #070708e6 100%);
}
.nv-stage-cover h1{text-shadow:0 2px 18px #000c}
.nv-stage-cover h1{position:relative; margin:0; font-size:26px; font-weight:800; text-align:center; padding:0 20px}
.nv-stage-cover .nv-btn{position:relative; height:52px; padding:0 34px; font-size:16px}

.nv-gamebar{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  padding:14px 18px; border-radius:var(--r16); background:var(--surface-2);
}
.nv-gamebar h1{margin:0; font-size:20px; font-weight:800; letter-spacing:-.02em}
.nv-gamebar .nv-meta{display:flex; gap:14px; align-items:center; color:var(--text-mute); font-size:13px}
.nv-gamebar .nv-spacer{flex:1}

.nv-about{
  margin-bottom:36px; padding:20px 22px; border-radius:var(--r16);
  background:var(--surface); border:1px solid var(--line); color:var(--text-dim); line-height:1.65;
}
.nv-about h2{margin:0 0 10px; font-size:17px; color:var(--text)}

/* ------------------------------------------------------- страница списка */
.nv-page-head{margin:0 4px 22px}
.nv-page-head h1{margin:0 0 6px; font-size:30px; font-weight:800; letter-spacing:-.025em}
.nv-page-head p{margin:0; color:var(--text-mute)}

.nv-pager{display:flex; gap:8px; justify-content:center; align-items:center; margin:36px 0 8px; flex-wrap:wrap}
.nv-pager a, .nv-pager span{
  min-width:42px; height:42px; padding:0 14px; border-radius:var(--r12);
  display:inline-flex; align-items:center; justify-content:center; font-weight:600;
  background:var(--surface-2); color:var(--text-dim);
}
.nv-pager a:hover{background:var(--surface-3); color:var(--text)}
.nv-pager .is-current{background:var(--grad-accent); color:#fff}
.nv-pager .is-gap{background:transparent}

.nv-empty{padding:60px 20px; text-align:center; color:var(--text-mute)}

/* ----------------------------------------------------------- подвал */
.nv-foot{
  margin:0 0 0 var(--side); padding:32px 28px 56px;
  border-top:1px solid var(--line); background:var(--surface); color:var(--text-mute); font-size:14px;
}
.nv-foot-in{max-width:1560px; margin:0 auto; display:flex; gap:24px; flex-wrap:wrap; align-items:center}
.nv-foot a{color:var(--text-dim)}
.nv-foot a:hover{color:var(--lime)}
.nv-foot .nv-spacer{flex:1}

/* ------------------------------------------------------------ адаптив */
@media (max-width:1100px){
  :root{--side:0px}
  .nv-burger{display:block}
  .nv-side{transform:translateX(-100%); width:264px; transition:transform .22s ease}
  body.nv-side-open .nv-side{transform:none; box-shadow:0 0 0 100vmax #0007}
  .nv-main{padding:20px 16px 56px}
  .nv-foot{padding:28px 16px 48px}
}
@media (max-width:640px){
  :root{--bar:108px}
  .nv-bar{height:auto; padding:10px 12px; flex-wrap:wrap; gap:10px}
  .nv-search{order:3; max-width:none; flex:0 0 100%; margin:0}
  .nv-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px}
  .nv-grid-hero{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
  .nv-sec-head h2{font-size:18px}
}
