/* Animations for circles */

/* Animation layer styling */
.animation-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allow interactions to pass through */
}

/* Common circle styling */
.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.7;
    /* Add base transition for all properties */
    transition: all 2.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Border-only circles (for primary container) */
.circle-border {
    background-color: rgba(0, 0, 0, 0.8);
    
    /* blur */
    filter: blur(15px);

    border-width: 5px;
    border-style: solid;
}

/* Filled circles (for secondary container) */
.circle-filled {
    background-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color-50);
}

/* --- Pattern 1: Pulsing circles --- */
.circles-pulse .circle {
    background-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color);
    animation: pulse-size 8s infinite alternate cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.circles-pulse .circle:nth-child(2n) {
    background-color: var(--secondary-color);
    box-shadow: 0 0 20px var(--secondary-color);
    animation-delay: 0.5s;
}

.circles-pulse .circle:nth-child(3n) {
    background-color: var(--tertiary-color);
    box-shadow: 0 0 20px var(--tertiary-color);
    animation-delay: 1s;
}

@keyframes pulse-size {
    0% { transform: scale(0.5); opacity: 0.2; }
    50% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(0.5); opacity: 0.2; }
}

/* --- Pattern 2: Orbiting circles --- */
.circles-orbit .circle {
    background-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
    animation: orbit 15s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.circles-orbit .circle:nth-child(2n) {
    background-color: var(--secondary-color);
    box-shadow: 0 0 15px var(--secondary-color);
    animation-duration: 20s;
    animation-direction: reverse;
}

.circles-orbit .circle:nth-child(3n) {
    background-color: var(--tertiary-color);
    box-shadow: 0 0 15px var(--tertiary-color);
    animation-duration: 25s;
}

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(150px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}

/* --- Pattern 3: Floating circles --- */
.circles-float .circle {
    background-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    animation: float-around 20s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.circles-float .circle:nth-child(2n) {
    background-color: var(--secondary-color);
    box-shadow: 0 0 10px var(--secondary-color);
    animation-duration: 15s;
    animation-delay: 2s;
}

.circles-float .circle:nth-child(3n) {
    background-color: var(--tertiary-color);
    box-shadow: 0 0 10px var(--tertiary-color);
    animation-duration: 25s;
    animation-delay: 5s;
}

@keyframes float-around {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(100px, -100px); }
    50% { transform: translate(-50px, 150px); }
    75% { transform: translate(-150px, -50px); }
}

/* --- Pattern 4: Expanding rings --- */
.circles-expand .circle {
    animation: expand-fade 8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* Specific styling for expand animation with border circles */
.circles-expand .circle-border {
    border-width: 4px !important;
    background-color: transparent !important;
}

/* Specific styling for expand animation with filled circles */
.circles-expand .circle-filled {
    /* Keep the background-color as set by JS */
    filter: blur(2px);
}

.circles-expand .circle:nth-child(2n) {
    border-color: var(--secondary-color);
    animation-delay: 2s;
}

.circles-expand .circle:nth-child(3n) {
    border-color: var(--tertiary-color);
    animation-delay: 4s;
}

@keyframes expand-fade {
    0% { transform: scale(0.1); opacity: 0.9; }
    100% { transform: scale(3); opacity: 0; }
}

/* --- Pattern 5: Bouncing circles --- */
.circles-bounce .circle {
    background-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
    animation: bounce-diagonal 10s infinite;
}

.circles-bounce .circle:nth-child(2n) {
    background-color: var(--secondary-color);
    box-shadow: 0 0 15px var(--secondary-color);
    animation-direction: reverse;
    animation-delay: 1s;
}

.circles-bounce .circle:nth-child(3n) {
    background-color: var(--tertiary-color);
    box-shadow: 0 0 15px var(--tertiary-color);
    animation-duration: 15s;
    animation-delay: 3s;
}

@keyframes bounce-diagonal {
    0%, 100% { transform: translate(0, 0); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0); }
    25% { transform: translate(200px, 200px); animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); }
    50% { transform: translate(0, 400px); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0); }
    75% { transform: translate(-200px, 200px); animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); }
}
