CSS rotation and box-shadow

How can the shadow direction be kept?

HTML

<div class="box1 shadow"></div><div class="box1"></div>
<div class="box2 shadow"></div><div class="box2"></div>
<div class="box3 shadow"></div><div class="box3"></div>
<div class="box4 shadow"></div><div class="box4"></div>
<div class="box5 shadow"></div><div class="box5"></div>

CSS

div {
  width: 50px;
  height: 50px;
  margin: 20px;
  display: inline-block;
}

.shadow {
  background-color: black !important;
  width: 40px;
  height: 40px;
  box-shadow: 0px 0px 10px 5px #000;
  margin-top: 35px;
  margin-left: 35px;
  position: absolute;
  z-index: -1;
}

.box1 {
  background-color: #b00;
}

.box2 {
  background-color: #0b0;
  transform: rotate(30deg);
}

.box3 {
  background-color: #00b;
  transform: rotate(60deg);
}

.box4 {
  background-color: #b0b;
  transform: rotate(90deg);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.box5 {
  background-color: #0bb;
  animation-name: spin;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}