/* NUBO VPN — промо-полоса вверху каждой страницы (подключается promo.js). */

:root {
  --promo-h: 46px;
}
@media (max-width: 640px) {
  :root { --promo-h: 44px; }
}

/* Место под полосу: body сжимается на её высоту, поэтому раскладки
   с height: 100% (плеер) не уезжают за нижний край. */
html.has-promo body {
  padding-top: var(--promo-h) !important;
  box-sizing: border-box;
}
html.has-promo .stage { height: 100% !important; }
html.has-promo .license-gate { top: var(--promo-h); }
@media (max-width: 900px) {
  html.has-promo .rail { top: var(--promo-h) !important; }
}
/* Сцена в полноэкранном режиме — без рекламы */
html.has-promo body.is-fs { padding-top: 0 !important; }
html.has-promo body.is-fs .nubo-promo { display: none; }

.nubo-promo {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10050;
  height: var(--promo-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 44px 0 14px;
  overflow: hidden;
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #fff;
  text-decoration: none;
  background:
    radial-gradient(60% 180% at 12% 50%, rgba(99, 102, 241, 0.35), transparent 60%),
    radial-gradient(50% 160% at 88% 50%, rgba(34, 211, 238, 0.18), transparent 60%),
    linear-gradient(90deg, #070914 0%, #0d1030 50%, #070914 100%);
  box-shadow: 0 6px 24px rgba(5, 6, 13, 0.45);
  animation: nubo-promo-in 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  -webkit-font-smoothing: antialiased;
}

/* Переливающаяся линия снизу */
.nubo-promo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #22d3ee, #a855f7, #6366f1);
  background-size: 300% 100%;
  animation: nubo-promo-flow 6s linear infinite;
  opacity: 0.9;
}

/* Мягкий блик, пробегающий по полосе */
.nubo-promo::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 160px;
  left: -200px;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  animation: nubo-promo-sweep 7s ease-in-out 1.2s infinite;
  pointer-events: none;
}

.nubo-promo__link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.nubo-promo__logo {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.55));
  animation: nubo-promo-glow 3.2s ease-in-out infinite;
}

.nubo-promo__brand {
  flex: none;
  font-family: "Unbounded", "Onest", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  background: linear-gradient(120deg, #c7d2fe, #fff 45%, #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nubo-promo__badge {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b0d22;
  background: linear-gradient(120deg, #a5b4fc, #67e8f9);
}

/* Сменяющиеся слоганы */
.nubo-promo__slides {
  position: relative;
  height: 1.3em;
  min-width: 0;
  width: 330px;
  font-size: 0.86rem;
  color: rgba(226, 232, 255, 0.86);
}
.nubo-promo__slide {
  position: absolute;
  inset: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms ease, transform 420ms ease;
}
.nubo-promo__slide.is-on {
  opacity: 1;
  transform: none;
}
.nubo-promo__slide b { color: #fff; font-weight: 600; }

.nubo-promo__cta {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(120deg, #6366f1, #4f46e5 55%, #0ea5e9);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.nubo-promo__cta svg { width: 14px; height: 14px; flex: none; }
.nubo-promo__cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: nubo-promo-shine 3.6s ease-in-out 0.8s infinite;
}
.nubo-promo__link:hover .nubo-promo__cta,
.nubo-promo__link:focus-visible .nubo-promo__cta {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.nubo-promo__link:focus-visible .nubo-promo__cta {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

.nubo-promo__close {
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  color: rgba(226, 232, 255, 0.55);
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}
.nubo-promo__close:hover,
.nubo-promo__close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.nubo-promo.is-leaving {
  animation: nubo-promo-out 320ms ease forwards;
}

@media (max-width: 820px) {
  .nubo-promo__badge { display: none; }
  .nubo-promo__slides { width: 230px; }
}
@media (max-width: 640px) {
  .nubo-promo { gap: 10px; padding: 0 38px 0 10px; justify-content: flex-start; }
  .nubo-promo__link { gap: 9px; flex: 1; }
  .nubo-promo__logo { width: 24px; height: 24px; }
  .nubo-promo__brand { font-size: 0.72rem; }
  .nubo-promo__slides { display: none; }
  .nubo-promo__cta { margin-left: auto; padding: 6px 11px; font-size: 0.74rem; }
  .nubo-promo__cta-long { display: none; }
}
@media (min-width: 641px) {
  .nubo-promo__cta-short { display: none; }
}

@keyframes nubo-promo-in {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes nubo-promo-out {
  to { transform: translateY(-100%); opacity: 0; }
}
@keyframes nubo-promo-flow {
  to { background-position: 300% 0; }
}
@keyframes nubo-promo-sweep {
  0% { left: -200px; }
  60%, 100% { left: calc(100% + 40px); }
}
@keyframes nubo-promo-shine {
  0% { transform: translateX(-120%); }
  45%, 100% { transform: translateX(120%); }
}
@keyframes nubo-promo-glow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.45)); }
  50% { filter: drop-shadow(0 0 14px rgba(129, 140, 248, 0.85)); }
}

@media (prefers-reduced-motion: reduce) {
  .nubo-promo,
  .nubo-promo::before,
  .nubo-promo::after,
  .nubo-promo__logo,
  .nubo-promo__cta::after { animation: none !important; }
  .nubo-promo__slide { transition: none; }
}
