
body {
  font-family: Arial, sans-serif;
  background: #98999b;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.chat-container {
  background: #fff;
  width: 90%;
  max-width: 400px;
  height: 500px; 
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  overflow: hidden;
}


.chat-box {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f2f2f2;
}


.message {
  padding: 10px 15px;
  border-radius: 20px;
  max-width: 70%;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease;
}

.message.sent {
  background: #4C8BF5;
  color: #fff;
  align-self: flex-end;
}

.message.received {
  background: #EDEDED;
  color: #000;
  align-self: flex-start;
}


.chat-input-container {
  display: flex;
  border-top: 1px solid #ccc;
  padding: 5px;
  background: #fff;
}

#chat-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #afabab;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
}

#send-btn {
  padding: 10px 15px;
  margin-left: 5px;
  border: none;
  background: #4C8BF5;
  color: #fff;
  cursor: pointer;
  border-radius: 20px;
  transition: background 0.3s;
}

#send-btn:hover {
  background: #3A78DD;
}

/* Scrollbar style */
.chat-box::-webkit-scrollbar {
  width: 6px;
}

.chat-box::-webkit-scrollbar-thumb {
  background: #0288d1;
  border-radius: 3px;
}


@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}


@media (max-width: 600px) {
  .chat-container {
    max-width: 95%;
    height: 450px;
  }

  #chat-input, #send-btn {
    font-size: 13px;
    padding: 8px 10px;
  }
}
