/* ===================================
   SOUND DETECTION ALERT CARD
   Visual alerts for hearing-impaired users
   =================================== */

.sound-alert-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 600px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.1);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: alertPulse 2s ease-in-out infinite;
}

.sound-alert-card.show {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

/* Fire Alarm - Red */
.sound-alert-card.fire-alarm {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Baby Cry - Pink/Purple */
.sound-alert-card.baby-cry {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.95) 0%, rgba(168, 85, 247, 0.95) 100%);
    box-shadow: 0 20px 60px rgba(236, 72, 153, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Door Knock - Blue */
.sound-alert-card.door-knock {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

@keyframes alertPulse {
    0%, 100% {
        box-shadow: 0 20px 60px rgba(239, 68, 68, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 20px 70px rgba(239, 68, 68, 0.8), 0 0 0 5px rgba(255, 255, 255, 0.3);
    }
}

.alert-icon-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.alert-icon-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    animation: iconBounce 1s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.alert-icon {
    font-size: 3.5rem;
    color: white;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.alert-pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}

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

.alert-content {
    text-align: center;
    color: white;
}

.alert-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.alert-confidence {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.alert-details {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.alert-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.alert-info-item:last-child {
    margin-bottom: 0;
}

.alert-info-item i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.alert-info-item strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.alert-info-item p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

.alert-vibration-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
}

.alert-vibration-info i {
    font-size: 1.5rem;
    animation: vibrationShake 0.5s ease-in-out infinite;
}

@keyframes vibrationShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.alert-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Responsive Alert Card */
@media (max-width: 768px) {
    .sound-alert-card {
        width: 95%;
        padding: 1.5rem;
    }
    
    .alert-title {
        font-size: 1.5rem;
    }
    
    .alert-icon-container {
        width: 100px;
        height: 100px;
    }
    
    .alert-icon-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .alert-icon {
        font-size: 2.5rem;
    }
    
    .alert-info-item {
        font-size: 0.9rem;
    }
}

/* ===================================
   ENHANCED VISUALIZER ANIMATIONS
   =================================== */

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px currentColor;
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 40px currentColor;
    }
}

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