* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --hue: 194;
    --bg-color:hsl(var(--hue), 40%, 98%);
    --text-color:hsl(var(--hue), 6%, 21%);
    --controls-bg-color:hsl(var(--hue), 9%, 89%);

    --bg-forest-color: background linear-gradient(45deg, #064d18 0%, rgb(0, 255, 0) 100%);
    --bg-rain-color: background linear-gradient(45deg, #0039a3 0%, rgb(177, 181, 238) 100%);
    --bg-coffee-shop-color: background linear-gradient(45deg, #7a4c07 0%, rgb(238, 164, 26) 100%);
    --bg-fireplace-color: background linear-gradient(45deg, #8f1313 0%, rgb(252, 4, 4) 100%);

    font-size: clamp(40%, 1% + 2vw, 62.5%);
}

html.dark {
    --bg-color:hsl(var(--hue), 5%, 7%);
    --text-color:hsl(var(--hue), 40%, 98%);
}

html.dark .ph-moon,
html:not(.dark) .ph-sun {
    display: none;
}

#toggle-mode {
    position: absolute;
    right: 3.2rem;
    top: 3.2rem;
    font-size: 3.2rem;
    line-height: 0;

    color: var(--text-color);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;

    display: grid;
    height: 100vh;
    place-content: center;
}

#app {
    display: grid;
    justify-items: center;
    align-items: center;

    grid-template-areas:
    "header main aside";
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 50%;
}

.flex {
    display: flex;
}

#timer {
    font-size: 9.6rem;
    font-weight: 500;
    text-align: center;
}

#controls {
    padding: 0.8rem 4rem;
    gap: 1.6rem;
}

button {
    background-color: transparent;
    border: 0;
    color: var(--text-color);
    
    cursor: pointer;
    
    font-size: 4.8rem;
}

aside .button {
    width: 13.8rem;
    height: 15.2rem;
}

#songs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    max-width: 50%;
    gap: 3.2rem;
    margin-left: 10rem
}

#songs button {
    background-color: var(--controls-bg-color);
    border-radius: 1.2rem;
    padding: 2rem 2.4rem;
    width: 100%;
    height: 100%;
}

#forest:hover,
#forest.active {
    background: var(--bg-forest-color);
    animation: gradient 3s ease-in-out infinite;
    background-size: 300% 300%;
}

#rain:hover,
#rain.active {
    background: var(--bg-rain-color);
    animation: gradient 3s ease-in-out infinite;
    background-size: 300% 300%;
}

#coffee-shop:hover,
#coffee-shop.active {
    background: var(--bg-coffee-shop-color);
    animation: gradient 3s ease-in-out infinite;
    background-size: 300% 300%;
}

#fireplace:hover,
#fireplace.active {
    background: var(--bg-fireplace-color);
    animation: gradient 3s ease-in-out infinite;
    background-size: 300% 300%;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* controls */
.running .ph-play-circle,
.running .ph-timer,
html:not(.running) .ph-pause-circle,
html:not(.running) .ph-stop-circle {
    display: none;
}

@media only screen and (max-width: 1024px) {
    #app {
        grid-template-areas:
            "header"
            "main"
            "aside";
        grid-template-rows: auto auto auto;
        justify-items: center;
        align-items: start;
    }

    main {
        max-width: 100%;
        margin-bottom: 2rem;
    }

    #songs {
        display: flex;
        flex-direction: row;
        gap: 1.6rem;
        justify-content: center;
        width: 100%;
        margin: 0 auto;
    }

    #songs button {
        flex: 1;
        height: auto;
        padding: 1rem;
    }
}





