/* Pure White Theme Loading Animation */
.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  z-index: 9999;
  overflow: hidden;
}

.loading-background {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(46, 125, 50, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  animation: pulse 8s ease-in-out infinite;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-5%);
}

/* Logo Animation */
.loading-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 30px;
  position: relative;
  perspective: 1000px;
}

.logo-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: float 6s ease-in-out infinite;
}

.logo-main {
  width: 100%;
  height: auto;
  opacity: 0;
  transform: scale(0.8) rotateY(30deg);
  filter: drop-shadow(0 2px 6px rgba(46, 125, 50, 0.2));
  animation: 
    logoReveal 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards,
    logoGlow 3s ease-in-out infinite 1.5s;
}

.logo-reflection {
  position: absolute;
  bottom: -10px;
  left: 10%;
  width: 80%;
  height: 8px;
  background: radial-gradient(ellipse at center, rgba(46, 125, 50, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(3px);
  opacity: 0;
  animation: fadeIn 1s ease-out forwards 1s;
}

/* Text Animation */
.loading-title {
  font-family: 'Garamond', serif;
  font-size: 2.5rem;
  font-weight: bold;
  color: #2E7D32;
  margin: 0 0 30px 0;
  display: flex;
  gap: 2px;
  perspective: 500px;
}

.loading-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) rotateX(45deg);
  transform-origin: bottom;
  animation: letterDrop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Progress Bar */
.loading-progress {
  width: 200px;
  height: 2px;
  background: rgba(46, 125, 50, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2E7D32, #4CAF50);
  animation: 
    progressLoad 2.5s ease-in-out infinite,
    progressPulse 1.5s ease-in-out infinite;
}

/* Keyframes */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.02); opacity: 0.8; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotateX(0) rotateY(0); }
  50% { transform: translateY(-10px) rotateX(5deg) rotateY(5deg); }
}

@keyframes logoReveal {
  0% { opacity: 0; transform: scale(0.8) rotateY(30deg); }
  70% { opacity: 1; transform: scale(1.05) rotateY(-5deg); }
  100% { opacity: 1; transform: scale(1) rotateY(0); }
}

@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 2px 6px rgba(46, 125, 50, 0.2)); }
  50% { filter: drop-shadow(0 2px 10px rgba(46, 125, 50, 0.3)); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 0.8; }
}

@keyframes letterDrop {
  0% { opacity: 0; transform: translateY(20px) rotateX(45deg); }
  100% { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes progressLoad {
  0% { width: 0; left: 0; }
  50% { width: 100%; left: 0; }
  100% { width: 0; left: 100%; }
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Letter Delays */
.loading-title span:nth-child(1) { animation-delay: 0.1s; }
.loading-title span:nth-child(2) { animation-delay: 0.2s; }
.loading-title span:nth-child(3) { animation-delay: 0.3s; }
.loading-title span:nth-child(4) { animation-delay: 0.4s; }
.loading-title span:nth-child(5) { animation-delay: 0.5s; }
.loading-title span:nth-child(6) { animation-delay: 0.6s; }
.loading-title span:nth-child(7) { animation-delay: 0.7s; }
.loading-title span:nth-child(8) { animation-delay: 0.8s; }
.loading-title span:nth-child(9) { animation-delay: 0.9s; }

/* Responsive Design */
@media (min-width: 768px) {
  .loading-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 40px;
  }
  
  .loading-title {
    font-size: 3.5rem;
    gap: 5px;
  }
  
  .loading-progress {
    width: 300px;
    height: 3px;
  }
}

@media (min-width: 1200px) {
  .loading-logo {
    width: 180px;
    height: 180px;
  }
  
  .loading-title {
    font-size: 4rem;
    gap: 8px;
  }
}