/* ===== NEXUS PRO (fixed) — вставьте ПОСЛЕ theme.css ===== */

/* --- Фон страницы --- */
body{
  background:
    radial-gradient(900px 500px at 10% 0%,rgba(139,92,246,.18),transparent 60%),
    radial-gradient(800px 500px at 95% 35%,rgba(34,211,238,.12),transparent 60%),
    radial-gradient(700px 500px at 40% 100%,rgba(244,114,182,.10),transparent 60%),
    #0a0818 !important;
  background-attachment:fixed !important;
}
#nx-bg{position:fixed !important;top:0;left:0;width:100vw;height:100vh;z-index:-1;pointer-events:none}
::selection{background:var(--nx-a);color:#fff}
::-webkit-scrollbar{width:10px}
::-webkit-scrollbar-track{background:#0a0818}
::-webkit-scrollbar-thumb{background:linear-gradient(var(--nx-a),var(--nx-c));border-radius:10px}

/* --- Баннер (селекторы сужены: раньше [class*="over"] цеплял hover/cover) --- */
[class*="anner"] img,[class*="Hero"] img,[class*="Cover"] img{
  -webkit-mask-image:linear-gradient(to bottom,#000 70%,transparent);
  mask-image:linear-gradient(to bottom,#000 70%,transparent);
  animation:nxFade 1.2s ease both;
}
@keyframes nxFade{from{opacity:0;transform:scale(1.04)}to{opacity:1;transform:none}}

/* --- Шапка (только внешний элемент, без вложенных) --- */
header:not(header *),
[class*="Header-module"]:not([class*="Header-module"] *){
  background:rgba(18,14,46,.72) !important;
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.07);
  border-bottom:1px solid transparent;
  border-radius:0 0 16px 16px;
  position:relative;
}
header:not(header *)::after,
[class*="Header-module"]:not([class*="Header-module"] *)::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;
  background:linear-gradient(90deg,var(--nx-a),var(--nx-b),var(--nx-c),var(--nx-a));
  background-size:300% 100%;animation:nxShine 5s linear infinite;
}
@keyframes nxShine{to{background-position:300% 0}}
header a,[class*="Header-module"] a{position:relative;transition:color .25s;color:#ece9ff}
header a::before,[class*="Header-module"] a::before{
  content:"";position:absolute;left:0;right:0;bottom:-6px;height:2px;border-radius:2px;
  background:linear-gradient(90deg,var(--nx-b),var(--nx-c));
  transform:scaleX(0);transition:transform .3s;
}
header a:hover,[class*="Header-module"] a:hover{color:#fff}
header :is(div,span,p,small,b,strong),[class*="Header-module"] :is(div,span,p,small,b,strong){color:#ece9ff !important}
header a:hover::before,[class*="Header-module"] a:hover::before{transform:scaleX(1)}

/* --- Панели «Мониторинг» и «Магазин» --- */
.boxHeader:not(.customModalContent .boxHeader){
  position:relative;font-weight:700;letter-spacing:.03em;
  color:#fff !important;
  background:linear-gradient(90deg,rgba(139,92,246,.30),rgba(255,255,255,.04) 60%) !important;
  border-radius:16px 16px 0 0;
}
.boxHeader:not(.customModalContent .boxHeader) *{color:#fff !important}
.boxHeader:not(.customModalContent .boxHeader)::before{
  content:"";position:absolute;left:0;top:18%;bottom:18%;width:4px;border-radius:4px;
  background:linear-gradient(var(--nx-b),var(--nx-a),var(--nx-c));
  box-shadow:0 0 14px var(--nx-glow);
}
.boxBody:not(.customModalContent .boxBody){
  background:rgba(18,14,46,.55) !important;
  border:1px solid rgba(255,255,255,.06);border-top:0;
  border-radius:0 0 16px 16px;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  color:#ece9ff;
}
/* светлый текст внутри панелей (NIKOV, «Выключен» и т.д.) */
.boxBody:not(.customModalContent .boxBody) :is(div,span,p,label,h1,h2,h3,h4,small){
  color:#ece9ff;
}

/* белые подложки под кнопкой «Обновить» и подвал панели */
.boxFooter:not(.customModalContent *),
[class*="boxFooter"]:not(.customModalContent *),
:has(> [class*="Button-module__btn"]):not(.nx-card):not(.customModalContent *):not(body):not(html){
  background:transparent !important;
}

/* --- Кнопки: основные — неоновый градиент --- */
[class*="Button-module__btn"][class*="primary" i],
[class*="Button-module__btn"][class*="active" i]{
  background-image:linear-gradient(120deg,var(--nx-a),var(--nx-c)) !important;
  border:0 !important;color:#fff !important;
  box-shadow:0 8px 24px var(--nx-glow);
}

/* --- Категории — тёмные «стеклянные» пилюли --- */
[class*="ategor"] :is(button,a){
  background:rgba(255,255,255,.07) !important;
  color:#ece9ff !important;
  border:1px solid rgba(255,255,255,.12) !important;
  border-radius:99px !important;
  transition:transform .25s,background .25s,box-shadow .25s,color .25s !important;
}
[class*="ategor"] :is(button,a):hover{
  transform:translateY(-3px);color:#fff !important;
  background:rgba(139,92,246,.35) !important;
  box-shadow:0 8px 20px var(--nx-glow);
}
[class*="ategor"] :is(button,a)[class*="active" i],
[class*="ategor"] :is(button,a)[aria-selected="true"]{
  background:linear-gradient(120deg,var(--nx-a),var(--nx-c)) !important;
  color:#fff !important;border-color:transparent !important;
  box-shadow:0 8px 24px var(--nx-glow);
}

/* --- Поиск --- */
input{
  background:rgba(255,255,255,.07) !important;
  color:#fff !important;
  caret-color:var(--nx-b);
}
input::placeholder{color:rgba(236,233,255,.55)}
input:focus{
  outline:none !important;
  box-shadow:0 0 0 2px var(--nx-a),0 0 22px var(--nx-glow);
  transition:box-shadow .3s;
}

/* --- Карточки товаров: стилизуем ТОЛЬКО корень (.nx-card ставит theme.js) --- */
.nx-card{
  position:relative;
  border-radius:16px !important;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08) !important;
  background:rgba(24,18,60,.75) !important;
  color:#ece9ff;
  transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s,border-color .35s;
  animation:nxCardIn .7s backwards; /* backwards, а не both — иначе hover-transform перебивается */
}
.nx-card :is(div,span,p,a,h1,h2,h3,h4,small,b,strong){
  color:#ece9ff;text-shadow:0 1px 4px rgba(0,0,0,.7);
}
.nx-card :is(div,span,p,a,h1,h2,h3,h4,small,b,strong):not([class*="iscount"]):not([class*="adge"]):not([class*="avorite"]):not([class*="Star"]){
  background-color:transparent !important;
}
.nx-card *{border-color:rgba(255,255,255,.12) !important}
.nx-card :is(div,span,p,a,h1,h2,h3,h4){background-clip:padding-box}
.nx-card:nth-child(2){animation-delay:.06s}
.nx-card:nth-child(3){animation-delay:.12s}
.nx-card:nth-child(4){animation-delay:.18s}
.nx-card:nth-child(n+5){animation-delay:.24s}
@keyframes nxCardIn{from{opacity:0;transform:translateY(24px) scale(.96)}to{opacity:1;transform:none}}

.nx-card:hover{
  transform:translateY(-8px);
  border-color:var(--nx-a) !important;
  box-shadow:0 18px 44px var(--nx-glow);
}
/* световое пятно за курсором (координаты ставит theme.js) */
.nx-card::after{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .3s;
  background:radial-gradient(260px circle at var(--mx,50%) var(--my,50%),rgba(255,255,255,.07),transparent 60%);
}
.nx-card:hover::after{opacity:1}

/* картинка товара — плавный зум */
.nx-card img{transition:transform .5s}
.nx-card:hover img{transform:scale(1.06)}

/* значок скидки — пульсация */
[class*="iscount"],[class*="adge"]{animation:nxBadge 2s ease-in-out infinite}
@keyframes nxBadge{50%{box-shadow:0 0 16px var(--nx-c);transform:scale(1.06)}}

/* звёздочка избранного */
[class*="avorite"],[class*="Star"]{transition:transform .3s,filter .3s}
[class*="avorite"]:hover,[class*="Star"]:hover{transform:scale(1.3) rotate(18deg);filter:drop-shadow(0 0 8px #fbbf24)}

/* --- Мониторинг: прогресс-бар (только внешний элемент) --- */
[class*="rogress"]:not([class*="rogress"] *){
  border-radius:10px !important;overflow:hidden;position:relative;
  background:rgba(255,255,255,.10) !important;
}
[class*="rogress"]:not([class*="rogress"] *)::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.35) 50%,transparent 70%);
  transform:translateX(-100%);animation:nxSweep 2.2s ease-in-out infinite;
}
@keyframes nxSweep{to{transform:translateX(100%)}}

/* --- Подвал: тёмный, ссылки светлее --- */
footer,[class*="ooter"]:not(.boxFooter):not([class*="boxFooter"]){
  background:rgba(18,14,46,.6) !important;
  color:#cfcaf2 !important;
  border-radius:16px;
}
footer a,[class*="ooter"] a{color:#ff7a66 !important}
footer a:hover,[class*="ooter"] a:hover{color:#fff !important}

@media(prefers-reduced-motion:reduce){.nx-card{animation:none !important}}


/* ================= АВАТАР В ШАПКЕ ================= */
.nx-avatar{
  display:inline-flex !important;align-items:center;justify-content:center;
  flex:none;vertical-align:middle;
  width:40px !important;height:40px !important;min-width:40px;max-width:40px;max-height:40px;
  margin:0 12px 0 0;border-radius:50%;overflow:hidden;
  box-shadow:0 0 0 2px var(--nx-a),0 0 16px var(--nx-glow);
  background:#120e2e;transition:transform .3s,box-shadow .3s;
}
.nx-avatar:hover{transform:scale(1.08);box-shadow:0 0 0 2px var(--nx-b),0 0 22px var(--nx-glow)}
.nx-avatar img{width:100% !important;height:100% !important;max-width:100% !important;max-height:100% !important;object-fit:cover;display:block;border-radius:50%}

/* ================= ПОИСК И ПОЛЯ ВВОДА ================= */
:has(> input:not([type="checkbox"]):not([type="radio"])):not(body):not(html){
  background:rgba(255,255,255,.07) !important;
  border-radius:8px;
}
input:not([type="checkbox"]):not([type="radio"]){background:transparent !important}

/* ================= МОДАЛКА ТОВАРА ================= */
.customModalContent{
  color:#ece9ff;
  max-height:calc(100vh - 24px);
  overflow-y:auto;overflow-x:hidden;
  scrollbar-width:thin;
}
.customModalContent img{max-height:34vh;object-fit:contain}
.customModalContent img[src*="avatar" i]{max-height:none}
/* ===== Светлые панели платформы → тёмное стекло (класс .nx-panel ставит theme.js) =====
   inline-цвета текста из описания товара (жёлтый, красный, белый) сохраняются */
.nx-panel{
  background-color:rgba(28,22,66,.95) !important;
  border-color:rgba(255,255,255,.12) !important;
  color:#ece9ff;
  transition:background-color .25s,transform .25s,box-shadow .25s;
}
/* кнопки-панели («Закрыть» и т.п.) — заметная рамка и белый текст */
:is(button,a,[role="button"]).nx-panel{
  border:1px solid rgba(255,255,255,.22) !important;
  color:#fff !important;font-weight:600;
}
:is(button,a,[role="button"]).nx-panel:hover{
  border-color:var(--nx-b) !important;box-shadow:0 0 18px var(--nx-glow);
}
.nx-panel :is(a,span,div,p,li,b,strong,label,small,td,th){color:#ece9ff}
:is(a,button,li,[role="button"]).nx-panel:hover{background-color:rgba(76,56,160,.98) !important}
/* активный пункт меню (Профиль / Корзина / История) */
.nx-panel[class*="active" i],.nx-panel[aria-current]{
  background-image:linear-gradient(120deg,var(--nx-a),var(--nx-c)) !important;
  background-color:transparent !important;
  color:#fff;box-shadow:0 6px 20px var(--nx-glow);
}
/* кнопки со сплошным цветом («Применить», «Обновить», «Выход») — белый текст */
[class*="Button-module__btn"]:not(.nx-panel){color:#fff !important}
/* кнопки «−» и «+» количества */
[class*="uantity"] button,[class*="ounter"] button,[class*="mount"] button{
  background:rgba(255,255,255,.10) !important;color:#ece9ff !important;
}


/* ===== Цены в карточках: чёткий неоновый текст ===== */
.nx-card :is([class*="rice"],[class*="Cost"],[class*="cost"]),
.nx-card :is([class*="rice"],[class*="Cost"],[class*="cost"]) *{
  text-shadow:none !important;
  filter:none !important;
  opacity:1 !important;
  background:none !important;
  background-clip:border-box !important;
  -webkit-background-clip:border-box !important;
  color:#67e8f9 !important;
  -webkit-text-fill-color:#67e8f9 !important;
  font-weight:800;
}