#kawai-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: 'Arial', sans-serif;
}

/* ============ REPLACE THIS PART ============ */
/* All bubble-related animations and effects will go here */
/* ============ REPLACEMENT PART ============ */
/* Enhanced bubble with smooth animations */
#kawai-bubble {
  /* Base Style */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Gradient Animation */
  background: linear-gradient(45deg, #FF6B6B, #6B6BFF, #6BFF6B);
  background-size: 300% 300%;
  box-shadow: 0 4px 20px rgba(107, 107, 255, 0.4);
  
  /* Combined Animations */
  animation: 
    gradientPulse 8s ease infinite,
    gentleFloat 3s ease-in-out infinite;
}

/* Keyframes for animations */
@keyframes gradientPulse {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* Bubble Image */
#kawai-bubble img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

/* Hover Effects */
#kawai-bubble:hover {
  animation: 
    gradientPulse 4s ease infinite,
    gentleFloat 1.5s ease-in-out infinite;
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(107, 107, 255, 0.6);
}

#kawai-bubble:hover img {
  transform: rotate(15deg);
}
/* ============ END REPLACEMENT PART ============ */
#kawai-bubble {
  /* (Keep all your existing base styles) */
  
  /* Animations */
  animation: 
    gradientPulse 5s ease infinite,
    pulse 2s ease infinite,
    float 4s ease-in-out infinite;
  
  /* Add this new transition for smooth hover effects */
  transition: 
    transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.4s ease;
}

/* (Keep your existing keyframes) */

#kawai-bubble img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: drop-shadow(0 0 5px white);
}

#kawai-bubble:hover {
  /* Remove transform:scale from here - we'll handle it via animation */
  animation: 
    gradientPulse 3s ease infinite,
    gentlePulse 2s ease infinite,
    float 2s ease-in-out infinite;
  box-shadow: 0 0 35px rgba(119, 68, 255, 0.8);
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1) translateY(0); }
  25% { transform: scale(1.08) translateY(-2px); }
  50% { transform: scale(1.12) translateY(-4px); }
  75% { transform: scale(1.08) translateY(-2px); }
}

#kawai-bubble:hover img {
  transform: rotate(15deg) scale(1.05); /* More subtle scaling */
}
#kawai-bubble {
  will-change: transform, box-shadow; /* Optimizes animation performance */
  backface-visibility: hidden; /* Prevents flickering */
}
/* ============ END REPLACE PART ============ */

#kawai-chatbox {
  width: 300px;
  background: white;
  border: 2px solid #FF6B6B;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: absolute;
  bottom: 70px;
  right: 0;
  padding: 10px;
}

.hidden {
  display: none;
}

#kawai-header {
  font-weight: bold;
  color: #FF6B6B;
  margin-bottom: 8px;
}

#kawai-body {
  height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  padding: 5px;
  margin-bottom: 8px;
  font-size: 14px;
}

#kawai-input-area {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

#kawai-input {
  flex: 1;
  padding: 8px 10px;
  border: 2px solid #FF6B6B;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  transition: border 0.2s ease;
}

#kawai-input:focus {
  border-color: #ff4f4f;
}

#kawai-input-area button {
  background: #FF6B6B;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s ease;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

#kawai-input-area button:hover {
  background: #ff4f4f;
}

#kawai-quick-buttons button {
  background: #FF6B6B;
  color: white;
  border: none;
  padding: 5px 8px;
  border-radius: 6px;
  margin: 4px 2px;
  font-size: 12px;
  cursor: pointer;
}

#kawai-typing {
  color: #888;
  font-style: italic;
  margin: 4px 0;
  font-size: 13px;
}

.dot {
  animation: blink 1s infinite;
}

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

@keyframes blink {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

#kawai-typing {
  opacity: 0;
  transition: opacity 0.3s;
}

#kawai-typing.visible {
  opacity: 1;
}

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

.fade-in-effect {
  animation: fadeIn 0.5s ease-out forwards;
}
/* Add to your CSS */
#kawai-intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
}

#kawai-intro-text {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 2rem;
  opacity: 0;
  animation: textFadeIn 1s ease-out 0.5s forwards;
}

#kawai-intro-bubble {
  width: 120px;
  height: 120px;
  background: linear-gradient(45deg, #FF2288, #7744FF, #00CCFF);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.5);
  animation: 
    bubbleEntrance 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1s forwards,
    gradientPulse 5s ease infinite 2.5s;
}

#kawai-intro-bubble img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

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

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

@keyframes bubbleEntrance {
  0% { transform: scale(0.5) translateY(100px); }
  60% { transform: scale(1.2) translateY(-20px); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes exitToCorner {
  0% { 
    transform: scale(1) translate(0, 0);
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: -60px;
    margin-left: -60px;
  }
  100% { 
    transform: scale(0.8) translate(-50vw, 50vh);
    position: fixed;
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
    margin: 0;
  }
}