/* Блокируем страницу */
body.loading {
    pointer-events: none;
    user-select: none;
}

/* Лёгкое затемнение */
body.loading::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(1px);
    z-index: 9998;
}

.dark.loading::after {
    background: rgba(0,0,0,0.22);
}

/* Центральный кружок */
body.loading::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    margin-top: -21px;
    margin-left: -21px;
    border-radius: 50%;
    z-index: 9999;

    border: 4px solid rgba(0,0,0,0.15);
    border-top-color: rgba(0,0,0,0.45);

    animation: spinLoader 0.7s linear infinite;
}

/* Dark theme — белый круг */
.dark.loading::before {
    border-color: rgba(255,255,255,0.15);
    border-top-color: rgba(255,255,255,0.55);
}

@keyframes spinLoader {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}



@keyframes fav-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    40% {
        transform: scale(1.25);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-fav-pulse {
    animation: fav-pulse 0.35s ease-in-out;
}