/* Critical loading screen styles - moved from index.html to prevent CSP hashing */
/* NOTE: Body background is intentionally NOT set here.
   The purple gradient lives only inside #initial-loading-screen.
   Setting it on body caused it to leak through after React mounts,
   fighting with MUI's CssBaseline / sovereign dark theme. */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}
/* Hide header until React mounts */
header.display-none {
  display: none !important;
}
#initial-loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease;
}
#initial-loading-screen .loading-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  min-width: 280px;
  animation: fadeInScale 0.4s ease-out;
}
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
#initial-loading-screen .loading-text {
  font-size: 16px;
  color: #4a5568;
  margin-top: 0;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  letter-spacing: 0.5px;
}
#initial-loading-screen .loading-brand {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  letter-spacing: 1px;
}
#initial-loading-screen .progress-circle-container {
  position: relative;
  width: 56px;
  height: 56px;
}
#initial-loading-screen .progress-circle {
  transform: rotate(-90deg);
  animation: circle-rotate 1.2s linear infinite;
}
@keyframes circle-rotate {
  from {
    transform: rotate(-90deg);
  }
  to {
    transform: rotate(270deg);
  }
}
#initial-loading-screen .progress-percent-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.625rem;
  font-weight: 600;
  color: #2196f3;
  font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
  line-height: 1;
}
#initial-loading-screen .progress-bar-container {
  width: 60px;
  height: 3px;
  background: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
#initial-loading-screen .progress-bar-fill {
  height: 100%;
  background: #2196f3;
  width: var(--progress-width, 0%);
  transition: width 0.2s ease;
  border-radius: 8px;
}
#initial-loading-screen .progress-circle-stroke {
  stroke-dashoffset: 113;
  stroke-dasharray: 151;
  animation: progress-dash 1.5s ease-in-out infinite;
}
@keyframes progress-dash {
  0% {
    stroke-dashoffset: 151;
  }
  50% {
    stroke-dashoffset: 38;
  }
  100% {
    stroke-dashoffset: 151;
  }
}
/* Use ID + class selector to ensure proper specificity override */
#initial-loading-screen.loading-screen-hidden {
  display: none !important;
}
#initial-loading-screen.loading-screen-fade-out {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#initial-loading-screen .skunk-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}
#initial-loading-screen .skunk-signature:hover {
  opacity: 0.8;
}
#initial-loading-screen .skunk-signature img {
  width: 40px;
  height: 40px;
  filter: grayscale(100%);
}
#initial-loading-screen .skunk-signature span {
  font-size: 10px;
  font-weight: 600;
  color: #4a5568;
  font-style: italic;
  letter-spacing: 0.5px;
}
/* Keep generic classes as fallback */
.loading-screen-hidden {
  display: none !important;
}
.loading-screen-fade-out {
  opacity: 0 !important;
  transition: opacity 0.5s ease;
}

