*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue';
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: white transparent;
}

body {
  height: 100dvh;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  place-content: center;
  background-color: #000;
}

.container {
  width: 200px;
  height: 200px;
  position: relative;
  perspective: 10000px;
  transform-style: preserve-3d;
  border-radius: 50%;
  animation: rotar 8s linear infinite alternate;

  .circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;

    &.circle-behind {
      border: 1px solid #f00;
      transform: translateZ(calc(var(--r) * -20px));
    }
  }

  .square {
    background-color: #0f08;
    width: 50%;
    height: 50%;
    position: absolute;
    top: 50%;
    left: 75%;
    transform-origin: 0 50%;
    transform: translate(-50%, -50%) rotate(calc(360deg / 9 * var(--ro)));
  }
}

@keyframes rotar {
  0% {
    transform: rotate(0deg) scale(.3);
    box-shadow: 0 0 8px 0 #0f08;
  }
  100% {
    transform: rotate(359deg) scale(.7);
    box-shadow: 0 0 228px 0 #0f08;
  }
}