*,
html,
body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: linear-gradient(135deg, #a8edea, #fed6e3);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 360px;
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
}

.bot {
  background: #f1f1f1;
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.user {
  background: lightseagreen;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.input-area {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

input {
  flex: 1;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
}

button {
  border: none;
  background-color: lightseagreen;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background-color: #333;
  transition: 0.3s ease-in-out;
}

.reset-btn {
  background-color: #ff6b6b;
  margin-top: 8px;
  align-self: flex-end;
  padding: 8px 14px;
  font-size: 13px;
}

.reset-btn:hover {
  background-color: #c0392b;
}

#loaders {
  display: none;
  width: 60px;
  height: 60px;
  position: absolute;
  border-top: 8px solid lightseagreen;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 1s linear infinite;
  z-index: 99;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: #f1f1f1;
  border-radius: 16px;
  width: fit-content;
}

.typing span {
  width: 6px;
  height: 6px;
  background-color: #999;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}

.typing span:nth-child(1) {
  animation-delay: 0s;
}
.typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% {
    opacity: 0.2;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}
