/*
.bar {
  --dynamic-width: 0%;
}
.bar:before {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 99998;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  transition: opacity 0.5s ease;
  height: 5px;
  width: 100%;
  border-radius: 3px;
  
    background-image: url('https://www.cdefgahc.com/img/pin.gif');

  background-size: 200%;
  animation: moveGradient 5s linear infinite;
}

bar:after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 99998;
    width: var(--dynamic-width);
background: linear-gradient(90deg, red 0%, yellow 15%, lime 30%, cyan 50%, blue 65%, magenta 80%, red 100%);  background-position: 50% 50%;
  background-size: 400px 400px;
  background-repeat: no-repeat;
  transition: opacity 0.5s ease;
}

.bar.loaded:after,
.bar.loaded:before {
  opacity: 0;
  pointer-events: none;
}


*/

.bar {
  --dynamic-width: 0%;
}
.bar:before {
  content: "";
height: 20px;
width: 20px;
display: block;
  background-position: 50% 50%;

    background-size: 40px 40px;
position: relative;
  z-index: 99998;
  background-image: url('https://www.cdefgahc.com/img/spinner.svg');
  transition: opacity 0.5s ease;
}
.bar:after {
  content: "";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
background: linear-gradient(90deg, red 0%, yellow 15%, lime 30%, cyan 50%, blue 65%, magenta 80%, red 100%);
width: var(--dynamic-width);
  transition: 0.3s ease;
  z-index: 99999;
    animation: moveGradient 5s linear infinite;

}


.bar2:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  background: #313a46;
background: linear-gradient(90deg, red 0%, yellow 15%, lime 30%, cyan 50%, blue 65%, magenta 80%, red 100%);
width: var(--dynamic-width);
  transition: 3s ease;
  z-index: 99999;
    animation: moveGradient 5s linear infinite;

}


.bar.loaded:after,
.bar.loaded:before {
  opacity: 0;
  pointer-events: none;
}

@keyframes moveGradient {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: -200% 0%;
  }
}
