  body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f1f1f1;
  }

  .chat-container {
    max-width: 600px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
  }

.chat-header {
  position: relative;
  padding: 15px;
  background-color: #000;
  color: white;
  font-size: 20px;
  text-align: center;
}

.chat-header img.chat-logo {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
}

  .chat-header button {
    margin-left: 10px;
    background-color: white;
    color: #000;
    padding: 5px 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 12px;
  }

    .messages {
      flex: 1;
      padding: 10px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
    
      /* Marca de agua */
      position: relative;
      background: #fff url('icon-192.png') no-repeat center center;
      background-size: 120px;
      background-attachment: fixed;
      background-repeat: no-repeat;
      background-position: center;
      background-blend-mode: lighten;
    }


  .message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
  }

  .user {
    background-color: #DCF8C6;
    align-self: flex-end;
  }

  .assistant {
    background-color: #EAEAEA;
    align-self: flex-start;
  }

  .input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    gap: 10px;
  }

  textarea {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
    resize: none;
    outline: none;
    max-height: 150px;
    overflow-y: auto;
    font-family: inherit;
    font-size: 16px;
  }

  button.send-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    background-color: #000;
    color: white;
    cursor: pointer;
  }

.banner-bienvenida {
    z-index: 9999; /* Mayor que el formulario */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;

  background-color: #000;
  color: white;
  padding: 30px 20px 40px;
  font-size: 16px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  box-sizing: border-box;
}

.banner-logo {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
}

.banner-bienvenida p {
  margin: 0 0 20px;
  line-height: 1.5;
}

.cerrar-banner {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 22px;
  font-weight: bold;
  color: white;
  cursor: pointer;
}

.aceptar-banner {
  background-color: #ffffff;
  color: #000;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.aceptar-banner:hover {
  background-color: #ddd;
}

/* Fondo difuminado */
body.banner-activo::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 9990;
}

.banner-formulario {
  display: none; /* Asegura que esté oculto por defecto */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9998; /* Debe ser menor que el banner de bienvenida (9999) */
  background-color: #fff;
  color: #000;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 500px;
  text-align: left;
}


.banner-formulario h2 {
  margin-top: 0;
}

.banner-formulario label {
  display: block;
  margin: 10px 0 5px;
}

.banner-formulario input,
.banner-formulario select {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.banner-formulario button {
  width: 100%;
  padding: 10px;
  background: #000;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}




  /* 📱 Media Query para móviles */
@media (max-width: 600px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .chat-container {
    width: 100%;
    height: 100dvh;
    box-shadow: none;
    border-radius: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .chat-header {
    font-size: 18px;
    padding: 12px;
  }

  .chat-header button {
    padding: 5px 8px;
    font-size: 14px;
  }

  .banner-bienvenida {
    font-size: 14px;
    padding: 12px;
  }

  textarea {
    font-size: 14px;
    padding: 8px;
    max-width: 100%;
    box-sizing: border-box;
  }

  button.send-btn {
    padding: 8px 12px;
    font-size: 14px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .message {
    font-size: 14px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }

  .messages {
    background-size: 80px;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 10px;
  }


  }