* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  font-family: sans-serif;
  background-color: black;
}

.fade-in {
  opacity: 1;
}

.fade-out {
  opacity: 0;
}

#game-container,
#background {
  transition: opacity 0.6s ease;
}

.character-wrapper {
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.character {
  display: block;
  max-height: 100%;
  object-fit: contain;
  opacity: 1;
}

#game-container {
  position: absolute;
  overflow: hidden;
  transform-origin: top left;
}

#background-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

#background {
  transform-origin: top center;
}

#background .layer {
  position: absolute;
  transition: filter 0.5s ease;
}

.background-img {
  width: 100%;
  height: auto;
}

.interactive {
  pointer-events: auto;
  cursor: pointer;
}

#characters {
  position: relative;
  bottom: 0;
  width: 100%;
  height: 100%;
  align-content: flex-end;
  pointer-events: none;
  z-index: 1;
}

#characters * {
  pointer-events: none;
}

#fullscreen-action {
  position: absolute;
  z-index: 3;
}


.panel-overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  pointer-events: auto;
  display: block;
}

.panel-overlay::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
}

.panel-overlay > * {
  pointer-events: auto;
}
