/* Floating Chatbot Button */
.floating-chatbot {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #8750f7 0%, #2ecc71 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(135, 80, 247, 0.6),
              0 0 0 0 rgba(135, 80, 247, 0.7);
  z-index: 9999;
  transition: all 0.3s ease;
  animation: pulseGlow 2s infinite, float 3s ease-in-out infinite;
  opacity: 1 !important;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.floating-chatbot::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8750f7, #2ecc71);
  z-index: -1;
  filter: blur(15px);
  opacity: 0.7;
  animation: rotate 3s linear infinite;
}

.floating-chatbot::after {
  content: '💬';
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4757;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid white;
  animation: bounce 1s ease-in-out infinite;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.5);
}

.floating-chatbot:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 15px 50px rgba(135, 80, 247, 0.8),
              0 0 30px rgba(46, 204, 113, 0.5);
  animation: pulseGlow 1s infinite, float 3s ease-in-out infinite;
}

.floating-chatbot img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  animation: wiggle 2.5s ease-in-out infinite;
  /* Keep the original icon colors */
}

/* Enhanced Pulse Glow Animation */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 10px 40px rgba(135, 80, 247, 0.6),
                0 0 0 0 rgba(135, 80, 247, 0.7);
  }
  50% {
    box-shadow: 0 10px 40px rgba(135, 80, 247, 0.8),
                0 0 0 15px rgba(135, 80, 247, 0),
                0 0 0 30px rgba(46, 204, 113, 0);
  }
  100% {
    box-shadow: 0 10px 40px rgba(135, 80, 247, 0.6),
                0 0 0 0 rgba(135, 80, 247, 0);
  }
}

/* Float Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Rotate Background Glow */
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Wiggle Icon Animation */
@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

/* Bounce Badge Animation */
@keyframes bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Chatbot Modal */
.chatbot-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.chatbot-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal Content */
.chatbot-modal-content {
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
  margin: auto;
  padding: 0;
  border: none;
  border-radius: 20px;
  max-width: 550px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.4s ease;
  overflow: hidden;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Close Button */
.chatbot-close {
  color: #aaa;
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1;
  transition: color 0.3s ease;
}

.chatbot-close:hover,
.chatbot-close:focus {
  color: #fff;
  text-decoration: none;
}

/* Modal Header */
.chatbot-header {
  background: linear-gradient(135deg, #8750f7 0%, #6b3cc9 100%);
  padding: 40px 30px 30px;
  text-align: center;
  color: white;
  position: relative;
}

.chatbot-header .chatbot-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  animation: bounce 1s ease infinite;
  /* Keep the original icon colors */
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.chatbot-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Modal Body */
.chatbot-body {
  padding: 30px;
  color: #e0e0e0;
}

.chatbot-body p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #c0c0c0;
}

.chatbot-body ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.chatbot-body ul li {
  padding: 12px 0;
  font-size: 15px;
  line-height: 1.6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: padding-left 0.3s ease;
}

.chatbot-body ul li:hover {
  padding-left: 10px;
}

.chatbot-body ul li:last-child {
  border-bottom: none;
}

.chatbot-note {
  background: rgba(135, 80, 247, 0.1);
  border-left: 4px solid #8750f7;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  font-size: 14px;
}

.chatbot-note strong {
  color: #8750f7;
}

/* Modal Footer */
.chatbot-footer {
  padding: 20px 30px 30px;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
}

.chatbot-launch-btn {
  display: inline-block;
  padding: 14px 35px;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border-radius: 50px;
  box-shadow: 0 5px 20px rgba(135, 80, 247, 0.3);
}

.chatbot-launch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(135, 80, 247, 0.5);
}

.chatbot-launch-btn i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.chatbot-launch-btn:hover i {
  transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .floating-chatbot {
    width: 70px;
    height: 70px;
    bottom: 20px;
    right: 20px;
  }

  .floating-chatbot img {
    width: 40px;
    height: 40px;
  }

  .floating-chatbot::after {
    width: 20px;
    height: 20px;
    font-size: 10px;
    top: -6px;
    right: -6px;
  }

  .chatbot-modal-content {
    max-width: 95%;
    margin: 20px;
  }

  .chatbot-header h2 {
    font-size: 24px;
  }

  .chatbot-header .chatbot-icon {
    width: 60px;
    height: 60px;
  }

  .chatbot-body {
    padding: 20px;
  }

  .chatbot-body p,
  .chatbot-body ul li {
    font-size: 14px;
  }

  .chatbot-launch-btn {
    padding: 12px 25px;
    font-size: 14px;
  }
}

/* Light Mode Support */
@media (prefers-color-scheme: light) {
  .chatbot-modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f5f5f5 100%);
  }

  .chatbot-body {
    color: #333;
  }

  .chatbot-body p {
    color: #555;
  }

  .chatbot-body ul li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
}
