[class*="ring"], .center {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
}

html {
  background-color: #3e3b66;
  background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IiIgcj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzNlM2I2NiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIvPjwvcmFkaWFsR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
  background-size: 100%;
  background-image: -moz-radial-gradient(center, ellipse cover, #3e3b66 0%, #000000 100%);
  background-image: -webkit-radial-gradient(center, ellipse cover, #3e3b66 0%, #000000 100%);
  background-image: radial-gradient(ellipse cover at center, #3e3b66 0%, #000000 100%);
  height: 100%;
  overflow: hidden;
}

section {
  cursor: pointer;
}

[class*="ring"] {
  animation: glow 3s linear infinite;
  border-radius: 50%;
  border: 0.6em solid rgba(255, 255, 255, 0.8);
  border-top: 1.5em solid rgba(255, 255, 255, 0.8);
  border-bottom: 1.5em solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.3);
  height: 30em;
  transition: 1s transform ease-in-out;
  width: 30em;
}
[class*="ring"] div {
  animation: rotate 2s linear infinite;
  border-radius: 50%;
  height: 100%;
  position: relative;
  width: 100%;
}
[class*="ring"] div:after {
  animation: squash 2s linear infinite;
  -moz-transform: scale(3, 1);
  -ms-transform: scale(3, 1);
  -webkit-transform: scale(3, 1);
  transform: scale(3, 1);
  border-radius: 50%;
  content: '';
  left: 50%;
  height: 3em;
  margin-left: -1.5em;
  opacity: 0.8;
  position: absolute;
  top: -1.2em;
  width: 3em;
}

.ring1 {
  transform: rotate(120deg) scale(0.333, 1);
}
.ring1 div:after {
  background: #2ecc71;
  box-shadow: 0 0 20px #2ecc71;
}
section:hover .ring1 {
  border: 0.6em solid rgba(255, 255, 255, 0.8);
  transform: rotate(0deg) scale(0.33333, 0.33333) perspective(600px) rotateX(60deg);
}
section:hover .ring1 div:after {
  animation: none;
  top: -1.6em;
  transform: scale(1, 1);
}

.ring2 {
  transform: rotate(240deg) scale(0.333, 1);
}
.ring2 div:after {
  background: #3498db;
  box-shadow: 0 0 20px #3498db;
}
section:hover .ring2 {
  border: 0.6em solid rgba(255, 255, 255, 0.8);
  transform: rotate(0deg) scale(0.66667, 0.66667) perspective(600px) rotateX(60deg);
}
section:hover .ring2 div:after {
  animation: none;
  top: -1.6em;
  transform: scale(1, 1);
}

.ring3 {
  transform: rotate(360deg) scale(0.333, 1);
}
.ring3 div:after {
  background: #e74c3c;
  box-shadow: 0 0 20px #e74c3c;
}
section:hover .ring3 {
  border: 0.6em solid rgba(255, 255, 255, 0.8);
  transform: rotate(0deg) scale(1, 1) perspective(600px) rotateX(60deg);
}
section:hover .ring3 div:after {
  animation: none;
  top: -1.6em;
  transform: scale(1, 1);
}

.center {
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  height: 3em;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.3);
  transition: 1s transform ease-in-out;
  width: 3em;
}
section:hover .center {
  transform: translate(0, 0.5em);
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.2), 0 0 10px rgba(255, 255, 255, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2), 0 0 30px rgba(255, 255, 255, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.3);
  }
}
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes squash {
  0%,50%, 100% {
    transform: scale(1, 1);
    top: -2.6em;
  }
  25%, 75% {
    transform: scale(2, 1);
    top: -1.2em;
  }
}