body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #f1f5f9;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Magic Reveal */
@keyframes magicReveal {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
.magic {
  animation: magicReveal 0.8s ease forwards;
}

/* Spinner Base */
.spinner {
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite, glow 2s ease-in-out infinite;
}

/* Dynamic Spinner Colors */
.spinner.cyan {
  border-top: 5px solid #22d3ee;
}
.spinner.purple {
  border-top: 5px solid #a855f7;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
  }
  50% {
    box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
  }
}

/* Glow Pulse for Decrypt */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6),
                0 0 40px rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.8),
                0 0 60px rgba(99, 102, 241, 0.6);
  }
}
.glow-animate {
  animation: glowPulse 2s infinite ease-in-out;
}

/* Progress Bar */
.progress-bar {
  transition: width 0.5s ease-in-out;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.5rem;
}

/* New Decrypt Progress Bar */
#decryptProgressContainer {
  background-color: #374151; /* Tailwind slate-700 */
  border-radius: 9999px;
  overflow: hidden;
  height: 0.75rem;
  margin-top: 0.5rem;
}
#decryptProgressBar {
  background-color: #22c55e; /* Tailwind green-500 */
  width: 0%;
  height: 100%;
  transition: width 0.5s ease-in-out;
}

/* Hide Leaflet attribution bar */
.leaflet-bottom.leaflet-right {
    display: none !important;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

#decryptionProgress .animate-spin {
  width: 64px;
  height: 64px;
  border-width: 6px;
  border-top-color: #22d3ee; /* cyan */
  border-right-color: transparent;
  border-bottom-color: #22d3ee;
  border-left-color: transparent;
}

/* ========================== */
/* Circular Progress Bar */
/* ========================== */
.circular-progress-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 1rem auto;
}

.circular-progress-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.circular-progress-bg,
.circular-progress-bar {
  fill: none;
  stroke-width: 10;
  r: 50;
  cx: 60;
  cy: 60;
}

.circular-progress-bg {
  stroke: #1e293b; /* dark slate background */
}

.circular-progress-bar {
  stroke: #8b5cf6; /* Indigo/Purple gradient */
  stroke-linecap: round;
  stroke-dasharray: 314; /* 2 * PI * r (approx) */
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 0.5s ease, stroke 0.5s ease;
  filter: drop-shadow(0 0 10px #8b5cf6)
          drop-shadow(0 0 20px #6366f1);
}

/* Percentage Text in Center */
.circular-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  font-weight: 600;
  color: #8b5cf6;
  text-shadow: 0 0 6px #8b5cf6, 0 0 12px #6366f1;
}
