/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VOICE ORB - OpenAI-style animated orb for Voice mode
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.voice-orb-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    overflow: hidden;
}

.voice-orb-container.hidden {
    display: none;
}

/* Main orb */
.voice-orb {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

/* Core sphere */
.orb-core {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(139, 92, 246, 0.9) 0%,
        rgba(99, 102, 241, 0.7) 50%,
        rgba(59, 130, 246, 0.5) 100%
    );
    box-shadow:
        0 0 60px rgba(139, 92, 246, 0.6),
        0 0 100px rgba(99, 102, 241, 0.4),
        inset 0 0 60px rgba(139, 92, 246, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

/* Outer glow rings */
.orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.3);
    animation: ripple 3s ease-out infinite;
}

.orb-ring:nth-child(1) {
    width: 120%;
    height: 120%;
    animation-delay: 0s;
}

.orb-ring:nth-child(2) {
    width: 140%;
    height: 140%;
    animation-delay: 1s;
}

.orb-ring:nth-child(3) {
    width: 160%;
    height: 160%;
    animation-delay: 2s;
}

/* Particle effects */
.orb-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.orb-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(139, 92, 246, 0.8);
    border-radius: 50%;
    animation: particle-float 4s ease-in-out infinite;
}

.orb-particle:nth-child(1) {
    top: 20%;
    left: 30%;
    animation-delay: 0s;
}

.orb-particle:nth-child(2) {
    top: 60%;
    left: 70%;
    animation-delay: 1.3s;
}

.orb-particle:nth-child(3) {
    top: 40%;
    left: 10%;
    animation-delay: 2.6s;
}

.orb-particle:nth-child(4) {
    top: 80%;
    left: 50%;
    animation-delay: 1s;
}

.orb-particle:nth-child(5) {
    top: 10%;
    left: 80%;
    animation-delay: 2s;
}

/* Status indicator */
.orb-status {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ANIMATIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes particle-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(10px, -10px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translate(-5px, -20px) scale(0.8);
        opacity: 1;
    }
    75% {
        transform: translate(-15px, -10px) scale(1.1);
        opacity: 0.7;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STATES - Listening, Thinking, Speaking
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Listening state (user is speaking) */
.voice-orb.listening .orb-core {
    background: radial-gradient(circle at 30% 30%,
        rgba(34, 197, 94, 0.9) 0%,
        rgba(16, 185, 129, 0.7) 50%,
        rgba(5, 150, 105, 0.5) 100%
    );
    box-shadow:
        0 0 60px rgba(34, 197, 94, 0.6),
        0 0 100px rgba(16, 185, 129, 0.4),
        inset 0 0 60px rgba(34, 197, 94, 0.3);
    animation: pulse-fast 0.8s ease-in-out infinite;
}

.voice-orb.listening .orb-ring {
    border-color: rgba(34, 197, 94, 0.4);
    animation: ripple-fast 1.5s ease-out infinite;
}

/* Thinking state (processing) */
.voice-orb.thinking .orb-core {
    background: radial-gradient(circle at 30% 30%,
        rgba(251, 191, 36, 0.9) 0%,
        rgba(245, 158, 11, 0.7) 50%,
        rgba(217, 119, 6, 0.5) 100%
    );
    box-shadow:
        0 0 60px rgba(251, 191, 36, 0.6),
        0 0 100px rgba(245, 158, 11, 0.4),
        inset 0 0 60px rgba(251, 191, 36, 0.3);
    animation: pulse-thinking 1.2s ease-in-out infinite;
}

.voice-orb.thinking .orb-ring {
    border-color: rgba(251, 191, 36, 0.4);
}

/* Speaking state (bot is responding) */
.voice-orb.speaking .orb-core {
    background: radial-gradient(circle at 30% 30%,
        rgba(59, 130, 246, 0.9) 0%,
        rgba(37, 99, 235, 0.7) 50%,
        rgba(29, 78, 216, 0.5) 100%
    );
    box-shadow:
        0 0 60px rgba(59, 130, 246, 0.6),
        0 0 100px rgba(37, 99, 235, 0.4),
        inset 0 0 60px rgba(59, 130, 246, 0.3);
    animation: pulse-speaking 0.6s ease-in-out infinite;
}

.voice-orb.speaking .orb-ring {
    border-color: rgba(59, 130, 246, 0.4);
    animation: ripple-fast 1s ease-out infinite;
}

@keyframes pulse-fast {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

@keyframes pulse-thinking {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.08) rotate(5deg);
    }
}

@keyframes pulse-speaking {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    75% {
        transform: scale(1.05);
    }
}

@keyframes ripple-fast {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}
