/* ===============================
   Floating Chat Button
================================ */
#chatbot-toggle {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ffbd39, #fce37e);
  box-shadow: 0 8px 25px rgba(255, 189, 57, 0.4);
  font-size: 28px;
  color: #111;
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#chatbot-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 30px rgba(255, 189, 57, 0.6);
}

/* ===============================
   Chat Window (Glassmorphism)
================================ */
#chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 35px;
  width: 380px;
  height: 520px;
  border-radius: 20px;
  backdrop-filter: blur(18px);
  background: rgba(25, 25, 25, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
}

#chatbot-container.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ===============================
   Header
================================ */
.chat-header {
  background: linear-gradient(135deg, #ffbd39, #ffd86b);
  color: #111;
  padding: 14px 16px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.3px;
}

.chat-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-header button {
  background: transparent;
  border: none;
  color: #111;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.chat-header button:hover {
  transform: rotate(90deg);
}

/* ===============================
   Messages Section
================================ */
#chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(18, 18, 18, 0.6);
  scrollbar-width: thin;
  scrollbar-color: #ffbd39 transparent;
}

#chat-messages::-webkit-scrollbar {
  width: 6px;
}
#chat-messages::-webkit-scrollbar-thumb {
  background: #ffbd39;
  border-radius: 10px;
}

.message {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 80%;
  word-wrap: break-word;
  animation: fadeIn 0.2s ease-in;
}

.user-message {
  background: linear-gradient(135deg, #ffbd39, #ffd86b);
  color: #111;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bot-message {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* ===============================
   Input Bar
================================ */
.chat-input {
  display: flex;
  padding: 10px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#user-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  outline: none;
  padding: 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
}

#send-btn {
  background: linear-gradient(135deg, #ffbd39, #ffd86b);
  border: none;
  border-radius: 10px;
  margin-left: 8px;
  padding: 0 16px;
  font-size: 18px;
  color: #111;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 189, 57, 0.5);
}

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