@media (max-width: 768px) {
    .titulo-boas-vindas {
        position: relative;
        top: 0;
        left: 0;
        text-align: center;
        font-size: 2.5rem;
        margin-top: 20px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); } /* Começa invisível e levemente abaixo */
    to { opacity: 1; transform: translateY(0); }    /* Termina visível na posição original */
}

/* Animação exclusiva para o título com um leve movimento */
@keyframes fadeInTitulo {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes fadeInEsquerda {
    from { 
        opacity: 0; 
        transform: translateX(-50px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.titulo-boas-vindas {
    font-size: 3.5rem; /* Um pouco menor para caber melhor no canto */
    font-weight: 600;
    color: #343a40;
    text-align: left; /* Alinhado à esquerda */
    
    /* Posicionamento */
    position: absolute;
    top: 40px;
    left: 50px;
    margin: 0;

    letter-spacing: -1.5px;
    opacity: 0;
    animation: fadeInEsquerda 3s ease-out forwards;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    /* Cinza claríssimo profissional */
    background-color: #b8b8b8; 
    transition: opacity 0.8s ease-in-out;
    opacity: 1;
    overflow: hidden;
    animation: fadeIn 1.2s ease-out forwards;
}

.login-container {
    opacity: 0;
    animation: fadeIn 1.2s ease-out 0.4s forwards;
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
    /* Sombra bem leve para não quebrar o minimalismo */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.input_login {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-sizing: border-box;
}

.input_btn {
    width: 100%;
    padding: 15px;
    background-color: #3f3f3f; /* Botão escuro para contraste elegante */
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.5s;
}

.input_btn:hover {
    background-color: #000000;
}

/* Estilo do Container de Chat */
.chat-wrapper {
    max-width: 800px;
    margin: 50px auto;
    background: white;
    padding:20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 80vh;
}

#chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Bolhas de Mensagem */
.msg {
    margin-bottom: 15px;
    padding: 15px 20px; /* Aumenta o respiro interno da bolha */
    border-radius: 18px;
    line-height: 1.6;    /* Aumenta o espaço entre as linhas das letras */
    letter-spacing: 0.3px; /* Dá um leve respiro entre cada letra */
    word-wrap: break-word;
    font-family: 'Poppins', sans-serif; /* Garante uma fonte mais legível */
}

.user-msg {
    align-self: flex-end;
    background-color: #007bff;
    color: white;
}

.ia-msg {
    white-space: pre-wrap;
    background-color: #f8f9fa; /* Um cinza mais suave */
    color: #212529;
    line-height: 1.7; /* Aumenta um pouco mais o respiro entre linhas */
    padding: 18px 25px;
    border-radius: 15px 15px 15px 2px; /* Estilo bolha moderna */
    border: 1px solid #e9ecef;
}

/* Garante que negritos e listas fiquem destacados dentro da bolha */
.ia-msg b, .ia-msg strong {
    color: #000;
    font-weight: 600;
}

/* Área de Input */
.input-area {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.input-area input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
}

.btn-reset-base {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #ced4da;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset-base:hover {
    background-color: #f8f9fa;
    color: #343a40;
    border-color: #adb5bd;
}

/* Estilo para quando o botão estiver desativado (carregando) */
.btn-reset-base:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-confirmar-edicao {
    background-color: #28a745; /* Verde sucesso */
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    display: block;
    width: fit-content;
    transition: background 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-confirmar-edicao:hover {
    background-color: #218838;
}

.btn-confirmar-edicao:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}