body {
  font-family: 'Inter', sans-serif;
  background-color: #f0f2f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 16px;
}

.main-wrapper {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Menggunakan kelas Bootstrap: card, shadow-lg, rounded-4 */

.chat-box {
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

/* Style untuk Header Kata Kunci (Horizontal Scroll) */

.keyword-header {
  background-color: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 0;
  margin-bottom: 12px;
  overflow: hidden;
}

#keywordList {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

#messages {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 8px;
}

/* Kontainer untuk Avatar + Bubble */

.message-row {
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
}

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

/* Styling Avatar */

.chat-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.message-row.bot .chat-avatar {
  margin-right: 8px;
}

.message-row.user .chat-avatar {
  margin-left: 8px;
}

.message-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 20px;
  line-height: 1.5;
  margin: 0 !important;
  align-self: flex-end;
}

/* User bubble: menggunakan bg-primary (Bootstrap Blue) */

.user .message-bubble {
  background-color: #0d6efd !important;
  color: white;
  border-bottom-right-radius: 8px;
}

/* Bot default style: menggunakan bg-light */

.bot .message-bubble {
  background-color: #f5f5f7 !important;
  color: #1f2937;
  border-bottom-left-radius: 8px;
}

/* Style khusus untuk balasan Link/Image */

.bot-link {
  background-color: #e6f3f8 !important;
  color: #1f2937;
}

/* Gaya Animasi Mengetik */

.typing-indicator {
  background-color: #f5f5f7;
  color: #1f2937;
  padding: 12px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  width: fit-content;
  margin: 0;
}

.typing-indicator span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #0d6efd;
  border-radius: 50%;
  margin: 0 3px;
  animation: bounce 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1.0);
  }
}

/* Margin untuk elemen di luar bubble (seperti gambar murni/video) agar sejajar dengan bubble */

.message-content-extra {
  margin-left: 48px;
  margin-top: -5px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 90%;
}

