/* Loading state */
.loading-container {
  display: none;
}

.loading-container.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 400px;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
}

.loading-spinner::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.loading-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-top-color: var(--theme-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-github-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  color: var(--theme-green);
  animation: pulse-icon 1.5s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.7; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.loading-status {
  font-size: 0.9rem;
  color: var(--theme-green);
  animation: blink-status 1s ease-in-out infinite;
}

@keyframes blink-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading-progress {
  width: 240px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.loading-progress::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer-progress 1.5s infinite;
}

@keyframes shimmer-progress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--theme-green), var(--theme-cyan));
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--theme-green);
}

.loading-percentage {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--theme-green);
  text-shadow: 0 0 20px var(--theme-green);
}

/* Error message */
.error-message {
  display: none;
  padding: 1rem 1.5rem;
  background: rgba(255, 92, 92, 0.1);
  border: 1px solid rgba(255, 92, 92, 0.3);
  border-radius: 10px;
  color: #ff5c5c;
  margin-top: 1.5rem;
}

.error-message.active {
  display: block;
}
