:root {
  --app-bg: #f5f5f5;
  --app-primary: transparent;
}

/* mode */
html[data-mode='light'] {
  --app-bg: #f5f5f5;
}

html[data-theme='default'][data-mode='dark'] {
  --app-bg: #000000;
}

html[data-theme='purple'][data-mode='dark'] {
  --app-bg: #130328;
}

/* theme */
html[data-theme='default'] {
  --app-primary: #317bff;
}

html[data-theme='purple'] {
  --app-primary: #7903ae;
}

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app-bg);
  z-index: 9999;
  transition: opacity 0.2s ease;
}

.splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-screen-spin {
  --spin-color: var(--app-primary);
  --dot-size: 9px;
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
  animation: splash-screen-spin-rotate 1.2s linear infinite;
}

.splash-screen-spin--small {
  width: 14px;
  height: 14px;
  --dot-size: 6px;
}

.splash-screen-spin--medium {
  width: 20px;
  height: 20px;
  --dot-size: 9px;
}

.splash-screen-spin--large {
  width: 32px;
  height: 32px;
  --dot-size: 12px;
}

.splash-screen-spin > i {
  position: absolute;
  display: block;
  width: var(--dot-size);
  height: var(--dot-size);
  background: var(--spin-color);
  border-radius: 50%;
  transform: scale(0.75);
  transform-origin: 50% 50%;
  opacity: 0.3;
  animation: splash-screen-spin-dot 1s linear infinite alternate;
}

.splash-screen-spin > i:nth-child(1) {
  top: 0;
  left: 0;
}

.splash-screen-spin > i:nth-child(2) {
  top: 0;
  right: 0;
  animation-delay: 0.4s;
}

.splash-screen-spin > i:nth-child(3) {
  right: 0;
  bottom: 0;
  animation-delay: 0.8s;
}

.splash-screen-spin > i:nth-child(4) {
  bottom: 0;
  left: 0;
  animation-delay: 1.2s;
}

@keyframes splash-screen-spin-rotate {
  to {
    transform: rotate(405deg);
  }
}

@keyframes splash-screen-spin-dot {
  to {
    opacity: 1;
  }
}
