        .blue-gradient {
            background: linear-gradient(135deg, #0088cc 0%, #0055a5 100%);
        }
        .message-out {
            background-color: #dcf8c6;
            align-self: flex-end;
            border-radius: 0.75rem 0 0.75rem 0.75rem;
        }
        .message-in {
            background-color: white;
            align-self: flex-start;
            border-radius: 0 0.75rem 0.75rem 0.75rem;
        }
        .typing-indicator {
            display: inline-block;
        }
        .typing-indicator span {
            display: inline-block;
            width: 8px;
            height: 8px;
            background-color: #999;
            border-radius: 50%;
            margin-right: 3px;
            animation: typing 1.4s infinite ease-in-out;
        }
        .typing-indicator span:nth-child(1) {
            animation-delay: 0s;
        }
        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }
        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
            margin-right: 0;
        }
        @keyframes typing {
            0% { transform: scale(1); }
            50% { transform: scale(1.5); }
            100% { transform: scale(1); }
        }
        /* Estilos mejorados para el emoji picker */
        .emoji-mart {
            position: fixed !important; /* Cambiado de absolute a fixed */
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%); /* Centrado horizontal */
            z-index: 100;
            max-width: 90%; /* Limitar ancho en pantallas pequeñas */
            width: 338px !important; /* Ancho fijo estándar de emoji-mart */
        }
        @media (max-width: 400px) {
            .emoji-mart {
                width: 280px !important; /* Más pequeño en móviles */
                font-size: 12px; /* Texto más pequeño */
            }
        }
        .emoji-picker-trigger {
            cursor: pointer;
        }
        .emoji-picker-trigger:hover {
            color: #0088cc;
        }
        .message-image {
            max-width: 240px;
            max-height: 240px;
            border-radius: 8px;
            cursor: pointer;
        }
        .message-video {
            max-width: 240px;
            max-height: 320px;
            border-radius: 8px;
        }
        .message-file {
            display: flex;
            align-items: center;
            padding: 10px;
            border-radius: 8px;
            background-color: rgba(0,0,0,0.05);
        }
        .file-icon {
            font-size: 24px;
            margin-right: 10px;
        }
        .file-info {
            display: flex;
            flex-direction: column;
        }
        .file-name {
            font-weight: 500;
            margin-bottom: 4px;
            word-break: break-all;
        }
        .file-size {
            font-size: 12px;
            color: #666;
        }
        .message-status {
            display: flex;
            align-items: center;
            font-size: 12px;
            color: #999;
            margin-left: 5px;
        }
        .status-icon {
            margin-right: 3px;
        }
        
        /* ESTILOS MEJORADOS PARA LLAMADAS */
        .call-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0,0,0,0.9);
            z-index: 9999; /* Valor z-index más alto para asegurar que esté por encima de todo */
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            color: white;
        }
        .call-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        .call-header {
            margin-bottom: 30px;
            text-align: center;
            animation: fadeIn 0.5s ease-in-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @keyframes pulse {
            0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.4); }
            70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(0, 136, 204, 0); }
            100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 136, 204, 0); }
        }
        .call-avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: linear-gradient(135deg, #0088cc 0%, #0044cc 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 54px;
            margin: 0 auto 25px;
            border: 4px solid rgba(255, 255, 255, 0.8);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        }
        .incoming-pulse .call-avatar {
            animation: pulse 1.5s infinite;
        }
        .call-name {
            font-size: 28px;
            font-weight: 600;
            margin-bottom: 8px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }
        .call-status {
            font-size: 18px;
            opacity: 0.9;
            font-weight: 300;
        }
        .call-timer {
            font-size: 16px;
            opacity: 0.8;
            margin-top: 5px;
            font-family: monospace;
        }
        .call-video-container {
            width: 100%;
            max-width: 900px;
            height: 60vh;
            max-height: 600px;
            position: relative;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
            background-color: #1a1a1a;
            margin: 0 auto 30px;
        }
        .remote-video {
            width: 100%;
            height: 100%;
            background-color: #222;
            object-fit: cover;
        }
        .local-video {
            position: absolute;
            width: 180px;
            height: 240px;
            right: 20px;
            top: 20px;
            background-color: #333;
            border-radius: 10px;
            border: 2px solid white;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            object-fit: cover;
            transition: all 0.3s ease;
        }
        .local-video:hover {
            transform: scale(1.05);
        }
        .call-controls {
            display: flex;
            justify-content: center;
            margin-top: 30px;
            gap: 16px;
        }
        .call-btn {
            width: 65px;
            height: 65px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        }
        .call-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 7px 15px rgba(0,0,0,0.4);
        }
        .call-btn:active {
            transform: translateY(1px);
            box-shadow: 0 2px 5px rgba(0,0,0,0.4);
        }
        .accept-btn {
            background-color: #4CAF50;
        }
        .reject-btn {
            background-color: #F44336;
        }
        .video-btn {
            background-color: #2196F3;
        }
        .mic-btn {
            background-color: #9E9E9E;
        }
        .video-btn.disabled, .mic-btn.disabled {
            background-color: #F44336;
        }
        .call-status-indicator {
            position: absolute;
            top: 10px;
            left: 10px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: #4CAF50;
        }
        .text-only-call {
            padding: 30px;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            text-align: center;
            max-width: 90%;
            width: 400px;
        }
        .text-only-call h3 {
            font-size: 22px;
            margin-bottom: 15px;
            color: white;
        }
        .text-only-call p {
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 20px;
        }
        .call-connection-info {
            background-color: rgba(33, 150, 243, 0.2);
            border-radius: 8px;
            padding: 10px 15px;
            font-size: 14px;
            margin-top: 15px;
            display: inline-block;
        }
        
        /* Modal styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0,0,0,0.7);
            z-index: 200;
            justify-content: center;
            align-items: center;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
        }
        .modal.active {
            display: flex;
            opacity: 1;
            visibility: visible;
        }
        .modal-content {
            background-color: white;
            border-radius: 10px;
            max-width: 90%;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
            transform: scale(0.9);
            transition: transform 0.3s;
        }
        .modal.active .modal-content {
            transform: scale(1);
        }
        .image-preview {
            max-width: 100%;
            max-height: 80vh;
            border-radius: 10px;
        }
    