/* Bubble Pop: a sunny meadow; bubbles rise from Alanna's wand in the corner. */
.game.bubbles { background: #bff0b0; }
.game.bubbles .bp-scene {
  flex: 1; position: relative; min-height: 0; overflow: hidden;
  background: linear-gradient(#7fd3ff, #d6f4ff 72%, #a8e68f 72%, #8fd46a);
}
.game.bubbles .bp-sun { position: absolute; top: 4%; right: 5%; font-size: 64px; animation: bp-spin 14s linear infinite; }
.game.bubbles .bp-cloud { position: absolute; font-size: 80px; opacity: .95; animation: bp-drift 50s linear infinite; }
.game.bubbles .bp-cloud.c1 { top: 6%; }
.game.bubbles .bp-cloud.c2 { top: 22%; font-size: 60px; animation-duration: 70s; animation-delay: -30s; }
.game.bubbles .bp-flowers { position: absolute; left: 0; right: 0; bottom: 3%; text-align: center; font-size: 34px; letter-spacing: 3vw; white-space: nowrap; overflow: hidden; }
.game.bubbles .bp-hero { position: absolute; left: 2%; bottom: 0; width: 150px; z-index: 2; transform-origin: bottom left; }
.game.bubbles .bp-hero .avatar-svg { width: 150px; height: 240px; display: block; }
.game.bubbles .bp-wand { position: absolute; left: 108px; bottom: 96px; width: 44px; transform: rotate(18deg); transform-origin: bottom center; }
.game.bubbles .bp-hero.blow .bp-wand { animation: bp-wave .45s ease-out; }
.game.bubbles .bp-mini { position: absolute; left: 132px; bottom: 200px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(58, 42, 74, .4); background: rgba(255, 255, 255, .5); opacity: 0; }
.game.bubbles .bp-hero.blow .bp-mini { animation: bp-mini 1s ease-out; }
.game.bubbles .bp-hero.blow .m2 { animation-delay: .12s; left: 150px; }
.game.bubbles .bp-hero.blow .m3 { animation-delay: .24s; left: 140px; width: 10px; height: 10px; }
.game.bubbles .bp-bubbles { position: absolute; inset: 0; z-index: 3; }

.game.bubbles .bubble {
  position: absolute; left: 0; top: 0; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, .95) 0 9%, rgba(255, 255, 255, .3) 20%, rgba(190, 235, 255, .28) 55%, rgba(255, 170, 240, .35) 82%, rgba(255, 255, 255, .7) 100%);
  border: 3px solid rgba(58, 42, 74, .4);
  box-shadow: inset -10px -12px 20px rgba(155, 107, 255, .25), inset 8px 10px 16px rgba(255, 255, 255, .55);
  will-change: transform; transform-origin: center;
}
.game.bubbles .bubble .bw { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: 2px; text-shadow: 0 2px 0 #fff, 0 -1px 0 #fff; white-space: nowrap; text-align: center; line-height: 1.3; }
.game.bubbles .bubble .bw span.done { color: var(--good); }
.game.bubbles .bubble .bw span.now { color: var(--coral-dark); text-decoration: underline 4px var(--coral); text-underline-offset: 6px; }
.game.bubbles .bubble .tag { position: absolute; top: -6px; right: 4px; font-size: 26px; }
.game.bubbles .bubble.gold {
  background: radial-gradient(circle at 30% 26%, #fff 0 9%, rgba(255, 240, 160, .7) 22%, rgba(255, 210, 63, .55) 65%, rgba(242, 170, 40, .75) 100%);
  border-color: #c98a1b;
}
.game.bubbles .bubble.rainbow {
  background: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, .95) 0 9%, transparent 22%),
    conic-gradient(from 0deg, rgba(255, 90, 95, .55), rgba(255, 159, 28, .55), rgba(255, 210, 63, .55), rgba(60, 207, 122, .55), rgba(63, 169, 245, .55), rgba(155, 107, 255, .55), rgba(255, 90, 95, .55));
  animation: bp-hue 3s linear infinite;
}
.game.bubbles .bubble.targeted { z-index: 1; border-color: var(--sun); box-shadow: 0 0 0 5px var(--sun), inset -10px -12px 20px rgba(155, 107, 255, .25); }
.game.bubbles .bubble.popped { animation: bp-pop .25s ease-out forwards; }
.game.bubbles .bubble.escape { animation: bp-escape .4s ease-in forwards; }
.game.bubbles .bp-drop { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: rgba(255, 255, 255, .95); border: 2px solid rgba(58, 42, 74, .3); animation: bp-drop .6s ease-out forwards; pointer-events: none; }
.game.bubbles .bp-drop.gold { background: #ffd23f; }
.game.bubbles .bp-drop.rainbow:nth-child(3n) { background: #ff7eb6; }
.game.bubbles .bp-drop.rainbow:nth-child(3n+1) { background: #3fa9f5; }

@keyframes bp-pop { to { scale: 1.5; opacity: 0; } }
@keyframes bp-escape { to { opacity: 0; scale: 1.2; } }
@keyframes bp-drop { to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }
@keyframes bp-hue { to { filter: hue-rotate(360deg); } }
@keyframes bp-drift { from { transform: translateX(-160px); } to { transform: translateX(110vw); } }
@keyframes bp-spin { to { transform: rotate(360deg); } }
@keyframes bp-wave { 0%, 100% { transform: rotate(18deg); } 40% { transform: rotate(-8deg); } }
@keyframes bp-mini { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(40px, -90px); } }

@media (max-width: 640px) {
  .game.bubbles .bp-hero { transform: scale(.7); transform-origin: bottom left; }
  .game.bubbles .bubble .bw { font-size: 24px; }
}
