/* Body styling */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f5f5f5;
  text-align: center;
}

/* Chat container */
#chat {
  margin-bottom: 20px;
  border: 1px solid #ccc;
  padding: 12px;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  background-color: #ffffff;
  text-align: left;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Input and button container */
.input-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* Input field styling */
input[type="text"] {
  flex: 1 1 70%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  min-width: 200px;
}

/* Send button styling */
button {
  padding: 10px 16px;
  font-size: 16px;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #2980b9;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Chat message bubbles */
.message {
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 75%;
  line-height: 1.5;
  word-wrap: break-word;
  font-size: 15px;
}

/* User message */
.message.user {
  background-color: #d1ecf1;
  align-self: flex-end;
  margin-left: auto;
  border: 1px solid #b8dfe6;
}

/* Bot message */
.message.bot {
  background-color: #e2e3e5;
  align-self: flex-start;
  margin-right: auto;
  border: 1px solid #d1d1d1;
}

/* Error message */
.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  align-self: center;
}

/* Responsive tweaks for smaller screens */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .input-wrapper {
    flex-direction: column;
    gap: 10px;
  }

  input[type="text"],
  button {
    width: 100%;
    font-size: 18px;
  }

  #chat {
    max-height: 300px;
  }
}
