body {
  height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #333;
}

.chat-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  margin: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;  
  flex-direction: column;  
}

.message {
  margin-bottom: 15px;
  padding: 12px 18px;
  border-radius: 20px;
  max-width: 80%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message.sent {
  background-color: #dcf8c6;
  align-self: flex-end;  
  color: #2e652c;
}

.message.received {
  background-color: #e6f7ff;
  align-self: flex-start; 
  color: #1a535c;
}
.message.error {
  background-color: #e6f7ff;
  align-self: flex-start;  
  color: #ff0000;
}
.input-container {
  padding: 15px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
}

.input-container input {
  flex-grow: 1;
  margin-right: 15px;
  border-radius: 25px;
  padding: 10px 15px;
  border: 1px solid #ddd;
}

.input-container button {
  border-radius: 25px;
  padding: 10px 20px;
  background-color: #667eea;
  color: white;
  border: none;
}

.input-container button:hover {
  background-color: #5a6ece;
}

.chat-header {
  padding: 15px;
  border-bottom: 1px solid #eee;
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
  color: #555;
}



.loader {
  width: 30px;
  opacity: 0.5;
  aspect-ratio: 4;
  background: radial-gradient(circle closest-side,#000 90%,#0000) 0/calc(100%/3) 100% space;
  clip-path: inset(0 100% 0 0);
  animation: l1 1s steps(4) infinite;
}
@keyframes l1 {to{clip-path: inset(0 -34% 0 0)}}