html {
  --splash: #000000;
  background: var(--splash);
  color-scheme: dark;
}

html[data-paper="light"] {
  color-scheme: light;
}

html[data-theme="light"] { --splash: #f4f1ea; }
html[data-theme="architecture"] { --splash: #e6dfd4; }
html[data-theme="sculpture"] { --splash: #e7e3de; }
html[data-theme="painting"] { --splash: #f4ebdd; }
html[data-theme="dance"] { --splash: #f7e7ec; }
html[data-theme="literature"] { --splash: #f2ece3; }
html[data-theme="music"] { --splash: #171922; }
html[data-theme="cinema"] { --splash: #14110e; }

body {
  margin: 0;
  background: var(--splash);
}

html:has(.splash:not(.is-done)) {
  overflow: hidden;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--splash);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-mark {
  width: min(240px, 68vw);
  animation: splash-in 0.7s ease both;
}

.splash img {
  display: block;
  width: 100%;
  height: auto;
}

.splash .logo-light {
  display: none;
}

html[data-paper="light"] .splash .logo-dark {
  display: none;
}

html[data-paper="light"] .splash .logo-light {
  display: block;
}

.splash-line {
  display: block;
  width: 72%;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff4f9a 0%, #e15cff 16%, #7a7dff 33%, #3ec6ff 50%, #3ee08a 66%, #e7f25a 82%, #ff6a3d 100%);
  background-size: 200% 100%;
  animation: splash-drift 2.8s linear infinite;
}

@keyframes splash-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes splash-drift {
  to {
    background-position: 200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash,
  .splash-mark,
  .splash-line {
    animation: none;
    transition: none;
  }
}
