/* Kustomisasi Scrollbar agar terlihat elegan */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155; /* slate-700 */
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #475569; /* slate-600 */
}

/* Utilitas Glassmorphism */
.glass-sidebar {
  background: rgba(15, 23, 42, 0.7); /* slate-900 dengan transparansi */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass-input {
  background: rgba(30, 41, 59, 0.6); /* slate-800 dengan transparansi */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Animasi Pesan Masuk (Fade-in & Slide-up) */
@keyframes message-slide-up {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-message {
  animation: message-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Indikator Typing (Titik Berkedip) */
.typing-dot {
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.3;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Styling Dasar untuk Konten Teks AI (Markdown simulation) */
.ai-content p {
  margin-bottom: 0.8em;
  line-height: 1.6;
}
.ai-content p:last-child {
  margin-bottom: 0;
}
.ai-content pre {
  background-color: #09090b; /* Latar belakang super gelap untuk code block */
  padding: 1rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid #27272a;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}
.ai-content pre code {
  background-color: transparent;
  padding: 0;
  border: none;
  color: #e4e4e7;
  font-size: 0.875em;
  font-family: "Courier New", Courier, monospace;
}
.ai-content code {
  background-color: #1e293b; /* slate-800 */
  padding: 0.2em 0.4em;
  border-radius: 0.375rem;
  font-family: monospace;
  font-size: 0.875em;
  color: #38bdf8; /* light blue */
}
.ai-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 0.8em;
}
.ai-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 0.8em;
}
.ai-content li {
  margin-bottom: 0.4em;
}
