/* ── Loading screen ── */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: radial-gradient(ellipse at center, #4a1510 0%, #2b0a08 55%, #1a0605 100%);
  display: none;
  flex-direction: column;
}

.loading-screen.is-active {
  display: flex;
  animation: loadingFadeIn 300ms ease;
}

@keyframes loadingFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading-screen__topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.loading-screen__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-screen__logo-img {
  display: block;
  width: 36px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.loading-screen__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

/* Spinner + crown */
.loading-spinner {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 2rem;
}

.loading-spinner__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 181, 0, 0.15);
}

.loading-spinner__arc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--bk-yellow);
  border-right-color: rgba(255, 181, 0, 0.4);
  animation: spin 1.1s linear infinite;
}

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

.loading-spinner__crown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bk-yellow);
}

.loading-spinner__crown svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.loading-screen__title {
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  font-weight: 700;
  color: var(--bk-white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.loading-screen__subtitle {
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  max-width: 340px;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.loading-screen__status {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 181, 0, 0.85);
  letter-spacing: 0.03em;
  min-height: 1.2em;
  margin-bottom: 1.5rem;
  transition: opacity 200ms ease;
}

.loading-screen__status.is-fading {
  opacity: 0;
}

/* Animated dots */
.loading-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 2.5rem;
}

.loading-dots__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bk-yellow);
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots__dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dots__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* Progress bar */
.loading-progress {
  width: min(320px, 80vw);
}

.loading-progress__track {
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.loading-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--bk-yellow), #ff8c00);
  border-radius: var(--radius-pill);
  transition: width 120ms linear;
  box-shadow: 0 0 8px rgba(255, 181, 0, 0.5);
}

.loading-progress__label {
  margin-top: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner__arc {
    animation: none;
    border-top-color: var(--bk-yellow);
    border-right-color: var(--bk-yellow);
  }

  .loading-dots__dot {
    animation: none;
    opacity: 0.7;
  }
}
