.floating-mode-selector {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 9999;
  display: none;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  will-change: transform;
}

.floating-toggle {
  width: 35px;
  height: 35px;
  background: #0ea5e9;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  touch-action: none;
  z-index: 2;
  transition: transform 0.2s ease;
}

.floating-toggle:active {
  transform: scale(0.85);
}

.floating-menu {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 140px;
  pointer-events: none;
}

@keyframes bubblePop {
  0% {
    transform: scale(0) translateY(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.2) translateY(var(--target-y));
  }
  80% {
    transform: scale(0.95) translateY(var(--target-y));
  }
  100% {
    transform: scale(1) translateY(var(--target-y));
    opacity: 1;
  }
}

.floating-mode-btn {
  width: 35px;
  height: 35px;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 0;
  position: absolute;
  bottom: 0;
  left: 0;
  transform: scale(0) translateY(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease;
  will-change: transform;
}

.floating-mode-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: scale(1.05) translateY(var(--target-y)) !important;
}

.floating-mode-btn:active {
  transform: scale(0.8) translateY(var(--target-y)) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.floating-mode-selector.expanded .floating-mode-btn:nth-child(1) {
  --target-y: -45px;
  animation: bubblePop 0.54s cubic-bezier(0.34, 1.56, 0.64, 1) 0.045s forwards;
  pointer-events: auto;
}

.floating-mode-selector.expanded .floating-mode-btn:nth-child(2) {
  --target-y: -90px;
  animation: bubblePop 0.54s cubic-bezier(0.34, 1.56, 0.64, 1) 0.09s forwards;
  pointer-events: auto;
}

.floating-mode-selector.expanded .floating-mode-btn:nth-child(3) {
  --target-y: -135px;
  animation: bubblePop 0.54s cubic-bezier(0.34, 1.56, 0.64, 1) 0.135s forwards;
  pointer-events: auto;
}

@media (min-width: 769px) {
  .floating-mode-selector {
    display: none;
  }
}
