html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background-color: #f8fafc;
  color: #1f2937;
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  width: 100%;
  min-height: 100vh;
  background: none;
}

.font-display {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-display: swap;
}

.app-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #3b82f6;
  font-size: 1.2rem;
  z-index: 9999;
}

.app-loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #3b82f6;
  border-top: 2px solid transparent;
  border-radius: 50%;
  display: inline-block;
  margin-left: 10px;
  animation: spin 1s linear infinite;
}

.offline-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 24px;
}

.offline-heading {
  color: #1d4ed8;
  font-size: 1.25rem;
  font-weight: 600;
}

.offline-note {
  font-size: 0.875rem;
  color: rgba(30, 41, 59, 0.72);
  max-width: 320px;
}

.offline-retry-button {
  margin-top: 12px;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.offline-retry-button:hover {
  background: #1e40af;
}

@media (prefers-color-scheme: dark) {
  html,
  body {
    background-color: #0f172a;
    color: rgba(255, 255, 255, 0.87);
  }

  #app {
    background: none;
  }

  .offline-heading {
    color: #60a5fa;
  }

  .offline-note {
    color: rgba(226, 232, 240, 0.75);
  }

  .offline-retry-button {
    background: #3b82f6;
  }

  .offline-retry-button:hover {
    background: #2563eb;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
