/* Animated Parasites Background */
.parasite-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    background-color: rgba(30, 60, 90, 0.1); /* Subtle microscopic liquid tint */
}

.parasite {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
}

/* Amastigote */
.amastigote {
    width: 40px;
    height: 40px;
    animation: float 15s infinite ease-in-out;
}

/* Promastigote */
.promastigote {
    width: 120px;
    height: 40px;
    animation: swim 20s infinite linear;
}

/* Depth Perception via CSS Variables */
.depth-bg {
    --p-scale: 0.45;
    opacity: 0.3;
    filter: blur(3px);
}
.depth-mid {
    --p-scale: 0.75;
    opacity: 0.65;
    filter: blur(1px);
}
.depth-fg {
    --p-scale: 1.2;
    opacity: 0.95;
    filter: blur(0px);
}

/* Speed adjustments based on depth (things further away appear to move slower) */
.depth-bg.amastigote { animation-duration: 28s; }
.depth-mid.amastigote { animation-duration: 20s; }
.depth-fg.amastigote { animation-duration: 14s; }

.depth-bg.promastigote { animation-duration: 35s; }
.depth-mid.promastigote { animation-duration: 25s; }
.depth-fg.promastigote { animation-duration: 16s; }

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg) scale(var(--p-scale, 1)); }
    33% { transform: translateY(-15px) translateX(10px) rotate(15deg) scale(var(--p-scale, 1)); }
    66% { transform: translateY(10px) translateX(-10px) rotate(-10deg) scale(var(--p-scale, 1)); }
}

@keyframes swim {
    0% { transform: translateX(110vw) translateY(0) rotate(-8deg) scale(var(--p-scale, 1)); }
    25% { transform: translateX(75vw) translateY(-25px) rotate(5deg) scale(var(--p-scale, 1)); }
    50% { transform: translateX(50vw) translateY(15px) rotate(-5deg) scale(var(--p-scale, 1)); }
    75% { transform: translateX(25vw) translateY(-15px) rotate(8deg) scale(var(--p-scale, 1)); }
    100% { transform: translateX(-150px) translateY(0) rotate(-12deg) scale(var(--p-scale, 1)); }
}

/* Positioning */
.amastigote:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; }
.amastigote:nth-child(2) { top: 65%; left: 85%; animation-delay: -5s; }
.amastigote:nth-child(3) { top: 85%; left: 30%; animation-delay: -12s; }
.amastigote:nth-child(4) { top: 25%; left: 65%; animation-delay: -3s; }
.amastigote:nth-child(5) { top: 50%; left: 45%; animation-delay: -8s; }

.promastigote:nth-child(6) { top: 25%; animation-delay: 0s; }
.promastigote:nth-child(7) { top: 75%; animation-delay: -15s; }
.promastigote:nth-child(8) { top: 45%; animation-delay: -6s; }
.promastigote:nth-child(9) { top: 85%; animation-delay: -22s; }
.promastigote:nth-child(10) { top: 10%; animation-delay: -30s; }
