/*
  Qumi loading screen. Shared by web/index.html (flutter run) and
  web/index.prod.html (deployed); markup and behaviour live in
  qumi-loader.js.
*/

:root {
  /* Matches the app's scaffoldBackgroundColor so the hand-off to the first
     Flutter frame is seamless. */
  --qumi-loader-background: #F6F3F2;
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--qumi-loader-background);
  min-height: 100vh;
}

#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--qumi-loader-background);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  text-align: center;
  color: #374151;
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.logo-image {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.progress-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.progress-ring-circle {
  fill: none;
  stroke: rgba(156, 163, 175, 0.3);
  stroke-width: 3;
}

.progress-ring-progress {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}

.app-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  letter-spacing: 0.5px;
  color: #1f2937;
}

.progress-text {
  font-size: 1rem;
  opacity: 0.8;
  margin-top: 1rem;
  font-weight: 500;
  color: #6b7280;
}

.progress-percentage {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 0.5rem;
  font-weight: 400;
  color: #9ca3af;
}

.loading-dots {
  display: inline-block;
  margin-left: 1px;
  width: 1.5em;
  text-align: left;
  overflow: hidden;
  vertical-align: bottom;
}

.loading-dots::after {
  content: '...';
  display: inline-block;
  width: 1.5em;
  text-align: left;
  overflow: hidden;
  vertical-align: bottom;
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 100% { width: 0; }
  25% { width: 0.5em; }
  50% { width: 1em; }
  75% { width: 1.5em; }
}

.reset-button {
  margin-top: 2rem;
  padding: 12px 24px;
  background: #0175C2;
  border: 2px solid #0175C2;
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: none;
  box-shadow: 0 4px 12px rgba(1, 117, 194, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.reset-button:hover {
  background: #0155A3;
  border-color: #0155A3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(1, 117, 194, 0.4);
}

.reset-button:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .logo-image {
    width: 100px;
    height: 100px;
  }

  .progress-ring {
    width: 120px;
    height: 120px;
    top: -10px;
    left: -10px;
  }

  .app-title {
    font-size: 1.5rem;
  }
}
