/* Krass VPN - премиальный фон страницы подписки (поверх стилей remnawave/subscription-page) */
html,
body {
    background-color: #0b0f16 !important;
    background-image: none !important;
}

.animated-background {
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(30, 41, 59, 0.55), transparent 60%),
        linear-gradient(180deg, #0b0f16 0%, #0d121b 55%, #0a0d13 100%) !important;
}

/* Мягкое «северное сияние»: три светящихся пятна медленно плывут */
.animated-background::before,
.animated-background::after {
    content: "";
    position: absolute;
    inset: -30%;
    will-change: transform;
    filter: blur(60px);
}

.animated-background::before {
    background:
        radial-gradient(38% 30% at 22% 30%, rgba(34, 211, 238, 0.30), transparent 70%),
        radial-gradient(32% 26% at 78% 22%, rgba(139, 92, 246, 0.28), transparent 70%);
    animation: krass-drift-a 22s ease-in-out infinite alternate;
}

.animated-background::after {
    background:
        radial-gradient(30% 24% at 70% 78%, rgba(220, 38, 38, 0.22), transparent 70%),
        radial-gradient(26% 22% at 20% 82%, rgba(14, 165, 233, 0.20), transparent 70%);
    animation: krass-drift-b 28s ease-in-out infinite alternate;
}

/* Тонкое мерцание звёзд и зерно - слой поверх сияния, под контентом */
#root::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.55), transparent 60%),
        radial-gradient(1px 1px at 68% 12%, rgba(255, 255, 255, 0.45), transparent 60%),
        radial-gradient(1.5px 1.5px at 86% 46%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(1px 1px at 34% 64%, rgba(255, 255, 255, 0.4), transparent 60%),
        radial-gradient(1px 1px at 52% 88%, rgba(255, 255, 255, 0.35), transparent 60%),
        radial-gradient(1.5px 1.5px at 8% 76%, rgba(255, 255, 255, 0.45), transparent 60%),
        radial-gradient(1px 1px at 92% 90%, rgba(255, 255, 255, 0.35), transparent 60%),
        radial-gradient(1px 1px at 44% 30%, rgba(255, 255, 255, 0.3), transparent 60%);
    animation: krass-twinkle 7s ease-in-out infinite alternate;
}

#root::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

#root > * {
    position: relative;
    z-index: 1;
}

@keyframes krass-drift-a {
    0% { transform: translate3d(-4%, -3%, 0) rotate(0deg) scale(1); }
    50% { transform: translate3d(5%, 4%, 0) rotate(8deg) scale(1.08); }
    100% { transform: translate3d(-2%, 6%, 0) rotate(-6deg) scale(1.02); }
}

@keyframes krass-drift-b {
    0% { transform: translate3d(5%, 4%, 0) rotate(0deg) scale(1.05); }
    50% { transform: translate3d(-6%, -2%, 0) rotate(-10deg) scale(0.96); }
    100% { transform: translate3d(3%, -5%, 0) rotate(6deg) scale(1.06); }
}

@keyframes krass-twinkle {
    0% { opacity: 0.45; }
    100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .animated-background::before,
    .animated-background::after,
    #root::before {
        animation: none;
    }
}

/* ---------- Логотип-звезда: свечение, разворот и блик ---------- */
img[alt="logo"] {
    animation: krass-logo-spin 9s cubic-bezier(0.65, 0, 0.35, 1) infinite, krass-logo-glow 3.2s ease-in-out infinite;
    will-change: transform, filter;
    position: relative;
    z-index: 2;
}
.krass-logo-fx {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 200;
}
.krass-logo-fx::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 92, 60, 0.45) 0%, rgba(255, 170, 70, 0.14) 45%, transparent 70%);
    filter: blur(4px);
    mix-blend-mode: screen;
    animation: krass-logo-halo 3.2s ease-in-out infinite;
}
.krass-logo-fx::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 236, 190, 0.95) 48%, rgba(255, 255, 255, 0.9) 50%, transparent 68%);
    background-size: 250% 100%;
    -webkit-mask: url("stern.png") center / contain no-repeat;
    mask: url("stern.png") center / contain no-repeat;
    mix-blend-mode: screen;
    animation: krass-logo-shine 9s ease-in-out infinite;
}
@keyframes krass-logo-glow {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 90, 60, 0.6)) drop-shadow(0 0 6px rgba(255, 60, 40, 0.35)); }
    50% { filter: drop-shadow(0 0 4px rgba(255, 200, 120, 0.9)) drop-shadow(0 0 14px rgba(255, 70, 40, 0.65)); }
}
@keyframes krass-logo-halo {
    0%, 100% { opacity: 0.55; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.12); }
}
@keyframes krass-logo-spin {
    0%, 70% { transform: perspective(220px) rotateY(0deg) scale(1); }
    85% { transform: perspective(220px) rotateY(180deg) scale(1.12); }
    100% { transform: perspective(220px) rotateY(360deg) scale(1); }
}
@keyframes krass-logo-shine {
    0%, 30% { background-position: 150% 0; opacity: 1; }
    48% { background-position: -60% 0; opacity: 1; }
    49%, 100% { background-position: -60% 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    img[alt="logo"], .krass-logo-fx::before, .krass-logo-fx::after { animation: none; }
}

/* Документы: шапка-логотип чуть крупнее, без лишнего вращения в тексте */
.brand img[alt="logo"] { width: 40px; height: 40px; }
@media print {
    .animated-background, .krass-logo-fx, canvas.krass-stars, #root::before, #root::after { display: none !important; }
    html, body { background: #fff !important; }
    img[alt="logo"] { animation: none !important; filter: none !important; }
}
.animated-background { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
