* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background-color: #0D0D0D;
  color: white;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  max-width: 600px;
  background-color: #0D0D0D;
  border-left: 1px solid #222;
  border-right: 1px solid #222;
}

header {
  padding: 15px;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid #333;
}

.chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
}

.message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 10px;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease-in-out;
  white-space: pre-wrap;
}

.user {
  align-self: flex-end;
  background-color: #1A1A1A;
  color: #e1e1e1;
}

.bot {
  align-self: flex-start;
  background-color: #2A2A2A;
  color: #ffffff;
}

form {
  display: flex;
  padding: 10px 16px;
  background-color: #1A1A1A;
  border-top: 1px solid #333;
}

.message.preview {
  opacity: 0.7;
  color: #cccccc;
  font-style: italic;
  font-size: 0.95rem;
}

#user-input {
  flex: 1;
  background-color: #2A2A2A;
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 20px;
  font-size: 1rem;
  outline: none;
}

#chat-box {
  overflow-y: auto;
  max-height: 80vh;
  scroll-behavior: smooth;
}

#send-btn {
  background-color: #333;
  color: white;
  border: none;
  margin-left: 10px;
  padding: 10px 14px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

#send-btn:hover {
  background-color: #555;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  header {
    font-size: 1.3rem;
  }

  #user-input {
    font-size: 0.95rem;
  }

  #send-btn {
    font-size: 1rem;
  }
}
