Dark mode animation

hi guys,

I’m trying to add a sort of animation when I change the website to dark mode.
but I don’t know how I add this ( https://test-bc31e0.webflow.io )
I want to click it then change it to white mode
also, I have the code ( https://codepen.io/Volorf/pen/epGBJa )