:root {
  --initial-loader-bg: #0D1421;
  --initial-loader-color: #4FC3F7;
}

body {
  margin: 0;
}

html {
  overflow-x: hidden;
  overflow-y: scroll;
}

#loading-bg {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--initial-loader-bg, #0D1421);
  z-index: 9999;
}

.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

/* Spinner — concentric rings sharing the theme accent, with a soft glow */
.loading {
  position: relative;
  box-sizing: border-box;
  block-size: 64px;
  inline-size: 64px;
  border-radius: 50%;
  filter: drop-shadow(0 0 10px rgba(79, 195, 247, 0.45));
}

.loading .effect-1,
.loading .effect-2,
.loading .effect-3 {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: 3px solid transparent;
  border-inline-start: 3px solid var(--initial-loader-color, #4FC3F7);
  border-radius: 50%;
}

.loading .effect-1 {
  animation: rotate 1s ease infinite;
}

.loading .effect-2 {
  animation: rotate-opacity 1s ease infinite 0.1s;
}

.loading .effect-3 {
  animation: rotate-opacity 1s ease infinite 0.2s;
}

.loading .effects {
  transition: all 0.3s ease;
}

/* Pulsing core dot at the centre of the spinner */
.loading-core {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 8px;
  block-size: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--initial-loader-color, #4FC3F7);
  animation: core-pulse 1.4s ease-in-out infinite;
}

/* ROMAS wordmark */
.loading-brand {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--initial-loader-color, #4FC3F7);
  animation: brand-fade 1.6s ease-in-out infinite;
}

.loading-caption {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  color: #78909C;
  opacity: 0.8;
}

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

  100% {
    transform: rotate(1turn);
  }
}

@keyframes rotate-opacity {
  0% {
    opacity: 0.1;
    transform: rotate(0deg);
  }

  100% {
    opacity: 1;
    transform: rotate(1turn);
  }
}

@keyframes core-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.9);
    opacity: 0.35;
  }
}

@keyframes brand-fade {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.55;
  }
}
