#pafgame {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  overflow: hidden;
  font-family: var(--font-family);
  color: var(--primary-color);
}

.pafgame-scoreboard {
  top: 1rem;
  right: 1rem;
  position: fixed;
  pointer-events: none;
  opacity: 0;
  display: flex;
}

#pafgame-counter {
  font-size: 1rem;
  line-height: 1.5;
  margin-left: 0.5rem;
}

.pafgame-shown {
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

.pafox {
  position: absolute;
  pointer-events: none;
  height: 44px;
  width: 44px;
  opacity: 0;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
  --offset-x: 0px;
  --offset-y: 0px;
}

.pafox.preparing {
  transition: none;
  opacity: 0;
}

.pafox.active {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.pafox[data-side="top"] {
  left: 50%;
  top: 0;
  transform: translate(
    calc(-50% + var(--offset-x)),
    calc(-120% + var(--offset-y))
  );
}

.pafox[data-side="top"] img {
  rotate: 180deg;
}

.pafox[data-side="right"] {
  right: 0;
  top: 50%;
  transform: translate(
    calc(120% + var(--offset-x)),
    calc(-50% + var(--offset-y))
  );
}

.pafox[data-side="right"] img {
  rotate: -90deg;
}

.pafox[data-side="bottom"] {
  left: 50%;
  bottom: 0;
  transform: translate(
    calc(-50% + var(--offset-x)),
    calc(120% + var(--offset-y))
  );
}

.pafox[data-side="left"] {
  left: 0;
  top: 50%;
  transform: translate(
    calc(-120% + var(--offset-x)),
    calc(-50% + var(--offset-y))
  );
}

.pafox[data-side="left"] img {
  rotate: 90deg;
}

.pafox.active[data-side="top"] {
  transform: translate(calc(-50% + var(--offset-x)), var(--offset-y));
}

.pafox.active[data-side="right"] {
  transform: translate(var(--offset-x), calc(-50% + var(--offset-y)));
}

.pafox.active[data-side="bottom"] {
  transform: translate(calc(-50% + var(--offset-x)), var(--offset-y));
}

.pafox.active[data-side="left"] {
  transform: translate(var(--offset-x), calc(-50% + var(--offset-y)));
}
