html, body {
  margin: 0;
  padding: 0;
}

canvas {
  display: block;
  position: relative;
  top: 50%;
  left: 50%;
  position: absolute;
  transform: translate(-50%, -50%);     
}

.center {
  display: block;
  position: absolute;

  margin: 0 auto;

  width: 100%;
  max-height: 100vh;
  max-width: 100vh;

  top: 50%;
  left: 50%;
  position: absolute;
  transform: translate(-50%, -50%);     
}