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

:root {
    font-size: 62.5%;
    
    --hue: 240;

    --primary-color: #e0e4e9;
    --secondary-color: hsl(194, 97%, 31%);
    --tertiary-color: #9baacf;
    --card-color: hsl(var(--hue), 9%, 89%);
    --dark-greyLight: #c8d0e7;
    --text-color: #767e91;
    --switch-color: #525455;
    --switch-bg-url: url(./assets/moon.svg);

    --shadow: .3rem .3rem .6rem var(--dark-greyLight), -.2rem -.2rem .5rem white;
    --inner-shadow: inset .2rem .2rem .5rem var(--dark-greyLight), inset -.2rem -.2rem .5rem white;
    --circle-shadow: .4rem .4rem .8rem var(--dark-greyLight), -.4rem -.4rem .8rem white;
    --bg-wave: linear-gradient(to bottom right, var(--dark-greyLight) 0%, white 100%);
    --inner-switch-shadow: var(--inner-shadow);
}

.dark {
    --primary-color: #1A1B1F;
    --secondary-color: hsl(194, 97%, 31%);
    --tertiary-color: #535457;
    --card-color: #1F2025;
    --dark-greyLight: #101114;
    --text-color: #A5A5A5;
    --switch-color: #D5D2D7;
    --switch-bg-url: url(./assets/sun.svg);
    
    --shadow: .3rem .3rem .6rem var(--dark-greyLight), -.2rem -.2rem .5rem #24252a;
    --inner-shadow: inset .2rem .2rem .5rem var(--dark-greyLight), inset -.2rem -.2rem .5rem #24252a;
    --circle-shadow: .4rem .4rem .8rem var(--dark-greyLight), -.4rem -.4rem .8rem #24252a;
    --bg-wave: linear-gradient(to bottom right, var(--dark-greyLight) 0%, #24252a 100%);
    --inner-switch-shadow: inset .2rem .2rem .5rem #0b0c0e, inset -.2rem -.2rem .5rem #2d2e33;
}

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

main {
    display: grid;
    align-items: center;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-gap: 5px;
    height: 100vh;
    background: var(--primary-color);
}

#switch {
    position: absolute;
    top: 3.5rem;
    right: 2rem;
}

#switch button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    animation: slide-back 0.2s;
    position: absolute;
    bottom: 3px;
    left: 4px;
    background: var(--switch-color) var(--switch-bg-url) no-repeat center;
}

.dark #switch button {
    animation: slide-in 0.2s forwards;
}

#switch span {
    display: block;
    width: 79px;
    height: 35px;
    box-shadow: var(--inner-switch-shadow);
    border-radius: 9999px;
}

.clock {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#timer {
    font-size: clamp(8rem, 4rem + 7.5vw, 10.2rem);
    font-weight: 500;
    line-height: 14.8rem;
    margin-bottom: 1.6rem;
    color: var(--text-color)
}

.minutes, .seconds {
    outline: none;
}

#controls {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(.3rem, 2rem, 5vw);
}

.hide {
    display: none;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

.sounds {
    display: grid;
    grid-template-areas: "A B"
        "C D";
    gap: clamp(1rem, 3.2rem, 5vw);
    justify-content: center;
    align-self: center;
    transition: align-self 0.5s;
}

.card {
    background: var(--card-color);  
    border-radius: 24px;
}

.card button {
    width: clamp(110px, 138px, 35vw);
    height: clamp(110px, 152px, 35vw);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.circle {
    display: grid;
    justify-items: center;
    align-items: center;
}

.circle_bt {
    background: var(--card-color);
    width: clamp(5rem, 6rem, 10vw);
    height: clamp(5rem, 6rem, 10vw);
    box-shadow: var(--shadow);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    position: relative;
    z-index: 300
}

.circle_bt.shadow, .stop:active, .plus:active, .less:active {
    box-shadow: var(--inner-shadow);
}

.circle_wave1, .circle_wave2 {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    width: clamp(5rem, 6rem, 10vw);
    height: clamp(5rem, 6rem, 10vw);
    border-radius: 50%;
    filter: blur(1px);
    z-index: 100;
}

.circle_wave1 {
    box-shadow: var(--circle-shadow);
    background: var(--bg-wave);
    animation: waves 4s linear infinite;
}

.circle_wave2 {
    box-shadow: var(--circle-shadow);
    animation: waves 4s linear 2s infinite;
}

.play, .pause {
    transition: all 0.2s linear;
}

.stop, .plus, .less {
    width: clamp(5rem, 6rem, 10vw);
    height: clamp(5rem, 6rem, 10vw);
    border-radius: 50%;
    background: var(--card-color);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    align-items: center;
}

.play svg path, .stop svg path, .plus svg path, .less svg path, .florest svg path, .rain svg path, .coffeepot svg path, .fire svg path {
    fill: var(--tertiary-color);
}

.play:hover svg path, .stop:hover svg path, .plus:hover svg path, .less:hover svg path, .florest:hover svg path, .rain:hover svg path, .coffeepot:hover svg path, .fire:hover svg path {
    fill: var(--secondary-color);  
}

.pause svg path {
    fill: var(--secondary-color);
}

.cardClicked {
    border-radius: 24px;
}

.cardClicked button {
    width: clamp(110px, 138px, 35vw);
    height: clamp(110px, 152px, 35vw);
    border-radius: 24px;
    box-shadow: var(--inner-shadow);
}

.cardClicked .florest svg path, .cardClicked .rain svg path, .cardClicked .coffeepot svg path, .cardClicked .fire svg path {
    fill: var(--secondary-color);
}

@media (max-width: 644px) {
    .sounds {
      align-self: start;
    }
}

@media (max-height: 485px) {
    #switch {
      left: 2.5rem;
    }

    .dark #switch button {
        animation: slide-in-leftSide 0.2s forwards;
    }

    #switch button {
        animation: slide-back-leftSide 0.2s;
    }
}

@keyframes waves {
    0% {
      transform: scale(1);
      opacity: 1;
    }
  
    50% {
      opacity: 1;
    }
  
    100% {
      transform: scale(2);
      opacity: 0;
    }
}

@keyframes slide-in {
    from {
      left: 0.25rem;
    }
    to {
      left: 59%;
    }
}
  
@keyframes slide-back {
    from {
      left: 59%;
    }
    to {
      left: 0.25rem;
    }
}

@keyframes slide-in-leftSide {
    from {
      left: 0.25rem;
    }
    to {
      left: 5%;
    }
}
  
@keyframes slide-back-leftSide {
    from {
      left: 5%;
    }
    to {
      left: 0.25rem;
    }
}