/* Estilos generales del cuerpo */
body {
    background-color: #f4f4f9;
    color: #333;
    font-family: 'Roboto', sans-serif;
}

/* Contenedor principal del chat */
.chat-container {
    max-width: 100%;
    margin: 4px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Encabezado del chat */
.chat-header {
    background: #3c3c3c;
    color: white;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #ddd;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px; /* Añade espacio entre elementos */
}

.header-content span {
    font-size: 1.4rem;
    font-weight: bold;
}

#reset-chat-btn {
    background-color: transparent;
    border: 1px solid #a297e0;
    color: white;
}

#reset-chat-btn:hover {
    background-color: #a297e0;
}

#model-selector {
    width: auto;
    background-color: #7163c1;
    color: white;
    border-color: #8d81d6;
}

#model-selector:focus {
    background-color: #7163c1;
    color: white;
    border-color: #a297e0;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

/* Ventana de mensajes */
#chat-window {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Estilo base para cada mensaje */
.message {
    display: flex;
    align-items: flex-end;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contenedor de la burbuja del mensaje */
.message-bubble {
    padding: 12px 18px;
    border-radius: 20px;
    line-height: 1.5;
}

/* Mensajes del usuario (a la derecha) */
.message-user {
    align-self: flex-end;
}

.message-user .message-bubble {
    background-color: #327100;
    color: white;
    border-bottom-right-radius: 5px;
}

/* Mensajes del bot (a la izquierda) */
.message-bot {
    align-self: flex-start;
}

.message-bot .message-bubble {
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 5px;
}

/* Formulario de entrada */
#chat-form {
    display: flex;
    padding: 15px;
    border-top: 1px solid #ddd;
    background: #f8f9fa;
}

#message-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 25px;
    margin-right: 10px;
    transition: box-shadow 0.2s;
}

#message-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

/* Botón de enviar */
#chat-form button {
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: bold;
}
