/* ========================================
   Профессиональный минималистичный прелоадер
   ======================================== */

:root {
  --accent-blue: #3B82F6;
  --text-white: #ffffff;
}

.preloader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, 
    rgba(5, 6, 15, 1) 0%, 
    rgba(16, 21, 41, 0.98) 50%, 
    rgba(5, 6, 15, 1) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(10px);
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 600px;
  width: 90%;
  text-align: center;
}

/* ========================================
   ТРИ АНИМИРОВАННЫЕ ТОЧКИ
   ======================================== */

.dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.dot {
  width: 20px;
  height: 20px;
  background: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 
    0 0 20px rgba(59, 130, 246, 0.6),
    0 0 40px rgba(59, 130, 246, 0.4),
    0 0 60px rgba(59, 130, 246, 0.2);
  animation: dotPulse 1.5s ease-in-out infinite;
}

.dot:nth-child(1) {
  animation-delay: 0s;
}

.dot:nth-child(2) {
  animation-delay: 0.5s;
}

.dot:nth-child(3) {
  animation-delay: 1s;
}

@keyframes dotPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
    box-shadow: 
      0 0 20px rgba(59, 130, 246, 0.6),
      0 0 40px rgba(59, 130, 246, 0.4),
      0 0 60px rgba(59, 130, 246, 0.2);
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 
      0 0 30px rgba(59, 130, 246, 0.8),
      0 0 60px rgba(59, 130, 246, 0.6),
      0 0 90px rgba(59, 130, 246, 0.4);
  }
}


/* ========================================
   ИНДИКАТОР ПРОГРЕССА (постоянно активен)
   ======================================== */

.progress-indicator {
  width: 100%;
  max-width: 400px;
  margin-top: 2rem;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, 
    var(--accent-blue) 0%, 
    #60A5FA 50%, 
    var(--accent-blue) 100%
  );
  border-radius: 3px;
  animation: progressFill 20s ease-out forwards infinite;
  box-shadow: 
    0 0 10px rgba(59, 130, 246, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes progressFill {
  0% { width: 0%; }
  33% { width: 33%; }
  66% { width: 66%; }
  100% { width: 100%; }
}

@keyframes progressRollback {
  0% { width: 100%; }
  50% { width: 10%; }
  100% { width: 100%; }
}

.progress-text {
  color: var(--text-white);
  font-family: 'Inter', sans-serif, Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  opacity: 0.9;
  min-height: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease-in-out;
}

.progress-text.fade-out {
  opacity: 0;
}

.progress-text.fade-in {
  opacity: 0.9;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */

@media (max-width: 768px) {
  .preloader-content {
    gap: 2.5rem;
    padding: 1rem;
  }
  
  .dots-container {
    gap: 10px;
    margin-bottom: 1.5rem;
  }
  
  .dot {
    width: 16px;
    height: 16px;
  }
  
  .progress-text {
    font-size: 1rem;
  }
  
  .progress-indicator {
    max-width: 320px;
  }
}

/* ========================================
   СКРЫТИЕ ПРЕЛОАДЕРА
   ======================================== */

.preloader-container.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-out;
}

.preloader-container.hidden .preloader-content {
  transform: translateY(-20px);
  transition: transform 0.5s ease-out;
}
