#toolbar button {
    background: #f0f0f0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #333;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-width: 70px;
    user-select: none;
}

/* Removed glossy shine effects - no ::before pseudo-element */

/* Removed glossy shine effects - no ::after pseudo-element */

#toolbar button:hover {
    background: #e5e5e5;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

#toolbar button:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.1s ease-out;
}

#toolbar button.active {
    background: #d5d5d5;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    font-weight: 800;
}

/* Modern toolbar animations and micro-interactions */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.12),
            0 2px 8px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }
    50% {
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.2),
            0 4px 16px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
}

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

/* Focus states for accessibility */
#toolbar button:focus {
    outline: none;
    background: #f0f0f0;
    color: #333;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

/* Removed floating animation for cleaner design */

/* Modern loading state */
#toolbar button.loading {
    pointer-events: none;
    opacity: 0.7;
}

#toolbar button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enhanced responsive design */
@media (max-width: 480px) {
    #toolbar button {
        font-size: 0.75em;
        padding: 12px 14px;
        min-width: 70px;
        border-radius: 12px;
    }
    
    #toolbar button:hover {
        transform: translateY(-2px) scale(1.01);
    }
}



/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    #toolbar button {
        transition: none;
        animation: none;
    }
    
    #toolbar button::before,
    #toolbar button::after {
        display: none;
    }
    
    #toolbar button:hover {
        transform: none;
    }
}