* {
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.chat-container {
  width: 380px;
  height: 600px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.chat-header {
  background: linear-gradient(135deg, #ff9800, #ff6f00);
  color: white;
  padding: 16px;
  font-weight: bold;
  text-align: center;
}

/* Body */
.chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #fafafa;
}

/* Message wrapper */
.chat-message {
  display: flex;
  margin-bottom: 12px;
}

/* Bot (kiri) */
.chat-message.bot {
  justify-content: flex-start;
}

.chat-message.bot .bubble {
  background: #eeeeee;
  color: #333;
  border-radius: 12px 12px 12px 4px;
}

/* User (kanan) */
.chat-message.user {
  justify-content: flex-end;
}

.chat-message.user .bubble {
  background: #ff9800;
  color: white;
  border-radius: 12px 12px 4px 12px;
}

/* Bubble umum */
.bubble {
  max-width: 70%;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.4;
}

/* Input area */
.chat-input {
  display: flex;
  padding: 12px;
  border-top: 1px solid #ddd;
}

.chat-input input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 20px;
  border: 1px solid #ccc;
  outline: none;
}

.chat-input button {
  margin-left: 8px;
  padding: 10px 16px;
  background: #ff9800;
  border: none;
  border-radius: 20px;
  color: white;
  cursor: pointer;
  font-weight: 600;
}

.chat-input button:hover {
  background: #fb8c00;
}
/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #ddd;
  border-top: 3px solid #ff9800;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Loader bubble lebih kecil */
.loader .bubble {
  padding: 10px 14px;
}

