* {
  box-sizing: border-box;
}

body {
  animation: flicker 10s ease-in-out infinite;
  background-color: #202;
  display: flex;
  font-family: sans-serif;
  margin: 0;
}

h1 {
  color: #020;
  filter: drop-shadow(0 0 0.25rem #fff);
  font-size: 15vw;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  line-height: 0.9;
  margin: 0;
  position: absolute;
  text-align: center;
  transform: translate(-50%, -50%);
  transition: all 1s ease-out;
  z-index: 1;
  &.light {
    color: lightgreen;
  }
  &.dark {
    color: #020;
    opacity: 0.2;
  }
}

.creepster-regular {
  font-family: "Creepster", system-ui;
  font-weight: 400;
  font-style: normal;
}

main {
  flex: 1 1 auto;
  overflow: hidden;
  position: relative;
}

#game-area {
  background-color: #222;
  background-image: radial-gradient(circle, #222, #111);
  block-size: calc(100vh - 10vmin - 4px);
  border: 2px solid #222;
  box-shadow: 0 0 0.25rem #000 inset;
  margin: 5vmin;
  position: relative;
  transition: all 0.2s ease-in-out;
}

.player,
.monster {
  animation: fade-in 3s ease-out;
  border-radius: 50%;
  font-size: 2rem;
  position: absolute;
  transition: all 1s ease-out;
  z-index: 2;
}

.emoji {
  transition: all 1s ease-out;
}

.name {
  color: white;
  font-size: 0.75rem;
  inset-block-start: -0.667rem;
  inset-inline-start: 50%;
  position: absolute;
  transform: translateX(-50%);
  z-index: 2;
}

.player .name {
  color: white;
}

.monster .name {
  color: lightgreen;
}

.dead {
  z-index: 1;
}

.dead .name {
  color: red;
}

.dead .emoji {
  animation: blink 3s ease-out;
  filter: sepia(1) hue-rotate(-45deg) saturate(3);
}

.out {
  animation: fade-out 3s ease-out;
}

.message {
  animation: fade-in 3s ease-out, blink 10s ease-out 3s infinite;
  color: lightgreen;
  filter: drop-shadow(0 0 0.25rem #fff);
  font-size: 10vw;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  line-height: 0.9;
  position: absolute;
  text-align: center;
  transform: translate(-50%, -50%);
  z-index: 1;
}
