:root {
    --color-bg-blue: #f8fafc;
}

.wrapper {
    display: flex;
    position: fixed;
    /* Changed from absolute to fixed to ensure it covers screen */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    background: #f8fafc;
    /* Hardcoded for safety */
    z-index: 9999;
}

.loader {
    display: flex;
    position: relative;
    width: 150px;
    height: 88px;
}

.wave {
    display: flex;
    justify-content: space-between;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    /* perspective: 100px; REMOVED to prevent aliasing */
}

.wave>div {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.wave>div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    border-radius: 50%;
    /* Add slight shadow for depth/sharpness */
    box-shadow: 0 0 4px rgba(0, 180, 216, 0.4);
}

.top-wave>div {
    animation: move 2s ease-in-out infinite reverse;
}

.top-wave>div::before {
    animation: grow 2s linear infinite reverse;
}

.bottom-wave>div {
    animation: move 2s ease-in-out infinite;
}

.bottom-wave>div::before {
    animation: grow 2s linear infinite;
}

/* ... delays remain unchanged ... */
.wave>div:nth-child(10) {
    animation-delay: 0s;
}

.wave>div:nth-child(9) {
    animation-delay: -0.1s;
}

.wave>div:nth-child(8) {
    animation-delay: -0.2s;
}

.wave>div:nth-child(7) {
    animation-delay: -0.3s;
}

.wave>div:nth-child(6) {
    animation-delay: -0.4s;
}

.wave>div:nth-child(5) {
    animation-delay: -0.5s;
}

.wave>div:nth-child(4) {
    animation-delay: -0.6s;
}

.wave>div:nth-child(3) {
    animation-delay: -0.7s;
}

.wave>div:nth-child(2) {
    animation-delay: -0.8s;
}

.wave>div:nth-child(1) {
    animation-delay: -0.9s;
}

.bottom-wave>div:nth-child(10) {
    animation-delay: 1s;
}

.bottom-wave>div:nth-child(9) {
    animation-delay: 0.9s;
}

.bottom-wave>div:nth-child(8) {
    animation-delay: 0.8s;
}

.bottom-wave>div:nth-child(7) {
    animation-delay: 0.7s;
}

.bottom-wave>div:nth-child(6) {
    animation-delay: 0.6s;
}

.bottom-wave>div:nth-child(5) {
    animation-delay: 0.5s;
}

.bottom-wave>div:nth-child(4) {
    animation-delay: 0.4s;
}

.bottom-wave>div:nth-child(3) {
    animation-delay: 0.3s;
}

.bottom-wave>div:nth-child(2) {
    animation-delay: 0.2s;
}

.bottom-wave>div:nth-child(1) {
    animation-delay: 0.1s;
}


@keyframes move {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(88px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes grow {

    0%,
    100% {
        transform: scale(0.6);
        opacity: 0.7;
    }

    25% {
        transform: scale(1.2);
        opacity: 1;
        z-index: 2;
    }

    50% {
        transform: scale(0.6);
        opacity: 0.7;
    }

    75% {
        transform: scale(0.3);
        opacity: 0.5;
        z-index: -2;
    }
}