/* Estilos generales del fondo de la página */
body {
    background: #c7dfec;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    /* Configuración del fondo para que sea fijo */
    background-image: url('LOGO_GORELL.jpg');
    background-repeat: no-repeat;
    background-attachment: fixed; /* Crucial para la alineación */
    margin: 0;
    padding: 0;
}

/* CONTENEDOR FLOTANTE */
.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 500px;
    height: 700px;
    background: #fff;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: #13b5ea;
    color: white;
    padding: 12px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 2; /* Asegura que el header tape el fondo */
}

/* Caja de mensajes con el fondo sincronizado */
.chat-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    
    /* Sincronización con el fondo del body */
    /*background-image: url('LOGO_GORELL.jpg');
    background-repeat: repeat;
    background-attachment: fixed;*/ /* Esto hace que coincida con el body */
    
    /* Opcional: Un ligero overlay para que los mensajes se lean mejor */
    background-color: rgb(240, 247, 248); 
    background-blend-mode: overlay; 
}

/* El resto de los estilos se mantienen igual */
.header .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    object-fit: cover;
}

.message {
    max-width: 85%;
    padding: 10px 14px;
    margin: 8px 0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.message.bot {
    text-align: justify;
    white-space: pre-line;
    background: white;
    margin-right: auto;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.user {
    background: #dcf8c6;
    margin-left: auto;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.input-area {
    display: flex;
    border-top: 1px solid #ccc;
    background: white;
    flex-shrink: 0;
    z-index: 2;
}

.input-area input {
    flex: 1;
    padding: 12px;
    border: none;
    outline: none;
}

.input-area button {
    background: #13b5ea;
    color: white;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    font-weight: bold;
}