/* Preloader Styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6C6F67 0%, #4a5a45 50%, #A8BBA3 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  animation: fadeInUp 0.8s ease;
}

.preloader-logo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(237, 230, 217, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
  overflow: hidden;
}

.preloader-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.preloader-text {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 72px;
  font-weight: 700;
  color: #EDE6D9;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  letter-spacing: 8px;
  animation: glow 2s ease-in-out infinite alternate;
}

.preloader-subtitle {
  font-family: 'Vazirmatn', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #E6D8C3;
  margin-top: -15px;
  letter-spacing: 2px;
  opacity: 0.9;
}

/* Loading Bar */
.loading-bar-container {
  width: 250px;
  height: 6px;
  background: rgba(237, 230, 217, 0.2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.loading-bar {
  height: 100%;
  background: linear-gradient(90deg, #A8BBA3 0%, #EDE6D9 50%, #A8BBA3 100%);
  background-size: 200% 100%;
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
  animation: shimmer 1.5s ease-in-out infinite;
}

.loading-percentage {
  font-family: 'Georgia', serif;
  font-size: 16px;
  color: #EDE6D9;
  margin-top: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(168, 187, 163, 0.4);
  }
}

@keyframes glow {
  from {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  to {
    text-shadow: 0 4px 20px rgba(237, 230, 217, 0.6),
                 0 0 30px rgba(168, 187, 163, 0.4);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .preloader-logo {
    width: 120px;
    height: 120px;
  }
  
  .preloader-text {
    font-size: 56px;
    letter-spacing: 6px;
  }
  
  .preloader-subtitle {
    font-size: 16px;
  }
  
  .loading-bar-container {
    width: 200px;
  }
}

@media (max-width: 480px) {
  .preloader-logo {
    width: 100px;
    height: 100px;
  }
  
  .preloader-text {
    font-size: 48px;
    letter-spacing: 4px;
  }
  
  .preloader-subtitle {
    font-size: 14px;
  }
}
