html,
body {
  width: 100dvw;
  height: 100dvh;
  padding: 0;
  margin: 0;
}

body {
  background: #333;
  font-family: arial;
}

.ui-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
}

.user-section {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.3);
  transform: translate3d(0, 0, 0);
}
.user-section--disabled {
  transform: translate3d(0, -101%, 0);
  transition: transform 0.5s EASE-IN-OUT;
}

.helper-box {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 20px;
  border: 1px solid white;
  color: white;
  /* background: rgba(255, 255, 255, 0.3); */
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
}

.helper-box__title {
  margin-top: 0;
}

.helper-box :last-child {
  margin-bottom: 0;
}

.form--one-line {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
  position: absolute;
  height: 50px;
  padding: 0;
  border: 3px solid white;
  font-size: 22px;
  /* background: #fcfff1; */
  background: #f7e8d3;
  border-radius: 30px;
  box-shadow: 0 2px 16px -5px rgba(0, 0, 0, 0.5);
}

.form--one-line .field,
.form--one-line .form__footer,
.form--one-line input,
.form--one-line button {
  display: block;
  height: 100%;
}

.form--one-line .field {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  background: inherit;
}

.form--one-line label {
  padding: 0 10px 0 20px;
}

.form--one-line input {
  outline: none;
  width: 200px;
  padding: 0 10px;
  border: none;
  font-size: 1em;
  font-weight: bold;
  color: white;
  -webkit-text-fill-color: white;
  background: inherit;
  border-radius: 0 30px 30px 0;
  text-shadow: 0 0 3px black, 0 0 2px black, 0 0 1px black, 0 0 5px #00eda7;
  caret-color: black;
}

.form--one-line button {
  padding: 0 18px 0 10px;
  border: 0;
  font: 900 1.1em/1 "arial black";
  color: white;
  background: #b7b7b7;
  border-radius: 0 30px 30px 0;
  transition: box-shadow 0.6s;
}

.form--one-line button:focus,
.form--one-line button:hover {
  box-shadow: inset 0 0 50px #00eda7;
}

.join-game-button {
  pointer-events: none;
  display: block;
  position: absolute;
  z-index: 50;
  top: 50%;
  right: -10px;
  width: 70px;
  height: 70px;
  border: 3px solid white;
  font: 900 22px/1 "arial black";
  color: white;
  background: #b7b7b7;
  border-radius: 50px;
  transform: translate(0, -50%) scale(0.75);
  transition: box-shadow 0.6s, transform 0.6s, color 0.3s, background-color 0.3s;
}

.join-game-button--active {
  pointer-events: auto;
  transform: translate(0, -50%) scale(1);
  box-shadow: inset 0 0 50px #00eda7;
}

.join-game-button--active:hover {
  box-shadow: inset 0 0 10px #00eda7;
  background: white;
  color: black;
  animation: shake-start-button 1s 0s infinite forwards;
}

.impatient-circles {
  pointer-events: none;
  display: block;
  position: absolute;
}
.impatient-circles--join-button {
  z-index: -1;

  /* Same as join btn */
  top: 50%;
  right: -10px;
  width: 70px;
}
.impatient-circles > span {
  opacity: 0;
  display: block;
  position:absolute;
  top: 50%;
  left: 50%;
  border: 2px dashed rgba(0, 237, 167, 0.8);
  /* border: 2px dotted #00eda7; */
  transform: translate(-50%, -50%);
  border-radius: 100%;
  animation: circle-centered 15s 0s infinite linear forwards;
  transition: opacity 5s;
}
.impatient-circles > span:nth-child(2n) {
  border-width: 5px;
  border-color: rgba(255, 255, 255, 0.8);
  animation-direction: reverse;
}

/* .form--one-line .field input {
  height: 50px;
} */


.playground {
  box-sizing: border-box;
  overflow: hidden;
  /* overflow: auto; */
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid black;
  background: no-repeat center / cover url("../images/cage-space-cloud-purple-opt.jpg");
  transform-origin: 0 0;
}

/* SAFEZONE */
.playground::before {
  content: '';
  display: block;
  position: absolute;
  z-index: 60;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50px;
  border: 3px solid white;
  border-right-width: 0;
  box-shadow: inset 0 0 50px #00eda7;
  background: white;
  border-radius: 50px 0 0 50px;
}

.playground > * {
  user-select: none;
}

.playground__background {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #acbcbf;
  transition: opacity 1s;
}

.main-message {
  pointer-events: none;
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  font-size: 10vw;
  font-weight: 900;
  text-shadow: white 0 0 10px;
  transition: opacity 1s;
}
.main-message.active {
  opacity: 1;
}

.debug-canvas {
  pointer-events: none;
  user-select: none;
  z-index: 100;
}

.player {
  position: absolute;
  z-index: 60;
  border: 2px solid white;
  border-radius: 30px;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  transition:
    left 0.025s,
    top 0.025s,
    border-color 1s,
    background-color 1s,
    opacity 0.5s;
}
.player--charge_teleport {
  animation: shake-player 1s 0s infinite forwards;
}
.player--teleport {
  transition:
    border-color 1s,
    background-color 1s,
    opacity 0.5s;
}
.player--dead {
  z-index: 9;
  border-color: #c97a7c;
  transition:
    left 0.5s ease-out,
    top 0.5s ease-out,
    border-color 1s,
    background-color 1s,
    opacity 0.5s;
}
.player::before {
  content: '';
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: 100%;
}

.player__name {
  position: absolute;
  top: -5px;
  left: 50%;
  letter-spacing: 2px;
  color: white;
  transform: translate(-50%, -100%);
}
.player--dead .player__name {
  display: none;
}

.blood {
  display: block;
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #c97a7c;
  border-radius: 100%;
  transform: translate(-50%, -50%);
  transform-origin: 0 0;
  transition: opacity 0.5s;
  animation: blood 4s 0s 1 forwards;
}
.blood--small,
.blood--medium {
  animation: none;
}

@keyframes blood {
  0% {
    transform: scale(0.7) translate(-50%, -50%);
  }
  100% {
    transform: scale(2) translate(-50%, -50%);
  }
}


.enemy {
  position: absolute;
  z-index: 21;
  /* border: 2px solid black; */
  background: #e91b53;
  box-sizing: border-box;
  transform: translate3d(-100%, 0, 0);
  transition: background-color 5s linear;
  /* animation: colors 10s 0s infinite forwards; */
}
.enemy.initiated {
  transition: transform 0.15s, background-color 5s linear;
}
.enemy.dying {
  opacity: 0;
  transition: transform 0.15s, opacity 0.3s;
}

.enemy-shadow {
  position: absolute;
  z-index: 20;
  /* border: 2px solid black; */
  background: black;
  box-sizing: border-box;
  transition: transform 0.15s;
}
.enemy-shadow.dying {
  opacity: 0;
  transition: transform 0.15s, opacity 0.3s;
}

.objective {
  box-sizing: border-box;
  position: absolute;
  z-index: 50;
  background: white;
  border-radius: 100%;
  box-shadow: 0 0 0.5em 5px white;
  transition: opacity 0.3s, transform 0.3s;
  animation: star-rotation linear 4s 0s infinite;
}

.objective__star {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: 0;
  height: 0;
  border-right:  0.3em solid transparent;
  border-bottom: 1em  solid transparent;
  border-left:   0.3em solid transparent;
}

.objective__star::before,
.objective__star::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  position: absolute;
  top: .6em;
  left: -1em;
  border-right:  1em solid transparent;
  border-bottom: 0.7em  solid transparent;
  border-left:   1em solid transparent;
}
.objective__star::before {
  transform: rotate(-35deg);
}
.objective__star::after {
  transform: rotate(35deg);
}

.objective__star--front {
  border-bottom-color:#62cdff;
  font-size: 0.65em;
  transform: translate3d(-50%, -21%, 0);
}
.objective__star--front::before,
.objective__star--front::after {
  border-bottom-color: #62cdff;
}

.objective__star--back {
  border-bottom-color:#38f8ff;
  font-size: calc(0.65em + 8px);
  transform: translate3d(-50%, calc(-21% - 6px), 0);
}
.objective__star--back::before,
.objective__star--back::after {
  border-bottom-color: #38f8ff;
}

.objective--team {
  transition: top 0.08s, left 0.08s
}

.objective--team .objective__star--front {
  border-bottom-color:#ffbc3e;
  font-size: 0.6em;
}
.objective--team .objective__star--front::before,
.objective--team .objective__star--front::after {
  border-bottom-color: #ffbc3e;
}

.objective--team .objective__star--back {
  border-bottom-color:#ffee00;
  font-size: calc(0.65em + 10px);
  transform: translate3d(-50%, calc(-21% - 10px), 0);
}
.objective--team .objective__star--back::before,
.objective--team .objective__star--back::after {
  border-bottom-color: #ffee00;
}

.claim-zone {
  position: absolute;
  border: 4px dashed #ffee00;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 100%;
  box-shadow: inset 0 0 20px #ffbc3e;
  animation: star-rotation linear 8s 0s infinite;
}

.score-counter--overlay {
  position: absolute;
  z-index: 999;
  bottom: 0;
  left: 0;
  padding: 10px;
  font: bold 16px arial;
  color: #fff;
  background: #000;
}
.score-counter{
  user-select: none;
}
.score-counter .score {
}
.score-counter .objective-score {
  font-weight: 900;
  color: #62cdff;
}

.test-center {
  position: absolute;
  z-index: 999;
  width: 3px;
  height: 3px;
  background-color: white;
}

.rainbow--animated {
  background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff, #0099ff , #00ff00, #ff3399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-animation 2s linear infinite forwards;
  background-size: 250% 100%;
}

.text-pop {
  pointer-events: none;
  position: absolute;
  z-index: 70;
  font-size: 1.5em;
  font-weight: 700;
  color: white;
}
.text-pop--objective {
  text-shadow: #62cdff 0 0 10px, #62cdff 0 0 1px, #62cdff 0 0 2px, #62cdff 0 0 3px;
}
.text-pop--team-objective {
  font-size: 3em;
  text-shadow: #ffee00 0 0 10px, #ffee00 0 0 1px, #ffee00 0 0 2px, #ffee00 0 0 3px;
}
.text-pop--player {
  font-size: 2em;
  color: #e91b53;
  text-shadow: white 0 0 10px, white 0 0 1px, white 0 0 2px, white 0 0 3px;
}

.text-pop.animated {
  animation: text-pop 0.75s 0s linear 1 forwards;
}

@keyframes star-rotation {
  0% {
    transform: scale(0.9) rotate(45deg);
  }
  25% {
    transform: scale(1.1) rotate(135deg);
  }
  50% {
    transform: scale(0.9) rotate(225deg);
  }
  75% {
    transform: scale(1.1) rotate(315deg);
  }
  100% {
    transform: scale(0.9) rotate(405deg);
  }
}

@keyframes colors {
  0% {
    background:  #e91b53;
  }
  33.33% {
    background:  #be40d9;
  }
  66.66% {
    background: #e9ad54
  }
  100% {
    background:  #e91b53;
  }
}

@keyframes shake-player {
  0% {
    transform: translate3d(-50%, -50%, 0) scale(0.9);
  }
  10% {
    transform: translate3d(-65%, -50%, 0) scale(0.95);
  }
  20% {
    transform: translate3d(-50%, -65%, 0) scale(0.85);
  }
  30% {
    transform: translate3d(-35%, -35%, 0) scale(0.95);
  }
  40% {
    transform: translate3d(-55%, -35%, 0) scale(0.75);
  }
  50% {
    transform: translate3d(-65%, -65%, 0) scale(0.9);
  }
  60% {
    transform: translate3d(-50%, -45%, 0) scale(0.95);
  }
  70% {
    transform: translate3d(-35%, -65%, 0) scale(0.85);
  }
  80% {
    transform: translate3d(-40%, -35%, 0) scale(0.95);
  }
  90% {
    transform: translate3d(-55%, -40%, 0) scale(0.9);
  }
  100% {
    transform: translate3d(-35%, -45%, 0) scale(0.925);
  }
}

@keyframes shake-start-button {
  0% {
    transform: translate3d(-3%, -48%, 0) scale(0.95);
  }
  10% {
    transform: translate3d(-1%, -51%, 0) scale(0.97);
  }
  20% {
    transform: translate3d(0%, -52%, 0) scale(0.98);
  }
  30% {
    transform: translate3d(2%, -48%, 0) scale(0.99);
  }
  40% {
    transform: translate3d(-2%, -51%, 0) scale(0.95);
  }
  50% {
    transform: translate3d(-1%, -47%, 0) scale(0.96);
  }
  60% {
    transform: translate3d(0%, -50%, 0) scale(1.02);
  }
  70% {
    transform: translate3d(3%, -51%, 0) scale(0.99);
  }
  80% {
    transform: translate3d(1%, -49%, 0) scale(0.98);
  }
  90% {
    transform: translate3d(-2%, -51%, 0) scale(0.95);
  }
  100% {
    transform: translate3d(1%, -52%, 0) scale(0.98);
  }
}

@keyframes circle-centered {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }
  16.6667% {
    transform: translate(-50%, -50%) rotate(60deg) scale(0.95);
  }
  33.3334% {
    transform: translate(-50%, -50%) rotate(120deg) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) rotate(180deg) scale(0.9);
  }
  66.6668% {
    transform: translate(-50%, -50%) rotate(240deg) scale(1);
  }
  83.3335% {
    transform: translate(-50%, -50%) rotate(300deg) scale(0.95);
  }
  100% {
    transform: translate(-50%, -50%) rotate(359deg) scale(1);
  }
}

@keyframes rainbow-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100% 0;
  }
}

@keyframes text-pop {
  0% {
    opacity: 0.8;
    transform: scale(0.8) translate(-50%, -60%);
  }
  35% {
    opacity: 1;
    transform: scale(0.9) translate(-40%, -75%);
  }
  70% {
    opacity: 1;
    transform: scale(1) translate(-25%, -100%);
  }
  100% {
    opacity: 0;
    transform: scale(0.95) translate(-15%, -115%);
  }
}
