/* Video-Chat Avatar Animationen */

@keyframes avatarIdle {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    50% { 
        transform: scale(1.05) rotate(1deg); 
        box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    }
}

@keyframes avatarSpeaking {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    25% { 
        transform: scale(1.1); 
        box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    }
    75% { 
        transform: scale(1.05); 
        box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    }
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: scale(1.5); 
        opacity: 0; 
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    50% {
        box-shadow: 0 10px 30px rgba(52, 152, 219, 0.6), 0 0 20px rgba(52, 152, 219, 0.4);
    }
}

/* Avatar Speaking Rings */
.speaking-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.speaking-rings .ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.speaking-rings .ring:nth-child(2) {
    animation-delay: 0.5s;
    border-color: rgba(255,255,255,0.2);
}

/* Avatar Hover-Effekte */
.agent-avatar:hover {
    transform: scale(1.1) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
}

/* Video-Container Styling */
.video-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* User Video Container */
#userVideoContainer {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#userVideoContainer:hover {
    transform: scale(1.05);
}

/* Chat Messages Styling */
.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f8f9fa;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Video Controls Styling */
.video-controls .btn {
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.video-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Agent Status Badge */
.badge {
    transition: all 0.3s ease;
    font-size: 0.9rem;
    padding: 8px 12px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .video-container {
        min-height: 300px;
    }
    
    .agent-avatar {
        width: 150px !important;
        height: 150px !important;
        font-size: 3rem !important;
    }
    
    #userVideoContainer {
        width: 100px !important;
        height: 75px !important;
    }
}

@media (max-width: 768px) {
    .video-container {
        min-height: 250px;
        padding: 15px;
    }
    
    .agent-avatar {
        width: 120px !important;
        height: 120px !important;
        font-size: 2.5rem !important;
    }
    
    #userVideoContainer {
        width: 80px !important;
        height: 60px !important;
        top: 10px !important;
        right: 10px !important;
    }
    
    .video-controls .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Loading Animation für Avatar */
@keyframes avatarLoading {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.agent-avatar.loading {
    animation: avatarLoading 1.5s ease-in-out infinite;
}

/* Error State */
.agent-avatar.error {
    background: linear-gradient(45deg, #e74c3c, #c0392b) !important;
    animation: avatarIdle 3s ease-in-out infinite;
}

/* Success State */
.agent-avatar.connected {
    animation: glow 2s ease-in-out infinite;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .video-container {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .chat-messages {
        background: #2c3e50 !important;
        color: #ecf0f1;
    }
    
    .speaking-rings .ring {
        border-color: rgba(236, 240, 241, 0.3);
    }
} 