:root {
  --loading-bg: #1a1a1a;
  --loading-text: #ffffff;
  --loading-highlight: #4a9eff;
  --fade-duration: 0.5s;
}

body:not(.setting) {
  background-color: var(--loading-bg);
  border-radius: 15px;
}

body {
  overflow: hidden;
}

body > *:not(#css-loading-indicator) {
  visibility: hidden;
  opacity: 0;
}

body.content-loaded > *:not(#css-loading-indicator) {
  visibility: visible;
  opacity: 1;
}

#css-loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--loading-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity var(--fade-duration) ease-in-out;
  border-radius: 15px;
}

.loading-animation {
  text-align: center;
  color: var(--loading-text);
  font-size: 1.2rem;
}

.loading-dots {
  display: inline-block;
  position: relative;
  width: 60px;
  height: 12px;
  margin-left: 8px;
}

.loading-dots div {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--loading-highlight);
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading-dots div:nth-child(1) {
  left: 6px;
  animation: loading-dots1 0.6s infinite;
}

.loading-dots div:nth-child(2) {
  left: 6px;
  animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(3) {
  left: 26px;
  animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(4) {
  left: 45px;
  animation: loading-dots3 0.6s infinite;
}

@keyframes loading-dots1 {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes loading-dots2 {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(19px, 0);
  }
}

@keyframes loading-dots3 {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(0);
  }
}

.fade-in {
  animation: fadeIn var(--fade-duration) ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
