/* Pikachu Chatbot Styles */
.chatbot-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-family: 'Comfortaa', 'Roboto', sans-serif;
}

.chatbot-trigger {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border: 4px solid #f0a500;
  cursor: url("./icons/pointer-yellow.png"), pointer;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  animation: bounce 2s ease-in-out infinite;
}

.chatbot-trigger:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 30px rgba(255, 215, 0, 0.6);
  animation: wiggle 0.5s ease-in-out;
}

.chatbot-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Bounce animation for the trigger */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

/* Speech bubble that appears on hover */
.chatbot-hint {
  position: absolute;
  bottom: 90px;
  right: 0;
  background: #ffed4e;
  color: #333;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  border: 2px solid #f0a500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chatbot-hint::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #ffed4e;
}

.chatbot-trigger:hover + .chatbot-hint,
.chatbot-container:hover .chatbot-hint {
  opacity: 1;
  transform: translateY(0);
}

/* Chat window */
.chatbot-window {
  position: absolute;
  bottom: 100px;
  right: 0;
  width: 350px;
  max-height: 500px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 3px solid #ffd700;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

.chatbot-window.active {
  display: flex;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Chat header */
.chatbot-header {
  background: linear-gradient(135deg, #ffd700 0%, #f0a500 100%);
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #d4af37;
}

.chatbot-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  padding: 3px;
}

.chatbot-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.chatbot-title {
  color: #1a1a1a;
  font-weight: 700;
  font-size: 16px;
}

.chatbot-status {
  color: #333;
  font-size: 12px;
}

.chatbot-close {
  background: none;
  border: none;
  color: #1a1a1a;
  font-size: 24px;
  cursor: url("./icons/pointer-yellow.png"), pointer;
  font-weight: bold;
  line-height: 1;
  transition: transform 0.2s;
}

.chatbot-close:hover {
  transform: rotate(90deg);
}

/* Messages area */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: #2d2d2d;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #ffd700;
  border-radius: 3px;
}

.message {
  display: flex;
  gap: 10px;
  animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  flex-shrink: 0;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
}

.message.bot .message-bubble {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #1a1a1a;
  border-bottom-left-radius: 4px;
  border: 2px solid #f0a500;
}

.message.user .message-bubble {
  background: linear-gradient(135deg, #4a4a4a 0%, #5a5a5a 100%);
  color: #f5f5dc;
  border-bottom-right-radius: 4px;
  border: 2px solid #6a6a6a;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  border: 2px solid #f0a500;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a1a1a;
  animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Input area */
.chatbot-input-area {
  padding: 15px;
  background: #2d2d2d;
  border-top: 2px solid #ffd700;
  display: flex;
  gap: 10px;
}

.chatbot-input {
  flex: 1;
  padding: 12px;
  border: 2px solid #ffd700;
  border-radius: 20px;
  background: #1a1a1a;
  color: #f5f5dc;
  font-size: 14px;
  outline: none;
  font-family: 'Comfortaa', sans-serif;
}

.chatbot-input::placeholder {
  color: #888;
}

.chatbot-send {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700 0%, #f0a500 100%);
  border: 2px solid #d4af37;
  color: #1a1a1a;
  font-size: 20px;
  cursor: url("./icons/pointer-yellow.png"), pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-send:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.chatbot-send:active {
  transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
  .chatbot-window {
    width: 300px;
    max-height: 400px;
  }
  
  .chatbot-container {
    bottom: 20px;
    right: 20px;
  }
  
  .chatbot-trigger {
    width: 60px;
    height: 60px;
  }
}
