@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px 0px var(--selected-glow); }
    50% { box-shadow: 0 0 15px 5px var(--selected-glow); }
    100% { box-shadow: 0 0 5px 0px var(--selected-glow); }
}

.player.selected .glow {
    animation: pulse-glow 1.5s infinite ease-in-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slide-up {
    from { transform: translateY(20px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-overlay {
    animation: fade-in 0.2s ease-out;
}
.modal-box {
    animation: slide-up 0.3s ease-out;
}

#toast {
    animation: fade-in 0.3s, fade-out 0.3s 2.7s;
}

#save-indicator.visible {
    animation: fade-in 0.3s forwards;
}
#save-indicator.hiding {
    animation: fade-out 1s 2s forwards;
}

.tool-btn {
    position: relative;
    overflow: hidden;
}
.tool-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}
@keyframes ripple {
  0% {
    transform: scale(0, 0) translate(-50%, -50%);
    opacity: 1;
  }
  100% {
    transform: scale(20, 20) translate(-50%, -50%);
    opacity: 0;
  }
}
.tool-btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}
