  body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background: #1a1a1a; /* Fondo oscuro */
    color: #e0e0e0; /* Texto claro */
    display: grid;
    place-content: center;
    height: 100dvh;
    margin: 0;
}

aside {
    background: #2a2a2a; /* Fondo oscuro */
    border: 1px solid #444; /* Borde más oscuro */
    border-radius: 12px; /* Bordes más redondeados */
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); /* Sombra más pronunciada */
    color: #e0e0e0; /* Texto claro */
}

aside label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
    color: #e0e0e0; /* Texto claro */
}

aside select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 999999px;
    border: 1px solid #444; /* Borde oscuro */
    background: #2a2a2a; /* Fondo oscuro */
    color: #e0e0e0; /* Texto claro */
    outline: none;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

aside select:focus {
    border-color: #007bff; /* Borde azul al enfocar */
}

aside select option {
    background: #2a2a2a; /* Fondo oscuro */
    color: #e0e0e0; /* Texto claro */
}

main {
    width: 400px;
    max-width: 100%;
    height: 70vh;
    background: #2a2a2a; /* Fondo oscuro para el contenedor principal */
    border: 1px solid #444; /* Borde más oscuro */
    border-radius: 12px; /* Bordes más redondeados */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); /* Sombra más pronunciada */
    padding: 16px;
    margin-bottom: 16px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
}

.message {
    display: flex;
    flex-direction: column;
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 12px; /* Bordes más redondeados */

    span {
        width: 36px;
        height: 36px;
        background: #444; /* Fondo oscuro para el ícono */
        font-size: 12px;
        font-weight: 500;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 999999px;
        color: #e0e0e0; /* Texto claro */
    }

    p {
        border-radius: 8px; /* Bordes más redondeados */
        padding: 8px 12px;
        margin-top: 8px;
        background: #3a3a3a; /* Fondo oscuro para los mensajes */
        color: #e0e0e0; /* Texto claro */
    }

    &.user {
        align-self: flex-end;
        align-items: flex-end;

        span,
        p {
            /* background: #007bff; */ /* Azul para mensajes del usuario */
            background: #004494;
            color: #fff; /* Texto blanco */
        }
    }

    &.bot {
        align-self: flex-start;

        span,
        p {
            /* background: #28a745; */ /* Verde para mensajes del bot */
            background: #156f2c;
            color: #fff; /* Texto blanco */
        }
    }
}

form {
    display: flex;
    gap: 8px;

    /* input {
        border-radius: 999999px;
        flex-grow: 1;
        border: 1px solid #444; */ /* Borde oscuro */
        /* padding: 8px 16px;
        background: #2a2a2a; */ /* Fondo oscuro */
        /* color: #e0e0e0; */ /* Texto claro */
        /* outline: none;

        &:focus {
            border-color: #007bff; */ /* Borde azul al enfocar */
        /* } 
    } */

    button {
        background: #007bff; /* Azul para el botón */
        border: 0;
        color: white;
        border-radius: 999999px;
        cursor: pointer;
        padding: 8px 16px;
        transition: background 0.3s ease;

        &[disabled] {
            background: #555; /* Fondo gris cuando está deshabilitado */
            opacity: 0.6;
            pointer-events: none;
        }

        &:hover {
            background: #0056b3; /* Azul más oscuro al pasar el mouse */
        }
    }
}

form textarea {
    border-radius: 999999px;
    flex-grow: 1;
    border: 1px solid #444;
    padding: 8px 16px;
    background: #2a2a2a;
    color: #e0e0e0;
    outline: none;
    resize: none; /* Evita que el usuario redimensione manualmente */
    overflow: hidden; /* Oculta el scroll */
    /* min-height: 40px; */ /* Altura mínima inicial */
    min-height: 20px;
    line-height: 1.5; /* Espaciado entre líneas */
  }
  
  form textarea:focus {
    border-color: #007bff;
  }

 /* New styles for file attachment */
 .input-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  #attach-button {
    padding: 8px;
    cursor: pointer;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    transition: background 0.3s ease;
  }

  #attach-button:hover {
    background: #3a3a3a;
  }

small {
    font-size: 10px;
    color: #888; /* Texto gris claro */
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    margin: auto;
    width: 400px;
    text-align: center;
}

.loading {
    text-align: center;
    display: flex;
    justify-content: center;
    height: 100%;
    align-items: center;
    flex-direction: column;
    margin-top: 50%;

    i {
        pointer-events: none;
        width: 2.5em;
        height: 2.5em;
        border: 0.4em solid transparent;
        border-color: #444; /* Borde oscuro */
        border-top-color: #007bff; /* Azul para el spinner */
        border-radius: 50%;
        animation: loadingspin 1s linear infinite;
    }

    h4 {
        color: #e0e0e0; /* Texto claro */
        margin-bottom: 8px;
    }

    h5 {
        font-weight: 400;
        margin: 0;
        font-size: 10px;
        opacity: 0.6;
        color: #888; /* Texto gris claro */
    }
}

@keyframes loadingspin {
    100% {
        transform: rotate(360deg);
    }
}