@font-face {
  font-family: 'Inexpugnable';
  src:  url('./assets/fonts/InexpugnableExtended.woff') format('woff');
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#container {
  width: 100vmin;
  height: 100vmin;
  position: relative;
  overflow: hidden;
}
#display {
  background: cornflowerblue;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}

#ui {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  z-index: 10;

  user-select: none;
}
#hearts {
  position: absolute;
  top: 0.8em;
  right: 0.8em;
  user-select: none;
  font-size: 1.3em;
}
#spells {
  position: absolute;
  bottom: 0;
  left: 16em;
  padding: 3em;
  display: flex;
}
spell {
  width: 6em;
  height: 6em;
  border: 1px solid black;
  border-radius: 30%;
  display: block;
  overflow: hidden;
  position: relative;
  --percentage: 0;
  image-rendering: pixelated;
  background: rgba(147, 141, 141, 0.7);
}
spell svg {
  width: 100%;
  height: 100%;
  stroke-dasharray: var(--percentage) 100;
  fill: transparent;
  stroke: black;
  stroke-width: 32;
}

#lightning .controlicon {
  background-image: url('./assets/leftclick.png');
  background-size: 100%;
  width: 32px;
  height: 32px;
  position: absolute;
  top: 0.2em;
  left: 0.2em;
}
.ps #lightning .controlicon {
  background-image: url('./assets/buttons/PS4_R2.png');
}
.xbox #lightning .controlicon {
  background-image: url('./assets/buttons/XboxOne_RT.png');
}
#lightning .icon {
  background-image: url('./assets/lightning.png');
  background-size: 36em;
  background-position: 28em 21em;
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 2;
}

#slowmo .controlicon {
  background-image: url('./assets/spacebar.png');
  background-size: 100%;
  width: 32px;
  height: 32px;
  position: absolute;
  top: 0em;
  left: 0.4em;
}
.ps #slowmo .controlicon {
  background-image: url('./assets/buttons/PS4_L1.png');
}
.xbox #slowmo .controlicon {
  background-image: url('./assets/buttons/XboxOne_LB.png');
}
#slowmo .icon {
  background-image: url('./assets/clock.png');
  background-size: 36em;
  background-position: 28em 13.5em;
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 2;
}

#wall .controlicon {
  background-image: url('./assets/q.png');
  background-size: 100%;
  width: 32px;
  height: 32px;
  position: absolute;
  top: 0em;
  left: 0.4em;
}
.ps #wall .controlicon {
  background-image: url('./assets/buttons/PS4_L2.png');
}
.xbox #wall .controlicon {
  background-image: url('./assets/buttons/XboxOne_LT.png');
}
#wall .icon {
  background-image: url('./assets/earth.png');
  background-size: 36em;
  background-position: 13.7em -22.8em;
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 2;
}


#mutebutton {
  position: absolute;
  top: 0.2em;
  left: 0.2em;
  font-size: 2em;
  pointer-events: initial;
  cursor: pointer;
}

#dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 10em;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  background: peachpuff;

  font-family: Inexpugnable, serif;

  z-index: 3;
  transition: opacity 500ms linear;
}
#dialog #portrait {
  background-image: url('./assets/mentor.png');
  width: 10em;
  height: 10em;
  flex-grow: 0;
  flex-shrink: 0;
  background-size: 100%;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}

#dialog.mage #portrait {
  background-image: url('./assets/mage.png');
  background-size: 30em;
  background-position: 0em -2em;
}
#dialog.sage #portrait {
  background-image: url('./assets/wizard.png');
  background-size: 100em;
  background-position: -32.4em -0.3em;
}
#dialog.skull #portrait {
  background-image: url('./assets/darkness.png');
  background-size: 60em;
  background-position: -13em -1em;
}
#dialog.turtle #portrait {
  background-image: url('./assets/cool_monster.png');
  background-size: 126em;
  background-position: -31em -4em;
}
#dialog #text {
  padding: 1em;
  font-size: 1.5em;
  flex-grow: 3;
}
#dialog #prompt {
  background-image: url('./assets/leftclick.png');
  background-size: 100%;
  z-index: 2;
  flex-grow: 2;
  flex-shrink: 0;
  flex-basis: 64px;
  height: 64px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}
.ps #dialog #prompt {
  background-image: url('./assets/buttons/PS4_R2.png');
}
.xbox #dialog #prompt {
  background-image: url('./assets/buttons/XboxOne_RT.png');
}

#dialog.hide {
  opacity: 0;
}

@media (max-width: 900px) {
  #ui {
    font-size: 1.7vw;
  }
}