/* Loading screen styles - loaded via link tag with CSP nonce support */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #app {
  width: 100%;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  min-height: 100vh;
  min-height: 100dvh;
}

#app {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-fallback {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.loading-fallback.fade-out {
  opacity: 0;
  transform: scale(0.98);
}

.loading-logo {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  padding: 20px;
  animation: logo-entrance 0.6s ease-out;
}

.loading-logo svg {
  width: 48px;
  height: 48px;
}

.loading-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: title-entrance 0.6s ease-out 0.1s both;
}

.loading-subtitle {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  animation: subtitle-entrance 0.6s ease-out 0.2s both;
}

.loading-bar-container {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  animation: bar-entrance 0.6s ease-out 0.3s both;
}

.loading-bar {
  height: 100%;
  width: 30%;
  background: white;
  border-radius: 4px;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(200%); }
  100% { transform: translateX(400%); }
}

@keyframes logo-entrance {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes title-entrance {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes subtitle-entrance {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bar-entrance {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (max-width: 480px) {
  .loading-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    padding: 14px;
  }

  .loading-logo svg {
    width: 36px;
    height: 36px;
  }

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

  .loading-subtitle {
    font-size: 0.875rem;
  }

  .loading-bar-container {
    width: 160px;
  }
}