/* Initial page loader styles - will be replaced when module loads */

#root {
  width: 100%;
  min-height: 100dvh;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#root:has(app-main) {
  display: block;
  align-items: stretch;
  justify-content: flex-start;
}

/* Loader Wrapper */
.loader-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px 0 0;
}

.loader-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  opacity: 0;
  animation: fadeInText 0.8s ease-out 0.3s forwards;
}

.loader-brand .brand-title {
  margin: 0;
  padding: 0;
  line-height: 1.4;
  font-weight: 500;
  font-size: 2rem;
  color: transparent;
  background: var(--accent-linear);
  background-clip: text;
  -webkit-background-clip: text;
  font-family: var(--font-logo), monospace;
  letter-spacing: -0.5px;
}

.loader-container {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring {
  position: absolute;
  border-radius: 50%;
  border: 2.5px solid transparent;
  opacity: 0;
  animation: fadeInRing 0.6s ease-out forwards;
}

.loader-ring:nth-child(1) {
  width: 90px;
  height: 90px;
  border-top-color: var(--accent-color);
  border-right-color: var(--accent-color);
  animation: fadeInRing 0.6s ease-out forwards, 
             smoothRotate 2.5s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
  animation-delay: 0s, 0.6s;
  filter: drop-shadow(0 0 6px var(--accent-color));
}

.loader-ring:nth-child(2) {
  width: 68px;
  height: 68px;
  border-bottom-color: var(--alt-color);
  border-left-color: var(--alt-color);
  animation: fadeInRing 0.6s ease-out forwards, 
             smoothRotate 2s cubic-bezier(0.4, 0.0, 0.2, 1) infinite reverse;
  animation-delay: 0.2s, 0.8s;
  filter: drop-shadow(0 0 5px var(--alt-color));
}

.loader-ring:nth-child(3) {
  width: 46px;
  height: 46px;
  border-top-color: var(--accent-alt);
  border-right-color: var(--accent-alt);
  animation: fadeInRing 0.6s ease-out forwards, 
             smoothRotate 1.5s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
  animation-delay: 0.4s, 1s;
  filter: drop-shadow(0 0 3px var(--accent-alt));
}

.loader-pulse {
  width: 18px;
  height: 18px;
  background: var(--accent-linear);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent-color);
  opacity: 0;
  animation: fadeInPulse 0.6s ease-out 0.6s forwards,
             smoothPulse 2s cubic-bezier(0.4, 0.0, 0.2, 1) 1.2s infinite;
}

.loader-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 24px;
  font-weight: 500;
  color: var(--accent-color);
  opacity: 0;
  animation: fadeInText 0.8s ease-out 0.8s forwards;
}

.loader-text .dot {
  display: inline-block;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.loader-text .dot:nth-child(1) {
  animation-delay: 0s;
}

.loader-text .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loader-text .dot:nth-child(3) {
  animation-delay: 0.4s;
}

.loader-version {
  margin-top: 5px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--gray-color);
  opacity: 0;
  animation: fadeInText 0.8s ease-out 1s forwards;
  font-family: var(--font-main), sans-serif;
  letter-spacing: 0.5px;
}

/* Animations */
@keyframes fadeInRing {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInPulse {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInText {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dotBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-12px);
    opacity: 1;
  }
}

@keyframes smoothRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes smoothPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--accent-color);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 0 12px transparent;
    opacity: 0.8;
  }
}
