*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

#portal {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #f8f9fa;
  color: #333;
  font-family: system-ui, -apple-system, sans-serif;
  z-index: 1;
}

.loading[hidden],
.error[hidden] {
  display: none;
}

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid #e0e0e0;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #f8f9fa;
  color: #333;
  font-family: system-ui, -apple-system, sans-serif;
  text-align: center;
  z-index: 2;
}
