@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap");

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

html {
  font-size: 62.5%;
}

:root {
  --primary-color: #323238;
  --bg-primary-color: #fff;
  --bg-card-primary-color: #e1e1e6;
  --bg-card-forest-color: #127369;
  --bg-card-rain-color: #02799d;
  --bg-card-coffee-machine-color: #8c6249;
  --bg-card-fireplace-color: #f2a30f;
}

.dark {
  --primary-color: #dbdbe5;
  --bg-primary-color: #202020;
  --bg-card-primary-color: #29292e;
}

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

  display: grid;
  height: 100vh;
  background-color: var(--bg-primary-color);
}

main {
  align-self: center;
  justify-self: center;

  display: flex;
  gap: 20rem;

  position: relative;
}

.toggle-dark-light {
  position: absolute;
  right: -13rem;
  top: -10rem;
}

button i {
  font-size: 4.4rem;
  color: var(--primary-color);
}

svg path {
  fill: var(--primary-color);
}

.hide {
  display: none;
}

.timer {
  display: grid;
  place-content: center;
}

.time {
  font-size: 12rem;
  display: flex;
  justify-content: space-between;
}

.controls {
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
}

button {
  border: none;
  background: none;

  cursor: pointer;
}

.sounds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.2rem;
}

.sounds .card {
  background: var(--bg-card-primary-color);
  border-radius: 2.4rem;

  padding: 2.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;

  height: 15.2rem;
  cursor: pointer;
}

.sounds .sound-forest-stop .card {
  background: var(--bg-card-forest-color);
}

.sounds .sound-rain-stop .card {
  background: var(--bg-card-rain-color);
}

.sounds .sound-coffee-machine-stop .card {
  background: var(--bg-card-coffee-machine-color);
}

.sounds .sound-fireplace-stop .card {
  background: var(--bg-card-fireplace-color);
}

.sounds .card input {
  appearance: none;

  width: 9rem;
  height: 0.4rem;

  background-color: var(--primary-color);
  border-radius: 9999px;
}

.sounds .card input::-webkit-slider-thumb {
  appearance: none;

  width: 1.6rem;
  height: 1.6rem;

  background-color: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
}

.sound-forest-stop,
.sound-rain-stop,
.sound-coffee-machine-stop,
.sound-fireplace-stop {
  animation: side-to-front 700ms ease-in-out;
}

@keyframes side-to-front {
  0% {
    transform: rotateY(90deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@media (max-width: 920px) {
  body {
    position: relative;
  }

  main {
    display: flex;
    flex-direction: column;
    gap: 7rem;

    position: initial;
  }

  .toggle-dark-light {
    position: absolute;
    right: 3rem;
    top: 3rem;
  }
}

@media (max-width: 1111px) {
  body {
    position: relative;
  }

  main {
    position: initial;
  }

  .toggle-dark-light {
    position: absolute;
    right: 3rem;
    top: 3rem;
  }
}
