.loading-overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
  opacity: 0;
  animation: fadeIn 0.3s ease-in-out forwards;
}

.loading-overlay {
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  animation: fadeIn 0.3s ease-in-out forwards;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeIn 0.3s ease-in-out 0.1s forwards;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

/* Dark mode support */
.dark .loading-overlay {
  // background-color: rgba(0, 0, 0, 0.8);
}

.dark .loading-spinner {
  border: 4px solid var(--shade-700);
  border-top: 4px solid var(--primary-400);
}


/* Crypto animation variant */
.crypto-loader {
  position: relative;
  width: 60px;
  height: 60px;
}

.crypto-loader::before {
  content: '🔒';
  position: absolute;
  font-size: 24px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 2s infinite;
}

.crypto-loader::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid var(--primary-400);
  border-radius: 50%;
  animation: cryptoSpin 3s linear infinite;
}

.crypto-loader .blockchain {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px dashed var(--primary-600);
  border-radius: 12px;
  animation: blockchainRotate 4s linear infinite;
}

.crypto-loader .privacy {
  position: absolute;
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  border: 2px solid var(--primary-300);
  border-radius: 30%;
  animation: privacyPulse 2s ease-in-out infinite;
}

@keyframes cryptoSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes blockchainRotate {
  0% {
    transform: rotate(0deg) scale(0.8);
  }
  50% {
    transform: rotate(180deg) scale(1);
  }
  100% {
    transform: rotate(360deg) scale(0.8);
  }
}

@keyframes privacyPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

@keyframes pulse {
  0% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

/* Dark mode support */
.dark .crypto-loader::after {
  border-color: var(--primary-600);
}

.dark .crypto-loader .blockchain {
  border-color: var(--primary-400);
}

.dark .crypto-loader .privacy {
  border-color: var(--primary-500);
}

.page-loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--afk-bg-dark);
  z-index: 9999;
}
