Problem with millis() timing

Calculate diff all the time in state three.
When the button is released, If it is less than debounce set state one else check whether it is less than 1000. If it is, set state for short press.

Otherwise, check for diff>=1000. If it is set state for long press