/* ============================================
   BUBBLE SYSTEM STYLES - v2.0 (Fixed)
   ============================================ */

/* ---------- 3D LIQUID BUBBLE ---------- */
.bubble-system-bubble {
  position: fixed;
  pointer-events: auto;
  cursor: pointer;
  z-index: 9998;
  will-change: left, top, transform;
  transition: none; /* JS handles smooth movement */
}

/* 3D Liquid Glass Bubble Container - MORE TRANSPARENT */
.bubble-container {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, 
    rgba(255, 255, 255, 0.5) 0%,
    rgba(200, 230, 255, 0.2) 40%,
    rgba(150, 200, 255, 0.1) 70%,
    rgba(255, 255, 255, 0.05) 100%);
  box-shadow: 
    0 15px 25px rgba(0, 0, 0, 0.15),
    inset -8px -8px 15px rgba(0, 0, 0, 0.08),
    inset 8px 8px 15px rgba(255, 255, 255, 0.4),
    inset 0 0 25px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: bubbleRotate 8s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

/* Shape inside bubble - WITH GLOW */
.bubble-container img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px currentColor) brightness(1.2);
  z-index: 2;
  animation: shapeFloat 3s ease-in-out infinite;
}

/* Highlight reflection */
.bubble-container::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 15%;
  width: 25%;
  height: 25%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 80%);
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
}

/* Shadow under bubble */
.bubble-container::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 10%;
  width: 80%;
  height: 10px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0) 80%);
  border-radius: 50%;
  z-index: 1;
  filter: blur(3px);
}

.bubble-system-bubble:hover .bubble-container {
  transform: scale(1.05);
  box-shadow: 
    0 20px 30px rgba(0, 0, 0, 0.3),
    inset -10px -10px 20px rgba(0, 0, 0, 0.15),
    inset 10px 10px 20px rgba(255, 255, 255, 0.9);
}

.bubble-system-bubble:active .bubble-container {
  transform: scale(0.95);
}

/* Rotation Animation */
@keyframes bubbleRotate {
  0% { transform: rotateY(0deg) rotateX(0deg); }
  25% { transform: rotateY(15deg) rotateX(5deg); }
  50% { transform: rotateY(0deg) rotateX(10deg); }
  75% { transform: rotateY(-15deg) rotateX(5deg); }
  100% { transform: rotateY(0deg) rotateX(0deg); }
}

@keyframes shapeFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-3px) scale(1.05); }
}

/* Entrance Animation - From heart */
.bubble-entrance {
  animation: bubbleEntrance 1s ease-out forwards !important;
}

@keyframes bubbleEntrance {
  0% {
    opacity: 0;
    transform: translate(calc(100vw - 80px), calc(100vh - 80px)) scale(0);
  }
  50% {
    opacity: 0.8;
    transform: translate(
      calc(100vw - 80px - 50px + random(100px)),
      calc(100vh - 80px - 100px)
    ) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(var(--target-x), var(--target-y)) scale(1);
  }
}

/* Pop Animation */
.bubble-system-pop {
  animation: bubblePop 0.4s ease-out forwards !important;
  pointer-events: none;
}

@keyframes bubblePop {
  0% { transform: scale(1); opacity: 1; }
  30% { 
    transform: scale(1.3); 
    opacity: 0.9;
    filter: brightness(1.5);
  }
  100% { transform: scale(0); opacity: 0; }
}

/* ---------- HEART PROGRESS (PROPER SHAPE) ---------- */
.bubble-heart-wrapper {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
}

.bubble-heart-container {
  position: relative;
  width: 70px;
  height: 65px;
  cursor: default;
}

.bubble-heart-outline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.3);
  font-size: 70px;
  line-height: 1;
  text-align: center;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  z-index: 2;
}

/* Heart Fill - Proper heart shape using SVG/clip-path */
.bubble-heart-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(135deg, #ff3366 0%, #ff6b9d 50%, #ff9a9e 100%);
  transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
  clip-path: path('M35,60 C15,45 0,30 0,18 C0,8 8,0 18,0 C25,0 30,5 35,12 C40,5 45,0 52,0 C62,0 70,8 70,18 C70,30 55,45 35,60 Z');
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Heart Text - Inside heart */
.bubble-heart-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  font-weight: bold;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  white-space: nowrap;
  z-index: 3;
  width: 100%;
  padding: 0 5px;
  box-sizing: border-box;
  pointer-events: none;
}

/* ---------- TOAST MESSAGES (BUBBLE KE PAAS) ---------- */
.bubble-toast {
  position: fixed;
  z-index: 10001;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  white-space: nowrap;
  animation: toastFloat 1.2s ease-out forwards;
  pointer-events: none;
}

.bubble-toast.lucky {
  background: linear-gradient(135deg, #00b09b, #96c93d);
}

.bubble-toast.horny {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.bubble-toast.naughty {
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
}

.bubble-toast.badluck {
  background: linear-gradient(135deg, #485563, #29323c);
}

@keyframes toastFloat {
  0% { opacity: 0; transform: translateY(0px) scale(0.5); }
  20% { opacity: 1; transform: translateY(-25px) scale(1); }
  80% { opacity: 1; transform: translateY(-35px) scale(1); }
  100% { opacity: 0; transform: translateY(-50px) scale(0.8); }
}

/* ---------- KISS OVERLAY ---------- */
.bubble-kiss-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 200px;
  z-index: 10000;
  pointer-events: none;
  text-shadow: 0 0 80px rgba(255, 105, 180, 0.9);
  animation: kissPop 2s ease-out forwards;
}

@keyframes kissPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.4); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

/* ---------- UI GLOW EFFECT ---------- */
body.bubble-ui-glow {
  transition: box-shadow 0.8s ease, filter 0.8s ease;
  box-shadow: inset 0 0 200px rgba(255, 105, 180, 0.2) !important;
  filter: brightness(1.05) saturate(1.1) !important;
}

/* ---------- MOBILE OPTIMIZATION ---------- */
@media (max-width: 768px) {
  .bubble-heart-wrapper {
    bottom: 15px;
    right: 15px;
  }
  
  .bubble-heart-container {
    width: 55px;
    height: 50px;
  }
  
  .bubble-heart-outline {
    font-size: 55px;
  }
  
  .bubble-heart-fill {
    clip-path: path('M27.5,50 C12,38 0,25 0,15 C0,7 6,0 14,0 C19,0 23,4 27.5,10 C32,4 36,0 41,0 C49,0 55,7 55,15 C55,25 43,38 27.5,50 Z');
  }
  
  .bubble-heart-text {
    font-size: 6px;
  }
  
  .bubble-toast {
    font-size: 12px;
    padding: 4px 10px;
  }
  
  .bubble-kiss-overlay {
    font-size: 140px;
  }
}

/* Print styles */
@media print {
  .bubble-system-bubble,
  .bubble-heart-wrapper,
  .bubble-toast,
  .bubble-kiss-overlay {
    display: none !important;
  }
       }
