/* Meridian loading page: matches the in-app look (obsidian + gold). System fonts only, so nothing extra to download. */
:root {
  --obsidian: #050b14;
  --gold: #d4af37;
  --gold-mid: #e6ca65;
  --gold-light: #f3e5ab;
  --muted: #94a3b8;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--obsidian);
}

#unity-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--obsidian);
  outline: none;
}

#loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(18, 44, 66, 0.55), rgba(5, 11, 20, 0) 70%),
    linear-gradient(180deg, #071223 0%, var(--obsidian) 100%);
  transition: opacity 0.8s ease;
  z-index: 10;
}

#loader.done {
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  width: min(420px, 86vw);
  text-align: center;
  color: var(--gold-light);
}

.loader-emblem {
  width: 60px;
  height: 60px;
  margin: 0 auto 28px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-mid);
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: linear-gradient(180deg, rgba(12, 24, 44, 0.8), rgba(5, 12, 24, 0.74));
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.12);
}

.loader-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: 0.32em;
  text-indent: 0.32em; /* balance the trailing letter-spacing so the word stays centred */
  background: linear-gradient(180deg, #fff8dc, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.loader-subtitle {
  margin: 10px 0 40px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.loader-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

#loader-bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.4), var(--gold-mid));
  box-shadow: 0 0 12px rgba(230, 202, 101, 0.6);
  transition: width 0.3s ease;
}

.loader-status {
  margin: 16px 0 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

#message {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  max-width: 80vw;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--gold-light);
  background: rgba(12, 24, 44, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.35);
  z-index: 20;
}

#message.error {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.5);
}
