body {
  font-family: "Segoe UI", sans-serif;
  background: #f7f9fb;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.wrap {
  width: 90%;
  max-width: 800px;
  margin-top: 15px;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 12px 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-radius: 10px;
  flex-direction: column;
}

header img {
  height: 30px;
  transition: transform 0.3s;
  cursor: pointer;
  vertical-align: bottom;
}

header img:hover {
  transform: scale(1.1);
}

header h1 {
  font-size: 1.6em;
  margin: 0;
  color: #222;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

header h1 span {
  margin-right: 10px;
}

header h1 small {
  font-size: 0.7em;
  color: darkgray;
}

#server {
  font-size: 0.9em;
  color: #666;
  margin-top: 4px;
}

#chat {
  margin-top: 15px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.msg {
  margin: 10px 0;
 
}

.user,
.ai {
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 70%;
  word-wrap: break-word;
}

.user {
  background: #dce8ff;
  align-self: flex-end;
  margin-left: auto;
}

.ai {
  background: #e8f5e9;
  align-self: flex-start;
  margin-right: auto;
}

#inputBox {
  display: flex;
  margin-top: 10px;
  gap: 10px;
}

#texto {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1em;
}

button {
  background: #0078d7;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  cursor: pointer;
}

button:hover {
  background: #005fa3;
}
