.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-background);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--color-muted);
  border-top: 4px solid var(--color-secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
}

.loading-subtext {
  font-size: 14px;
  opacity: 0.8;
  animation: pulse 2s ease-in-out infinite;
}

button.loading {
  pointer-events: none;
  background-color: inherit !important;
  border: 3px solid var(--color-secondary) !important;
  border-left-color: #fff !important;
  border-radius: 50% !important;
  font-size: 0!important;
  width: 45px;
  height: 45px;
  padding: 0 !important;
  animation: spin 1s ease infinite;
}

button.success {
  background-color: #4caf50;
  pointer-events: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}
