/** Shopify CDN: Minification failed

Line 1195:17 Unexpected "@keyframes"
Line 1196:2 Unexpected "0%"

**/
/* ==========================================================================
   BB-MULTIPLAYER.CSS - Liveblocks Cursors, Avatars, and Social Features
   ========================================================================== */

/* ==========================================================================
   MULTIPLAYER CURSORS (Liveblocks)
   ========================================================================== */

.bb-cursor-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999999;
  display: none; /* Hidden by default (mobile) */
}

/* Show cursor layer for OTHER users' cursors on devices with hover capability */
@media (hover: hover) and (pointer: fine) {
  .bb-cursor-layer {
    display: block;
  }
}

/* Note: User's own cursor uses native CSS cursor property (set via JS) for zero lag */

/* My Avatar Preview Badge - interactive customization */
.bb-my-avatar-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  z-index: 100000;
  animation: none;
  pointer-events: auto;
  font-family: 'Circular', 'CircularStd', -apple-system, BlinkMacSystemFont, sans-serif;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

/* Top row with sprite and info */
.bb-my-avatar-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

/* Container for queue avatars inside the preview */
.bb-my-avatar-others {
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 2px;
}

.bb-my-avatar-others .bb-queue-avatars {
  margin-bottom: 0;
}

/* User counts display */
.bb-my-avatar-counts {
  width: 100%;
  text-align: center;
  font-family: "m6x11plus", monospace;
  font-size: 0.8rem;
  color: #8ba4b8;
  padding-top: 4px;
  letter-spacing: 0.5px;
}

.bb-my-avatar-counts span {
  color: #4ecdc4;
  font-weight: 400;
}

/* Status text container */
.bb-my-avatar-status {
  width: 100%;
  text-align: center;
}

.bb-my-avatar-status .bb-queue-count-text {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
}

/* Name in avatar preview - no padding */
.bb-my-avatar-preview .bb-my-avatar-name {
  padding: 0;
}

@keyframes bb-avatar-preview-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bb-my-avatar-sprite {
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bb-my-avatar-sprite:hover {
  transform: scale(1.2);
}

.bb-my-avatar-sprite:active {
  transform: scale(0.9);
}

/* Locked team state */
.bb-my-avatar-sprite.bb-team-locked {
  cursor: not-allowed !important;
  opacity: 0.9;
}

.bb-my-avatar-sprite.bb-team-locked:hover {
  transform: none;
}

/* Shake animation for locked team */
@keyframes bb-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.bb-my-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bb-my-avatar-name {
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.bb-my-avatar-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bb-my-avatar-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   REMOTE CURSORS & AVATARS
   ========================================================================== */

.bb-mp-cursor {
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.1s linear; /* Smooth interpolation handled by JS */
  pointer-events: none;
  z-index: 100000;
}

.bb-mp-cursor-svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.bb-mp-cursor-sprite {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 20px;
  animation: cursor-bounce 2s infinite ease-in-out;
}

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

.bb-mp-cursor-label {
  position: absolute;
  top: 36px;
  left: 0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Circular', 'CircularStd', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  opacity: 1;
}

.bb-mp-cursor-me {
  position: fixed;
  pointer-events: none;
  z-index: 100000;
  display: none; /* Only for debugging */
}

/* ==========================================================================
   PROGRESS BAR AVATARS
   ========================================================================== */

.bb-avatar-layer {
  position: absolute;
  top: 0; /* Position at top of bar container for consistent alignment */
  left: 0;
  right: 0;
  height: 50px;
  pointer-events: none;
  overflow: visible;
}

/* Hide name labels and team icons on progress bar avatars */
.bb-avatar-layer .bb-mp-avatar-name,
.bb-avatar-layer .bb-mp-avatar-team {
  display: none;
}

.bb-mp-avatar {
  position: absolute;
  top: -50px;
  width: 50px;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s linear;
  will-change: transform;
}

.bb-mp-avatar-sprite {
  font-size: 24px;
  line-height: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center bottom; /* Scale from bottom edge for consistent baseline */
}

/* Twemoji - consistent emoji rendering across all platforms */
/* When Twemoji is loaded, hide native emoji text and show only the image */
.bb-mp-avatar-sprite img.twemoji {
  height: 24px;
  width: 24px;
  vertical-align: middle;
  display: inline-block !important;
}

/* Hide native emoji when Twemoji image is present (uses :has selector) */
.bb-mp-avatar-sprite:has(img.twemoji) {
  font-size: 0;
  line-height: 0;
}

.bb-mp-avatar-team img.twemoji {
  height: 12px;
  width: 12px;
  vertical-align: middle;
  display: inline-block !important;
}

.bb-mp-avatar-team:has(img.twemoji) {
  font-size: 0;
}

.bb-mp-avatar-name {
  font-family: 'Circular', 'CircularStd', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
  position: absolute;
  bottom: -95px !important;
  left: 50%;
  transform: translateX(-50%) scale(1.3);
  background: #080e1759;
  color: #eae6e6;
  backdrop-filter: blur(5px);
}

.bb-mp-avatar-name::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: inherit;
  z-index: -1;
}

/* Team emoji badge - protruding circle above name label */
.bb-mp-avatar-team {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translate(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: none;
  display: flex;
  align-items: center;
  text-shadow: 0px 3px 5px #00000087;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  box-shadow: 0 1px 3px #0003;
  z-index: 1;
}

.bb-mp-avatar-me .bb-mp-avatar-name {
  font-weight: 700;
  z-index: 100; /* Always on top of other players' labels */
  /* Removed box-shadow */
}

/* Evolution Animations */

/* White flash overlay for evolution only (not devolve) */
@keyframes evolve-flash {
  0% { 
    opacity: 0;
    transform: translateX(-50%) translateY(-50%) scale(0.3);
  }
  20% { 
    opacity: 0.5;
    transform: translateX(-50%) translateY(-50%) scale(1);
  }
  100% { 
    opacity: 0;
    transform: translateX(-50%) translateY(-50%) scale(1.2);
  }
}

.bb-avatar-evolve::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.3) 40%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  animation: evolve-flash 0.3s ease-out forwards;
}

@keyframes devolve-shrink {
  0% { transform: scale(var(--avatar-scale, 1)); filter: grayscale(0) brightness(1); }
  30% { transform: scale(calc(var(--avatar-scale, 1) * 0.7)); filter: grayscale(1) brightness(0.8); }
  60% { transform: scale(calc(var(--avatar-scale, 1) * 0.8)); filter: grayscale(1); }
  100% { transform: scale(var(--avatar-scale, 1)); filter: grayscale(0); }
}

.bb-avatar-devolve .bb-mp-avatar-sprite {
  animation: devolve-shrink 0.8s ease-in-out;
}

@keyframes legendary-flash {
  0% { 
    opacity: 0;
    transform: translateX(-50%) scale(1);
  }
  20% { 
    opacity: 1;
    transform: translateX(-50%) scale(1.5);
  }
  40% {
    opacity: 1;
    transform: translateX(-50%) scale(2);
  }
  100% { 
    opacity: 0;
    transform: translateX(-50%) scale(2.5);
  }
}

.bb-avatar-legendary::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255,215,0,1) 0%, rgba(255,255,255,0.9) 30%, rgba(255,215,0,0.5) 60%, rgba(255,215,0,0) 80%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  animation: legendary-flash 0.8s ease-out forwards;
}

@keyframes legendary-pulse {
  0% { 
    transform: scale(var(--avatar-scale, 1)); 
    filter: drop-shadow(0 0 0px gold) brightness(1);
  }
  10% {
    filter: drop-shadow(0 0 15px white) brightness(2);
  }
  30% { 
    transform: scale(calc(var(--avatar-scale, 1) * 1.3)); 
    filter: drop-shadow(0 0 20px gold) brightness(1.2);
  }
  50% {
    filter: drop-shadow(0 0 25px gold) brightness(1);
  }
  100% { 
    transform: scale(var(--avatar-scale, 1)); 
    filter: drop-shadow(0 0 0px gold) brightness(1);
  }
}

.bb-avatar-legendary .bb-mp-avatar-sprite {
  animation: legendary-pulse 1.5s ease-out;
}

.bb-avatar-jump .bb-mp-avatar-sprite {
  animation: avatar-hop-physics 0.6s linear;
}

/* Flash animation for evolution - MUST be after bb-avatar-jump to take precedence */
@keyframes flash-white {
  0% { filter: brightness(50); }
  8% { filter: brightness(1); }
  16% { filter: brightness(50); }
  24% { filter: brightness(1); }
  32% { filter: brightness(50); }
  40%, 100% { filter: brightness(1); }
}

.bb-avatar-evolve .bb-mp-avatar-sprite {
  animation: avatar-hop-physics 0.6s linear, flash-white 0.6s linear;
}

@keyframes avatar-hop-physics {
  0% { 
    transform: translateY(0) scale(var(--avatar-scale, 1)); 
    animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); 
  }
  15% { 
    transform: translateY(0) scale(calc(var(--avatar-scale, 1) * 1.3), calc(var(--avatar-scale, 1) * 0.7)); 
    animation-timing-function: cubic-bezier(0.1, 1, 0.1, 1);
  }
  40% { 
    transform: translateY(-50px) scale(calc(var(--avatar-scale, 1) * 0.9), calc(var(--avatar-scale, 1) * 1.1)); 
  }
  55% { 
    transform: translateY(-50px) scale(calc(var(--avatar-scale, 1) * 1.1), calc(var(--avatar-scale, 1) * 0.9)); 
    animation-timing-function: cubic-bezier(0.5, 0, 1, 1);
  }
  75% { 
    transform: translateY(0) scale(calc(var(--avatar-scale, 1) * 0.95), calc(var(--avatar-scale, 1) * 1.05)); 
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
  85% { 
    transform: translateY(-5px) scale(calc(var(--avatar-scale, 1) * 1.1), calc(var(--avatar-scale, 1) * 0.9)); 
  }
  100% { 
    transform: translateY(0) scale(var(--avatar-scale, 1)); 
  }
}

/* ==========================================================================
   QUEUE UI
   ========================================================================== */

.bb-queue-ui {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-family: monospace;
  font-size: 12px;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.bb-queue-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bb-queue-label {
  color: #666;
}

.bb-queue-val {
  font-weight: bold;
  color: #333;
}

.bb-queue-status {
  margin-top: 4px;
  padding-top: 4px;
  /* Removed border-top */
  text-align: center;
  color: #0066cc;
  font-weight: bold;
}

/* ==========================================================================
   SAVINGS NOTIFICATION (FLY OFF)
   ========================================================================== */

.bb-mp-flyoff {
  position: absolute;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 60;
}

.bb-mp-flyoff-sprite {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}

.bb-mp-flyoff-bubble {
  position: absolute;
  bottom: 280px; /* Position HIGH above the sprite (matches taller animation) */
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  font-family: 'Circular', 'CircularStd', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 14px;
  white-space: nowrap;
  min-width: 200px; /* Ensure readable minimum width */
  text-align: center;
  background: rgba(0, 0, 0, 0.92) !important;
  color: #ffd700 !important;
  border: 2px solid rgba(255, 215, 0, 0.5);
  opacity: 0;
  /* Gold glow effect */
  text-shadow: 
    0 0 4px rgba(255, 215, 0, 0.6),
    0 0 8px rgba(255, 215, 0, 0.3);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 215, 0, 0.2);
}

/* Hidden state before coins finish */
.bb-mp-flyoff-bubble.bb-flyoff-hidden {
  opacity: 0 !important;
  transform: scale(0.5) !important;
  pointer-events: none;
}

/* Reveal animation after coins draw attention */
.bb-mp-flyoff-bubble.bb-flyoff-reveal {
  animation: bb-flyoff-bubble-reveal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, bb-shake 0.1s infinite;
}

@keyframes bb-flyoff-bubble-reveal {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

/* Gold text layer on top for flyoff bubble (crisp, no glow) */
.bb-mp-flyoff-bubble::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: inherit;
  color: #ffd700;
  text-shadow: none;
  filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bb-mp-flyoff-amount {
  font-weight: 700;
  font-size: 14px;
}

/* Twemoji for fly-off sprite - consistent emoji rendering */
.bb-mp-flyoff-sprite img.twemoji {
  height: 48px;
  width: 48px;
  vertical-align: middle;
  display: inline-block !important;
}

.bb-mp-flyoff-sprite:has(img.twemoji) {
  font-size: 0;
  line-height: 0;
}

.bb-mp-flyoff-animate .bb-mp-flyoff-sprite {
  animation: bb-flyoff-sprite 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

/* Only animate bubble after it's revealed */
.bb-mp-flyoff-animate .bb-mp-flyoff-bubble.bb-flyoff-reveal {
  animation: bb-flyoff-bubble-reveal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, 
             bb-flyoff-bubble-float 4s ease-out 0.4s forwards,
             bb-shake 0.12s infinite;
}

/* Shake animation for rumble effect */
@keyframes bb-shake {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-1px, 1px) rotate(-0.5deg); }
  50% { transform: translate(0, -1px) rotate(0deg); }
  75% { transform: translate(1px, 1px) rotate(0.5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes bb-flyoff-sprite {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  8% {
    transform: translateY(-30px) scale(1.5);
    opacity: 1;
  }
  20% {
    transform: translateY(-120px) scale(1.7);
    opacity: 1;
  }
  40% {
    transform: translateY(-200px) scale(1.6);
    opacity: 1;
  }
  60% {
    transform: translateY(-280px) scale(1.5);
    opacity: 1;
  }
  80% {
    transform: translateY(-350px) scale(1.3);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-450px) scale(1);
    opacity: 0;
  }
}

/* Float animation after reveal (floats up higher, fades) */
@keyframes bb-flyoff-bubble-float {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }
  60% {
    transform: translateX(-50%) translateY(-30px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-80px) scale(1);
    opacity: 0;
  }
}

/* ==========================================================================
   FLY MODE (EASTER EGG)
   ========================================================================== */

.bb-mp-avatar.bb-fly-mode {
  position: absolute !important;
  top: -11px !important;
  left: 0 !important;
  margin: 0 !important;
  z-index: 5 !important;
  pointer-events: none;
  transition: none !important;
  bottom: auto !important;
  right: auto !important;
}

.bb-mp-avatar.bb-fly-mode .bb-mp-avatar-sprite {
  /* Keep tier-based scale via --avatar-scale variable, just add drop shadow */
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  transition: transform 0.1s ease-out;
}

.bb-mp-avatar.bb-fly-mode .bb-mp-avatar-name {
  bottom: 0 !important;
  position: relative !important;
  max-width: 100px;
}

/* Hide team badge when flying */
.bb-mp-avatar.bb-fly-mode .bb-mp-avatar-team {
  display: none !important;
}

.bb-fly-particle {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 4;
}

/* Tilting must preserve the tier scale */
.bb-mp-avatar.bb-fly-mode.tilting-left .bb-mp-avatar-sprite {
  transform: rotate(-20deg) scale(var(--avatar-scale, 1)) !important;
}

.bb-mp-avatar.bb-fly-mode.tilting-right .bb-mp-avatar-sprite {
  transform: rotate(20deg) scale(var(--avatar-scale, 1)) !important;
}

/* Shunt flash on collision */
.bb-mp-avatar.bb-fly-shunt .bb-mp-avatar-sprite {
  animation: fly-shunt-flash 0.2s ease-out !important;
}

@keyframes fly-shunt-flash {
  0% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  50% { filter: brightness(2) drop-shadow(0 0 20px #ff4444); }
  100% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
}

/* ==========================================================================
   FLY GAME - LEADERBOARD
   ========================================================================== */

.bb-fly-leaderboard {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 240px;
  background: linear-gradient(135deg, rgba(15, 10, 30, 0.95) 0%, rgba(30, 20, 50, 0.95) 100%);
  border: 2px solid rgba(255, 200, 0, 0.5);
  border-radius: 16px;
  padding: 16px;
  z-index: 10001;
  font-family: 'Circular', 'CircularStd', -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 
    0 0 30px rgba(255, 200, 0, 0.3),
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: fly-leaderboard-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}

.bb-fly-leaderboard-exit {
  animation: fly-leaderboard-out 0.3s ease-in forwards;
}

@keyframes fly-leaderboard-in {
  from {
    opacity: 0;
    transform: translateX(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes fly-leaderboard-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(50px) scale(0.9);
  }
}

.bb-fly-leaderboard-header {
  text-align: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 200, 0, 0.3);
}

.bb-fly-leaderboard-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 200, 0, 0.5);
  letter-spacing: 1px;
}

.bb-fly-leaderboard-subtitle {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.bb-fly-leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.bb-fly-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.bb-fly-player-me {
  background: rgba(255, 200, 0, 0.15);
  border: 1px solid rgba(255, 200, 0, 0.3);
}

.bb-fly-player-flying {
  animation: fly-player-pulse 2s infinite ease-in-out;
}

@keyframes fly-player-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 0, 0); }
  50% { box-shadow: 0 0 10px 2px rgba(255, 200, 0, 0.3); }
}

.bb-fly-rank {
  font-size: 16px;
  min-width: 24px;
  text-align: center;
}

.bb-fly-player-sprite {
  font-size: 20px;
  line-height: 1;
}

.bb-fly-player-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bb-fly-player-score {
  font-size: 16px;
  font-weight: 700;
  color: #ffd700;
  min-width: 24px;
  text-align: right;
}

.bb-fly-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  padding: 20px 0;
}

.bb-fly-leaderboard-controls {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 200, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bb-fly-control {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* ==========================================================================
   FLY GAME - HOOPS
   ========================================================================== */

.bb-fly-hoop {
  position: absolute;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
}

.bb-fly-hoop-ring {
  font-size: 64px;
  line-height: 1;
  filter: 
    drop-shadow(0 0 10px rgba(255, 200, 0, 0.8))
    drop-shadow(0 0 20px rgba(255, 150, 0, 0.5));
  animation: hoop-float 2s infinite ease-in-out, hoop-glow 1.5s infinite ease-in-out;
}

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

@keyframes hoop-glow {
  0%, 100% { 
    filter: 
      drop-shadow(0 0 10px rgba(255, 200, 0, 0.8))
      drop-shadow(0 0 20px rgba(255, 150, 0, 0.5));
  }
  50% { 
    filter: 
      drop-shadow(0 0 15px rgba(255, 220, 0, 1))
      drop-shadow(0 0 30px rgba(255, 150, 0, 0.8));
  }
}

.bb-fly-hoop-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 0, 0.2) 0%, transparent 70%);
  animation: hoop-pulse 1.5s infinite ease-in-out;
}

@keyframes hoop-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

/* Spawn animation */
.bb-fly-hoop-spawn {
  animation: hoop-spawn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes hoop-spawn {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Collected animation */
.bb-fly-hoop-collected .bb-fly-hoop-ring {
  animation: hoop-collected 0.5s ease-out forwards;
}

.bb-fly-hoop-collected .bb-fly-hoop-glow {
  animation: hoop-explode 0.5s ease-out forwards;
}

@keyframes hoop-collected {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 1;
    filter: brightness(2) drop-shadow(0 0 30px gold);
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

@keyframes hoop-explode {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(3);
    opacity: 0.8;
    background: radial-gradient(circle, rgba(255, 200, 0, 0.5) 0%, transparent 70%);
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.bb-fly-hoop-scorer {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  animation: scorer-float 1s ease-out forwards;
}

@keyframes scorer-float {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px);
  }
}

/* ==========================================================================
   PRODUCT ADDED MESSAGE - Floating text above avatar
   ========================================================================== */

.bb-mp-avatar-message {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  font-family: 'Circular', 'CircularStd', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.6em;
  font-weight: normal;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  /* Subtle glow effect - dialed back */
  filter: brightness(1.1);
  text-shadow: 
    0 0 3px currentColor,
    0 0 6px currentColor;
}

/* White text layer on top (no glow) for readability */
.bb-mp-avatar-message::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: inherit;
  color: white;
  text-shadow: none;
  filter: none;
}

.bb-mp-avatar-message-product {
  font-weight: 600;
}

/* Animation: fast in, longer hold, very slow ease out = 2.5s total */
.bb-mp-avatar-message.bb-message-animate {
  animation: avatar-message-float 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes avatar-message-float {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  8% {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(-15px);
  }
  75% {
    opacity: 0.8;
    transform: translateX(-50%) translateY(-25px);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-40px);
  }
}

/* Gold pixel spark for flyoff message */
.bb-gold-spark {
  position: absolute;
  background: #ffcc00;
  pointer-events: none;
  z-index: 11;
}

/* Blue pixel spark for "Added" message */
.bb-blue-spark {
  position: absolute;
  background: #60a5fa;
  pointer-events: none;
  z-index: 11;
  opacity: 0.8;
}

/* ==========================================================================
   LOW PERFORMANCE MODE - Disable expensive effects
   ========================================================================== */

body.bb-perf-low .bb-fly-hoop-glow,
body.bb-perf-low .bb-fly-particle {
  display: none !important;
}

body.bb-perf-low .bb-fly-hoop-ring {
  filter: none !important;
}

body.bb-perf-low .bb-mp-avatar-message {
  text-shadow: none !important;
  filter: none !important;
}

body.bb-perf-low .bb-fly-leaderboard-title {
  text-shadow: none !important;
}

body.bb-perf-low .bb-mp-avatar.bb-fly-mode .bb-mp-avatar-sprite {
  filter: none !important;
}

/* Disable animations that cause GPU load */
body.bb-perf-low .bb-fly-player-flying {
  animation: none !important;
}

body.bb-perf-low @keyframes fly-shunt-flash {
  0%, 100% { filter: none; }
}

/* ==========================================================================
   MOBILE RESPONSIVE - Center flyoff message
   ========================================================================== */

@media (max-width: 768px) {
  .bb-mp-flyoff {
    left: 50% !important;
    transform: translateX(-50%);
  }
  
  .bb-mp-flyoff-bubble {
    font-size: 14px;
    padding: 10px 16px;
    white-space: normal;
    max-width: 280px;
    text-align: center;
  }
  
  .bb-mp-flyoff-sprite {
    font-size: 40px;
  }
}
