/* Splash screen (loaded by BaseLayout; legacy pages may also inline these rules) */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  text-align: center;
  max-width: 300px;
}

.splash-logo {
  margin-bottom: 2rem;
}

.splash-logo-img {
  width: 120px;
  height: 120px;
  background-color: var(--accent-color);
  mask-image: url(/assets/logos/Elemento.svg);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url(/assets/logos/Elemento.svg);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.splash-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.splash-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: splash-spin 1s linear infinite;
}

.splash-text {
  font-family: var(--font-primary);
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

@keyframes splash-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

body.splash-loading {
  overflow: hidden;
}

body.splash-loading #main-content {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 768px) {
  .splash-logo-img {
    width: 100px;
    height: 50px;
  }

  .splash-spinner {
    width: 32px;
    height: 32px;
    border-width: 2px;
  }

  .splash-text {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .splash-logo-img {
    width: 80px;
    height: 40px;
  }

  .splash-spinner {
    width: 28px;
    height: 28px;
    border-width: 2px;
  }

  .splash-text {
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-spinner {
    animation: none;
    border-top-color: var(--primary-color);
  }

  .splash-screen {
    transition: none;
  }
}
