/* Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(180deg, rgb(31, 33, 37) 0%, rgb(7, 7, 7) 100%); 
    font-family: "Kumbh Sans", sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto; 
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #1f212500;
    color: #fff;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column; /* Cambiar diseño a vertical */
        align-items: flex-start; /* Alinear al inicio */
    }

    .logo {
        margin-bottom: 10px; /* Agregar espacio entre el logo y la versión */
    }

    .version {
        font-size: 0.7rem; /* Reducir tamaño de fuente de la versión */
    }
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.version {
    color: #aaa;
    font-size: 0.8rem;
    font-weight: 200;
}

/* Contenedor Principal del Chat */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 5rem 4rem 5rem;
    opacity: 1;
    overflow: auto;
}

@media (max-width: 768px) {
    .chat-container {
        padding: 0 2rem 2rem 2rem; /* Reducir paddings en pantallas medianas */
    }
}

@media (max-width: 480px) {
    .chat-container {
        padding: 0 1rem 1rem 1rem; /* Reducir más en pantallas pequeñas */
    }
}

/* Historial de Chat con Estilos de Mensajes */
.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    opacity: 1;
    border-radius: 10px;
    word-wrap: break-word;
}

/* Mensajes en el Chat */
.message-container {
    display: flex;
    margin-bottom: 1rem;
}

/* Cambiar alineaciones */
.left {
    justify-content: flex-end; /* Cambiar respuestas al lado derecho */
}

.right {
    justify-content: flex-start; /* Cambiar preguntas al lado izquierdo */
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 25px;
    max-width: 80%;
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
}

@media (max-width: 480px) {
    .message {
        font-size: 0.8rem; /* Para pantallas pequeñas */
    }
}

.question {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); /* Opcional: sombra para resaltar */
    background-color: #1F2125;
    border-radius: 30px; /* Opcional: bordes redondeados */
    color: #fff;
}

.answer {
    opacity: 1;
    color: #fff;
}

/* Estilos para listas dentro de respuestas */
.answer ul,
.answer ol {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
    display: block;
}

.answer li {
    display: list-item; 
    margin-right: 0.5rem; 
}

/* Formulario Fijo en la Parte Inferior */
.form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #1F2125;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); /* Opcional: sombra para resaltar */
    border-radius: 30px; /* Opcional: bordes redondeados */
}

@media (max-width: 768px) {
    .form-container {
        width: 90%; /* Pantallas medianas */
    }

    @media (max-width: 480px) {
        .form-container {
            width: 95%; /* Pantallas pequeñas */
        }
    }
}

.prompt-input {
    flex: 1;
    padding: 10px;
    font-size: 1rem;
    font-family: "Kumbh Sans", sans-serif;
    border: none;
    background-color: #1F2125;
    color: #fff;
    border-radius: 30px;
    margin-right: 10px;
    outline: none;
}

.submit-button {
    background-color: transparent; /* Hacemos transparente el fondo */
    border: none; /* Eliminamos el borde */
    cursor: pointer; /* Muestra el cursor de clic */
    padding: 0; /* Eliminamos el padding interno */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Hacemos el botón redondo (opcional) */
    width: 40px; /* Ajusta el tamaño del botón */
    height: 40px;
}

@media (max-width: 480px) {
    .submit-button {
        width: 30px; /* Reducir el ancho del botón */
        height: 30px; /* Reducir la altura del botón */
    }
}

.submit-icon {
    width: 100%; /* El ícono ocupa todo el botón */
    height: 100%;
    object-fit: contain; /* Ajusta el SVG dentro del contenedor */
}
  
  .blob-container {
    width: 100%;
    height: 100%;
  }

.answer-text {
    display: block;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    margin-right: 0;
}

.copy-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.3s;
    opacity: 0.7; /* Botón menos visible inicialmente */
}

.copy-button:hover {
    opacity: 1; /* Resalta al pasar el cursor */
    transform: scale(1.1); /* Animación al pasar el cursor */
}

.copy-button:active {
    transform: scale(0.9); /* Feedback al hacer clic */
}

.copy-button .icon {
    width: 20px; /* Tamaño del ícono */
    height: 20px;
}

.message.answer {
    display: block;
    padding: 10px;
    border-radius: 8px;
    position: relative;

    white-space: normal;
    overflow: hidden;
    text-align: left;
}

/* Contenedor para el mensaje de bienvenida */
.message-container.welcome {
    display: flex;
    justify-content: flex-start; /* Alineación específica si es necesario */
    margin-bottom: 1rem;
}

/* Estilos específicos del mensaje de bienvenida */
.message.welcome-message {
    opacity: 1;
    color: #111;
    padding: 1rem;
    border-radius: 30px;
    max-width: 80%;
}

#title{
    font-weight: 200;
}

/* Animación de puntos suspensivos */
.typing-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px; /* Espacio entre los puntos */
}

.typing-indicator .dot {
    font-size: 16px;
    font-weight: 800;
    color: #111;
    border-radius: 50%; /* Forma redonda */
    animation: blink 1.5s infinite ease-in-out; /* Animación infinita */
}

/* Animación: parpadeo */
.typing-indicator .dot:nth-child(1) {
    animation-delay: 0s;
}
.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.3s;
}
.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.6s;
}

/* Keyframes para la animación */
@keyframes blink {
    0%, 80%, 100% {
        opacity: 0; /* Invisible */
    }
    40% {
        opacity: 1; /* Visible */
    }
}



@media (max-width: 768px) {
    body {
        padding: 0;
        flex-direction: column; /* Cambiar la disposición a vertical */
    }

    .chat-container {
        padding: 0 2rem 2rem 2rem; /* Reducir márgenes laterales */
    }

    .form-container {
        width: 90%; /* Hacer el formulario más pequeño */
        bottom: 10px; /* Subir el formulario */
    }

    .logo {
        font-size: 1.25rem; /* Reducir tamaño del logo */
    }

    .message {
        max-width: 90%; /* Reducir el ancho máximo de los mensajes */
        font-size: 0.9rem; /* Disminuir el tamaño de texto */
    }

    .avatar {
        height: 35px; /* Reducir tamaño del avatar */
        width: 35px;
    }
}


@media (max-width: 480px) {
    .chat-container {
        padding: 0 1rem 1rem 1rem; /* Ajustar paddings a pantallas pequeñas */
    }

    .form-container {
        width: 95%; /* Hacer el formulario más pequeño */
        bottom: 5px; /* Subir aún más el formulario */
    }

    .message {
        max-width: 100%; /* Permitir que los mensajes ocupen todo el ancho */
        font-size: 0.8rem; /* Reducir el tamaño de texto */
    }

    .logo {
        font-size: 1rem; /* Reducir aún más el tamaño del logo */
    }

    .submit-button {
        width: 30px; /* Reducir el tamaño del botón de envío */
        height: 30px;
    }

    .avatar {
        height: 30px; /* Reducir más el tamaño del avatar */
        width: 30px;
    }
}

.welcome-text {
    color: #fff;
    font-size: 1rem;
}

.avatar {
    width: auto; /* Ajuste automático del ancho */
    height: 70px; /* Define un tamaño fijo de altura */
    aspect-ratio: 1 / 1; /* Mantiene proporciones cuadradas */
    border-radius: 50%; /* Hace la imagen redonda */
    margin-right: 10px; /* Espacio entre el avatar y el texto */
    object-fit: cover; /* Ajusta la imagen para que encaje sin distorsión */
    align-self: flex-end; /* Alinea el avatar en la parte inferior del mensaje */
    box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.5); /* Sombra suave */
}

.avatar-3d {
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;

}
