/* Video Call Modal - Neon / Dark Theme */
.video-call-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.video-call-container {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.video-streams {
    position: relative;
    flex: 1;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0a0a10;
}

#local-video {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 240px;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 2;
}

#local-video:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.call-info {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    pointer-events: none; /* Make click-through */
}

/* Remote User Info Badge */
.remote-user-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

#call-remote-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00b4d8;
    box-shadow: 0 0 15px rgba(0, 180, 216, 0.4);
}

.remote-user-details {
    display: flex;
    flex-direction: column;
}

#call-remote-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#call-status {
    font-size: 0.8rem;
    color: #00b4d8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Call Timer Badge */
.call-timer-badge {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

#call-timer {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace; /* Assuming monospace backup */
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Controls Bar */
.call-controls {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    background: rgba(20, 20, 25, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto; /* Push to bottom if container allows */
}

.call-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover effects */
.call-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.2);
}

.call-btn:active {
    transform: translateY(0);
}

/* State specific styles */
.call-btn.camera-on,
.call-btn.mic-on {
    background: rgba(0, 180, 216, 0.15);
    color: #00b4d8;
    border-color: rgba(0, 180, 216, 0.4);
    box-shadow: 0 0 15px rgba(0, 180, 216, 0.2);
}

.call-btn.camera-off,
.call-btn.mic-off {
    background: rgba(255, 69, 58, 0.15);
    color: #ff453a;
    border-color: rgba(255, 69, 58, 0.4);
    box-shadow: 0 0 15px rgba(255, 69, 58, 0.2);
    position: relative;
}

/* Slash through effect for off state (optional visual cue) */
.call-btn.camera-off::after,
.call-btn.mic-off::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
    opacity: 0.5;
    display: none; /* Icon usually handles this*/
}


.call-btn.end-call {
    background: linear-gradient(135deg, #ff453a, #ff0000);
    color: white;
    width: 72px;
    height: 72px;
    font-size: 2rem;
    box-shadow: 0 8px 25px rgba(255, 69, 58, 0.4);
    border: none;
}

.call-btn.end-call:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 69, 58, 0.6);
}

/* Incoming Call Notification */
.incoming-call-notification {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(25, 25, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    z-index: 10001;
    min-width: 380px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.incoming-call-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

.caller-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.caller-info img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #00b4d8;
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(0, 180, 216, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 180, 216, 0); }
}

.caller-info h3 {
    margin: 0;
    font-size: 1.6rem;
    color: #fff;
    font-weight: 700;
}

.caller-info p {
    margin: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.incoming-call-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.accept-btn,
.decline-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.accept-btn {
    background: linear-gradient(135deg, #4cd137, #44bd32);
    color: white;
    box-shadow: 0 8px 20px rgba(76, 209, 55, 0.3);
}

.accept-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(76, 209, 55, 0.5);
}

.decline-btn {
    background: transparent;
    color: #ff453a;
    border: 2px solid rgba(255, 69, 58, 0.3);
}

.decline-btn:hover {
    background: rgba(255, 69, 58, 0.1);
    border-color: #ff453a;
    transform: translateY(-3px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-call-container {
        padding: 0;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .video-streams {
        border-radius: 0;
        border: none;
    }
    
    #local-video {
        width: 100px;
        height: 133px;
        bottom: 110px;
        right: 16px;
        border-width: 2px;
        border-radius: 12px;
    }
    
    .call-controls {
        position: absolute;
        bottom: 20px;
        left: 20px;
        right: 20px;
        margin: 0;
        padding: 16px;
        gap: 16px;
    }
    
    .call-btn {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }
    
    .call-btn.end-call {
        width: 64px;
        height: 64px;
    }
    
    .call-info {
        top: 40px; /* Safe area */
    }
    
    .remote-user-badge {
        padding: 6px 14px;
    }
    #call-remote-avatar {
        width: 36px;
        height: 36px;
    }
    #call-remote-name {
        font-size: 0.95rem;
    }
    
    .incoming-call-notification {
        min-width: 90%;
        padding: 30px 20px;
        border-radius: 20px;
    }
}
