/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Fondo general */
body {
    background-color: #f4f6f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Contenedor principal */
.chat-container {
    background-color: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 20px;
}

.header-image {
    width: 120px;
    border-radius: 50%;
    margin-bottom: 15px;
    animation: zoomIn 1s ease-out;
}

h1 {
    font-size: 2em;
    color: #3498db;
    margin-top: 0;
    font-weight: bold;
}

/* Caja de chat */
.chat-box {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    background: #f9fafc;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.chat-box:hover {
    background-color: #f1f5f9;
}

/* Mensajes de usuario y bot */
.user-message, .bot-message {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    width: fit-content;
    max-width: 75%;
}

.user-message {
    background-color: #e1f5fe;
    color: #2c3e50;
    align-self: flex-end;
}

.bot-message {
    background-color: #d1f7d1;
    color: #27ae60;
    align-self: flex-start;
}


.typing {
    display: flex;
    align-items: center;
    gap: 8px; /* Aumenté la separación entre los puntos */
    padding: 12px;
    border-radius: 12px;
    background-color: #d1f7d1;
    color: #27ae60;
    width: 65px; /* Ajusté el ancho para que los puntos no queden demasiado pegados */
    justify-content: center;
}


.dot {
    width: 8px;
    height: 8px;
    background-color: #27ae60;
    border-radius: 50%;
    animation: typingAnimation 1.5s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
    100% {
        opacity: 0.3;
        transform: scale(1);
    }
}

/* Estilos del input y botón */
.input-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#user-input {
    width: 80%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 1em;
}

/* Botón de enviar */
.send-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px 24px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-left: 10px;
}

.send-btn:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
    }
    to {
        transform: scale(1);
    }
}
