body.voice-overlay-lock {
    overflow: hidden;
}

.voice-overlay-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #020617 0, #020617 40%, #000000 100%);
}

.voice-overlay-backdrop.voice-overlay-visible {
    display: flex;
}

.voice-overlay-panel {
    width: 100%;
    height: 100%;
    padding: 48px 16px 32px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .voice-overlay-panel {
        padding: 56px 24px 40px;
    }
}

.voice-sphere-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.voice-sphere-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 640px) {
    .voice-sphere-container {
        width: 260px;
        height: 260px;
    }
}

.voice-sphere-core {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background:
            radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35) 0%, transparent 50%),
            radial-gradient(circle at 70% 70%, rgba(74, 158, 255, 0.9) 0%, transparent 60%),
            linear-gradient(135deg, #4a9eff 0%, #00d4ff 30%, #4affff 50%, #00d4ff 70%, #4a9eff 100%);
    box-shadow:
            0 0 60px rgba(74, 158, 255, 0.6),
            0 0 120px rgba(74, 158, 255, 0.4),
            inset 0 0 40px rgba(255, 255, 255, 0.15);
    filter: brightness(1.1);
}

@media (min-width: 640px) {
    .voice-sphere-core {
        width: 160px;
        height: 160px;
    }
}

.voice-sphere-glow {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.4) 0%, rgba(0, 212, 255, 0.2) 40%, transparent 70%);
    filter: blur(30px);
    animation: sphere-glow-pulse 4s ease-in-out infinite;
}

@media (min-width: 640px) {
    .voice-sphere-glow {
        width: 240px;
        height: 240px;
    }
}

.voice-sphere-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(74, 158, 255, 0.3);
    animation: sphere-ring-pulse 3s ease-out infinite;
}

.voice-sphere-ring-1 {
    width: 140px;
    height: 140px;
    animation-delay: 0s;
}

.voice-sphere-ring-2 {
    width: 140px;
    height: 140px;
    animation-delay: 1s;
}

.voice-sphere-ring-3 {
    width: 140px;
    height: 140px;
    animation-delay: 2s;
}

@media (min-width: 640px) {
    .voice-sphere-ring-1,
    .voice-sphere-ring-2,
    .voice-sphere-ring-3 {
        width: 180px;
        height: 180px;
    }
}

.voice-sphere-container.idle .voice-sphere-core {
    animation: sphere-breathe 6s ease-in-out infinite;
}

.voice-sphere-container.listening .voice-sphere-core {
    animation:
            sphere-morph-processing 1.5s ease-in-out infinite,
            sphere-rotate 8s linear infinite;
}

.voice-sphere-container.listening .voice-sphere-glow {
    animation: sphere-glow-intense 1s ease-in-out infinite;
}

.voice-sphere-container.processing .voice-sphere-core {
    animation: sphere-pulse-listening 2s ease-in-out infinite;
}

.voice-sphere-container.processing .voice-sphere-glow {
    animation: sphere-glow-pulse 2s ease-in-out infinite;
}

.voice-overlay-status-text {
    font-size: 1.1rem;
    color: #e5e7eb;
    text-align: center;
}

@media (min-width: 640px) {
    .voice-overlay-status-text {
        font-size: 1.25rem;
    }
}

.voice-overlay-actions {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.voice-overlay-button {
    border-radius: 999px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.7);
}

.voice-overlay-button-mic {
    width: 64px;
    height: 64px;
    background: #3b82f6;
    color: white;
}

.voice-overlay-button-mic-active {
    background: #ef4444;
}

.voice-overlay-button-close {
    width: 52px;
    height: 52px;
    background: #111827;
    color: #e5e7eb;
}

@media (min-width: 640px) {
    .voice-overlay-button-mic {
        width: 72px;
        height: 72px;
    }

    .voice-overlay-button-close {
        width: 56px;
        height: 56px;
    }
}

.voice-overlay-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-overlay-button svg {
    width: 24px;
    height: 24px;
}

@media (min-width: 640px) {
    .voice-overlay-button svg {
        width: 30px;
        height: 30px;
    }
}

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

@keyframes sphere-pulse-listening {
    0%,
    100% {
        transform: scale(1);
        box-shadow:
                0 0 60px rgba(74, 158, 255, 0.6),
                0 0 120px rgba(74, 158, 255, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow:
                0 0 80px rgba(74, 158, 255, 0.8),
                0 0 140px rgba(74, 158, 255, 0.6);
    }
}

@keyframes sphere-morph-processing {
    0%,
    100% {
        border-radius: 42% 58% 55% 45% / 48% 62% 38% 52%;
    }
    25% {
        border-radius: 58% 42% 45% 55% / 62% 48% 52% 38%;
    }
    50% {
        border-radius: 48% 52% 62% 38% / 45% 55% 42% 58%;
    }
    75% {
        border-radius: 52% 48% 38% 62% / 55% 45% 58% 42%;
    }
}

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

@keyframes sphere-glow-pulse {
    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.1);
    }
}

@keyframes sphere-glow-intense {
    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes sphere-ring-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.4);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}
