/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body background */
body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #4e54c8, #8f94fb);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Container */
.chat-container {
  background: #fff;
  width: 420px;
  max-width: 95%;
  height: 640px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
  animation: fadeIn 0.6s ease-in-out;
}

/* Header */
.chat-header {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
  padding: 16px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

/* Chat box */
.chat-box {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f3f3f7;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Scrollbar cantik */
.chat-box::-webkit-scrollbar {
  width: 6px;
}
.chat-box::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

/* Message wrapper */
.message {
  display: flex;
  max-width: 85%;
  animation: slideUp 0.3s ease;
}

.message.user {
  justify-content: flex-end;
}

.message.bot {
  justify-content: flex-start;
}

/* Bubble style */
.bubble {
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  word-wrap: break-word;
}

.user .bubble {
  background: linear-gradient(135deg, #2575fc, #6a11cb);
  color: white;
  border-bottom-right-radius: 6px;
}

.bot .bubble {
  background: #e8e8ee;
  color: #333;
  border-bottom-left-radius: 6px;
}

/* Input form */
.chat-form {
  display: flex;
  padding: 12px;
  background: #fff;
  border-top: 1px solid #ddd;
}

.chat-form input {
  flex: 1;
  padding: 12px 15px;
  border-radius: 24px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 14px;
  transition: 0.3s;
}

.chat-form input:focus {
  border-color: #2575fc;
  box-shadow: 0 0 6px rgba(37,117,252,0.5);
}

.chat-form button {
  margin-left: 10px;
  padding: 0 20px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

.chat-form button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(37,117,252,0.6);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px);}
  to { opacity: 1; transform: translateY(0);}
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px);}
  to { opacity: 1; transform: translateY(0);}
}
