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

* {
  margin: 0;
  padding: 0;
  font-family: "Spartan", Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100vh;
  background: url("https://images.unsplash.com/photo-1526721940322-10fb6e3ae94a?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1051&q=80");
  background-position: center;
  background-size: cover;
}

.container {
  height: 75vh;
  width: 50vw;
  background: rgba(212, 182, 142, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 50px;
  border-radius: 10px;
}

.container h1 {
  margin-bottom: 25px;
  text-align: center;
}

.container form {
  display: flex;
  justify-content: space-around;
  width: 100%;
}

.formSection {
  border: solid 2px rgb(180, 151, 113);
  border-radius: 25px;
  height: 100px;
  width: max-content;
  display: flex;
  justify-content: space-around;
  align-items: space-between;
  flex-direction: column;
  padding: 20px;
}

.formSection div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.formSection div input {
  width: 50px;
  margin-left: 15px;
  height: 30px;
}

.answer {
  font-size: 1.5rem;
}

.buttons {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}
button {
  background: #7a71b4;
  color: white;
  height: 40px;
  width: 50%;
  outline: none;
  border: none;
  transition: all 150ms ease-in-out;
}
#clear {
  background: red;
}
button:hover {
  background: #867fb4;
  cursor: pointer;
  transform: translateY(2px);
}
button:active {
  transform: translateY(4px);
}

@media screen and (max-width: 1024px) {
  .container {
    width: 75%;
  }
  #total {
    margin-bottom: 10px;
  }
}
@media screen and (max-width: 768px) {
  .container {
    width: 90%;
  }
}
@media screen and (max-width: 426px) {
  h1 {
    font-size: 1.5rem;
  }
  .answer {
    font-size: 1.2rem;
  }
  .container {
    height: 90%;
    padding: 20px;
  }
  form {
    flex-direction: column;
  }
  .formSection {
    width: 100%;
    margin: 0 auto;
  }
}
@media screen and (max-width: 320px) {
  .answer {
    text-align: center;
    width: 100%;
  }
  input {
    height: 20px;
  }
}
