/* Tombol Chatbot dengan efek gradient dan animasi */
.chatbot-button {
  position: fixed;
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, #2431df, #380e53, #5e97e1);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 26px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.4s ease;
  bottom: 20px;
  right: 20px;
  animation: glowPulse 3s infinite alternate;
}

.chatbot-button:hover {
  transform: scale(1.15) rotate(10deg);
  background: linear-gradient(135deg, #fbc2eb, #a6c1ee, #84fab0);
  box-shadow: 0 8px 20px rgba(255, 182, 255, 0.7);
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 8px rgba(142, 197, 252, 0.6), 0 0 15px rgba(224, 195, 252, 0.4);
  }
  100% {
    box-shadow: 0 0 20px rgba(251, 194, 235, 0.9), 0 0 35px rgba(166, 193, 238, 0.8);
  }
}

/* Chatbox Container dengan animasi aktif */
.chatbot-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  height: 420px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  display: none;
  flex-direction: column;
  z-index: 1000;
  transition: all 0.4s ease-in-out;
  transform: translateY(100%); /* tetap untuk animasi awal */
}

/* Saat aktif → tampil normal */
.chatbot-container.active {
  display: flex;
  transform: translateY(0);
  animation: floatingGlow 4s ease-in-out infinite alternate;
}

/* Animasi hanya efek glow dan sedikit naik-turun */
@keyframes floatingGlow {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(255, 200, 255, 0.6);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  }
}

/* Header */
.chatbot-header {
  background: linear-gradient(135deg, #8ec5fc, #e0c3fc);
  color: #222;
  padding: 12px;
  font-weight: bold;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

#chatbot-close {
  background: none;
  border: none;
  color: #333;
  font-size: 16px;
  cursor: pointer;
}

/* Messages */
.chatbot-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  color: white;
  font-size: 14px;
}

.chatbot-messages .message {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.4;
}

.chatbot-messages .user {
  background: linear-gradient(135deg, #84fab0, #8fd3f4);
  color: #222;
  text-align: right;
  margin-left: auto;
}

.chatbot-messages .bot {
  background: linear-gradient(135deg, #fbc2eb, #a6c1ee);
  color: #222;
  margin-right: auto;
}
/* animasi chatbot */
.chatbot-box {
  transform: translateY(-100%);
  transition: transform 0.5s ease-in-out;
}
.chatbot-box.active {
  transform: translateY(0);
}

/* Input */
.chatbot-form {
  display: flex;
  padding: 10px;
  background: #0f0f1f;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

#chatbot-input {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px 0 0 8px;
  background-color: #222;
  color: white;
}

.chatbot-form button {
  padding: 8px 15px;
  background: linear-gradient(135deg, #8ec5fc, #e0c3fc);
  color: #222;
  font-weight: bold;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.chatbot-form button:hover {
  background: linear-gradient(135deg, #fbc2eb, #a6c1ee);
}
