.solar-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.solar-loading-overlay.hidden {
  animation: fadeOut 0.25s ease-out forwards;
}

.solar-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* Sol */
.sun {
  position: relative;
  width: 120px;
  height: 120px;
  animation: sun-rotate 3s linear infinite;
}

.sun-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #f5a623 0%, rgba(251, 192, 45, 0.75) 55%, rgba(251, 192, 45, 0.45) 100%);
  box-shadow: 0 0 40px rgba(251, 192, 45, 0.55),
              0 0 80px rgba(251, 192, 45, 0.40),
              0 0 120px rgba(251, 192, 45, 0.25);
  animation: pulse 2s ease-in-out infinite;
}

.sun-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
}

.ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 30px;
  background: linear-gradient(to bottom, rgba(251, 192, 45, 0.8), transparent);
  transform-origin: 0 0;
  border-radius: 2px;
}

.ray-1 { transform: translate(-50%, -50%) rotate(0deg) translateY(-70px); }
.ray-2 { transform: translate(-50%, -50%) rotate(45deg) translateY(-70px); }
.ray-3 { transform: translate(-50%, -50%) rotate(90deg) translateY(-70px); }
.ray-4 { transform: translate(-50%, -50%) rotate(135deg) translateY(-70px); }
.ray-5 { transform: translate(-50%, -50%) rotate(180deg) translateY(-70px); }
.ray-6 { transform: translate(-50%, -50%) rotate(225deg) translateY(-70px); }
.ray-7 { transform: translate(-50%, -50%) rotate(270deg) translateY(-70px); }
.ray-8 { transform: translate(-50%, -50%) rotate(315deg) translateY(-70px); }

/* Feixe de energia */
.energy-beam {
  width: 8px;
  height: 150px;
  background: linear-gradient(
    to bottom,
    rgba(251, 192, 45, 0.8) 0%,
    rgba(30, 136, 229, 0.65) 50%,
    rgba(251, 192, 45, 0.45) 100%
  );
  box-shadow: 
    0 0 20px rgba(251, 192, 45, 0.45),
    0 0 40px rgba(30, 136, 229, 0.28);
  animation: pulse 1.5s ease-in-out infinite;
  position: relative;
}

.energy-beam::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(251, 192, 45, 0.9);
  box-shadow: 0 0 10px rgba(251, 192, 45, 0.8);
  animation: particle-fall 1s linear infinite;
}

/* Painel solar */
.solar-panel {
  width: 300px !important;
  height: 300px !important;
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.9) 0%, rgba(30, 30, 50, 0.9) 100%);
  border: 2px solid rgba(251, 192, 45, 0.30);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 
    inset 0 0 30px rgba(251, 192, 45, 0.16),
    0 0 40px rgba(30, 136, 229, 0.12);
  position: relative;
  overflow: hidden;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  height: 100%;
}

.panel-cell {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(251, 192, 45, 0.22);
  border-radius: 4px;
  animation: cell-charge 2s ease-in-out infinite;
}

@keyframes cell-charge {
  0%, 100% {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(251, 192, 45, 0.15);
    box-shadow: none;
  }
  40%, 60% {
    background: rgba(251, 192, 45, 0.35);
    border-color: rgba(251, 192, 45, 0.8);
    box-shadow: 
      inset 0 0 12px rgba(251, 192, 45, 0.6),
      0 0 8px rgba(251, 192, 45, 0.4);
  }
}



@keyframes particle-fall {
  from { top: -10px; opacity: 1; }
  to   { top: 100%;  opacity: 0; }
}

.charge-indicator {
  position: absolute;
  bottom: 10px;
  left: 15px;
  right: 15px;
  height: 6px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  overflow: hidden;
}

.charge-bar {
  height: 100%;
  background: linear-gradient(90deg, #f5a623 0%, #156fc2 100%);
  border-radius: 3px;
  animation: charge-progress 2.5s ease-out forwards;
  box-shadow: 0 0 10px rgba(30, 136, 229, 0.35);
}

@keyframes charge-progress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

@keyframes sun-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.charge-bar {
  animation: charge-progress 3s ease-out forwards;
}

.charge-bar.complete {
  width: 100% !important;
  background: linear-gradient(90deg, #00ff00 0%, #00bfff 100%);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

/* Success Animation */
.success-animation .sun {
  animation: sun-success-pulse 0.6s ease-out;
}

.success-animation .sun-core {
  box-shadow: 
    0 0 60px rgba(251, 192, 45, 0.75),
    0 0 100px rgba(251, 192, 45, 0.55),
    0 0 150px rgba(251, 192, 45, 0.40);
}

.success-animation .energy-beam {
  animation: energy-success-flow 1s ease-in-out infinite;
  box-shadow: 
    0 0 30px rgba(0, 255, 0, 0.8),
    0 0 60px rgba(30, 136, 229, 0.35);
}

.success-animation .solar-panel {
  border-color: rgba(0, 255, 0, 0.6);
  box-shadow: 
    inset 0 0 40px rgba(0, 255, 0, 0.4),
    0 0 60px rgba(0, 255, 0, 0.3);
}

.panel-cell.fully-charged {
  background: rgba(0, 255, 0, 0.3) !important;
  box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.6) !important;
  animation: cell-success-pulse 1s ease-in-out infinite;
}

@keyframes sun-success-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes energy-success-flow {
  0%, 100% {
    opacity: 1;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.8;
    transform: scaleY(1.1);
  }
}

@keyframes cell-success-pulse {
  0%, 100% {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.6);
  }
  50% {
    background: rgba(0, 255, 0, 0.5);
    box-shadow: inset 0 0 30px rgba(0, 255, 0, 0.8);
  }
}

.success-message {
  margin-top: 40px;
  text-align: center;
  animation: fadeInUp 0.5s ease-out;
}

.success-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #00ff00;
  text-transform: uppercase;
  letter-spacing: 4px;
  text-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
  margin-bottom: 15px;
  margin-top: 15px;

  animation: success-text-glow 1.5s ease-in-out infinite;

}

.success-subtext {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #00bfff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

@keyframes success-text-glow {
  0%, 100% {
    text-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
  }
  50% {
    text-shadow: 
      0 0 40px rgba(0, 255, 0, 1),
      0 0 60px rgba(0, 255, 0, 0.8),
      0 0 80px rgba(0, 255, 0, 0.6);
  }
}

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

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.loading-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffa500;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(255, 165, 0, 0.6);
  animation: pulse 1.5s ease-in-out infinite;
  margin: 0;
  text-align: center;
}

@media (max-width: 768px) {
  .solar-loading-container {
    transform: scale(0.85);
    gap: 28px;
  }

  .solar-panel {
    width: min(300px, 92vw);
    height: 180px;
  }

  .success-text {
    font-size: 26px;
  }

  .success-subtext {
    font-size: 16px;
  }
}

