body,
html {
  margin: 0;
  background-color: rgba(30, 30, 30, 0);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

main {
  flex: 1; 
  align-items: center;
  justify-content: center;
}

canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  object-fit: scale-down;
  margin: auto;
  overflow: auto;
  z-index: -1;
}

.loading-gif {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  object-fit: scale-down;
  margin: auto;
  overflow: auto;
  z-index: 1;
}

.loading-gif img{
  max-width: 40vw;
  max-height: 40vh;
}

.fade-in {
  transition: opacity 1s ease-out;
  opacity: 1 !important;
}

.fade-out {
  transition: opacity 1s ease-out;
  opacity: 0 !important;
}

#p5_loading {
  display: none;
}

/* LOADING BAR */
#loading-bar {
  opacity: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40vmin;
  height: fit-content;
  z-index: 5;
  background-color: #2e2e2ef0;
  border: 3px solid #ffffff;
  padding: 3px;
}

#loading-bar-inner {
  width: 0%;
  min-height: 2vh;
  height:auto;
  background-color: #ffffff;
}

#loading-bar-text {
  width: 100%;
  height: 100%;
  text-align: center;
  color: #ffffff;
}