/**
 * Index Page Styles
 *
 * Critical styles for loading and error states before React app mounts.
 * These styles must be loaded synchronously to prevent FOUC (Flash of Unstyled Content).
 */

/* Error Display Overlay */
#error-display {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #dc2626;
  color: white;
  padding: 20px;
  z-index: 9999;
  font-family: monospace;
  font-size: 14px;
  max-height: 400px;
  overflow: auto;
}

#error-display.show {
  display: block;
}

/* Loading State */
#loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: system-ui, -apple-system, sans-serif;
  color: #666;
  background: #fff;
}

.loading-content {
  text-align: center;
}

.loading-spinner-container {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
}

.loading-spinner-ring {
  width: 96px;
  height: 96px;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: auto;
}

.loading-text {
  font-size: 16px;
  font-weight: 500;
  color: #4b5563;
}

.loading-hint {
  font-size: 14px;
  margin-top: 8px;
  color: #6b7280;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error Stack Trace */
.error-stack {
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  margin-top: 10px;
  font-size: 12px;
}
