<div class="sky">
  <div class="sun"></div>
  <div class="moon"></div>
  <div class="corona"></div>
</div>
body, html {
  margin: 0;
  padding: 0;
  background-color: #000;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sky {
  position: relative;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at center, #002d72, #000);
  border-radius: 50%;
  overflow: hidden;
}

.sun {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #ffdd00, #ff9900);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 80px rgba(255, 153, 0, 0.7);
}

.moon {
  position: absolute;
  width: 180px;
  height: 180px;
  background: #333;
  border-radius: 50%;
  top: 50%;
  left: 100%;
  transform: translate(-100%, -50%);
  animation: moveMoon 10s linear infinite;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}

.corona {
  position: absolute;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: coronaGlow 10s ease-in-out infinite;
}

@keyframes moveMoon {
  0% {
    left: 100%;
    transform: translate(-100%, -50%);
  }
  50% {
    left: 50%;
    transform: translate(-50%, -50%);
  }
  100% {
    left: 0;
    transform: translate(0, -50%);
  }
}

@keyframes coronaGlow {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.