* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: #090b12;
  color: white;
  font-family: Arial, sans-serif;
  overflow: hidden;
  user-select: none;
}

#game {
  width: 100%;
  max-width: 900px;
  height: 100vh;
  margin: auto;
  display: flex;
  flex-direction: column;
}

header {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: #111522;
}

header h1 {
  margin: 0;
  font-size: 20px;
}

#round {
  font-weight: bold;
}

.arena {
  position: relative;
  flex: 1;
  overflow: hidden;
  background:
    linear-gradient(to bottom, #161b2b 0%, #29203c 55%, #15151b 56%, #080808 100%);
}

.arena::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 45px,
    rgba(255,255,255,.04) 46px 47px
  );
  pointer-events: none;
}

.fighter-info {
  position: absolute;
  top: 20px;
  width: 42%;
  z-index: 10;
}

.player-info {
  left: 4%;
}

.enemy-info {
  right: 4%;
  text-align: right;
}

.health {
  height: 18px;
  margin-top: 5px;
  border: 2px solid white;
  background: #2b2b2b;
  overflow: hidden;
}

.health div {
  width: 100%;
  height: 100%;
  background: #27e66f;
  transition: width .2s;
}

.enemy-info .health div {
  margin-left: auto;
}

.fighter {
  position: absolute;
  bottom: 16%;
  width: 90px;
  height: 180px;
  z-index: 5;
  transition: transform .08s;
}

.player {
  left: 20%;
}

.enemy {
  right: 20%;
  transform: scaleX(-1);
}

.head {
  position: absolute;
  width: 48px;
  height: 48px;
  left: 21px;
  top: 0;
  border-radius: 50%;
  background: #e2a67b;
  border: 4px solid #111;
}

.body {
  position: absolute;
  width: 58px;
  height: 75px;
  left: 16px;
  top: 48px;
  border-radius: 18px;
  background: #4169e1;
  border: 4px solid #111;
}

.enemy .body {
  background: #c83232;
}

.arm,
.leg {
  position: absolute;
  background: #e2a67b;
  border: 4px solid #111;
  border-radius: 15px;
}

.arm {
  width: 20px;
  height: 70px;
  top: 53px;
}

.arm1 {
  left: 2px;
  transform: rotate(25deg);
}

.arm2 {
  right: 2px;
  transform: rotate(-25deg);
}

.leg {
  width: 24px;
  height: 75px;
  top: 118px;
}

.leg1 {
  left: 18px;
  transform: rotate(8deg);
}

.leg2 {
  right: 18px;
  transform: rotate(-8deg);
}

.controls {
  height: 150px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111522;
}

button {
  border: 0;
  color: white;
  font-size: 25px;
  font-weight: bold;
  background: #252b3c;
  border-radius: 50%;
  width: 62px;
  height: 62px;
  box-shadow: 0 5px 0 #111722;
  touch-action: manipulation;
}

button:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #111722;
}

.movement,
.actions {
  display: flex;
  gap: 10px;
}

.actions button {
  font-size: 22px;
}

#special {
  background: #6842c7;
}

#message {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 42px;
  font-weight: bold;
  text-shadow: 0 4px 10px #000;
  z-index: 20;
  pointer-events: none;
}

#restart {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  width: 180px;
  height: 60px;
  border-radius: 15px;
  background: #f1f1f1;
  color: #111;
  font-size: 17px;
}

@media (max-width: 500px) {
  header h1 {
    font-size: 16px;
  }

  .fighter {
    transform: scale(.82);
    transform-origin: bottom center;
  }

  .enemy {
    transform: scaleX(-1) scale(.82);
  }

  button {
    width: 55px;
    height: 55px;
  }

  .controls {
    height: 135px;
  }
}