 @import url("https://fonts.googleapis.com/css?family=Poppins:300,800&display=swap");

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
body {
    min-height: 100vh;
   
    background-size: 10%;
    color: hsl(0, 0%, 11%);
    font-family: "Poppins", sans-serif;
    /* center the contents horizontally */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.5rem 0;
}
/* display the controls in a row, pushing the buttons on either side */
.controls {
    width: 90vw;
    max-width: 500px;
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
h2 {
    text-transform: uppercase;
    font-weight: 300;
    font-size: 1.75rem;
}
button {
    font-weight: 800;
    text-align: center;
    font-family: inherit;
    color: inherit;
    font-size: 1.25rem;
    background: none;
    border: none;
    outline: none;
}
button svg {
    display: block;
    width: 3.5em;
    height: auto;
}
/* when the button is focused underline the span element */
button:focus span {
    text-decoration: underline;
}
/* when the button is hovered or being focused on, rotate the nested svg
! only as the hover/focus occurs
*/
button:hover svg,
button:focus svg {
    transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform: rotate(1turn);
}
/* rotate the first svg in the opposite direction */
button:first-of-type:hover svg,
button:first-of-type:focus svg {
    transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform: rotate(-1turn);
}
/* add a transition to the canvas to rotate the element smoothly */
canvas {
    width: 90vw;
    max-width: 450px;
    display: block;
    transition: transform 1s cubic-bezier(0.445, 0.05, 0.55, 0.95);
}