/* Pulse WebGL loader. Mirrors Boot.uss so the loader and the in-engine boot
   screen share the same shape grammar, palette, and rough layout. The loader
   fades out while the engine spins up; the canvas underneath is already black
   (background-color: #231F20), so the fade reveals straight
   into the boot screen with no visible cut. */

@import url('https://fonts.googleapis.com/css2?family=Bagel+Fat+One&display=swap');

:root {
  --bg:        #000000;
  --bone:      #f6f6fa;
  --bone-dim:  #b4b4c4;
  --slab:      #14141c;
  --pink:      #ff2d75;
  --yellow:    #ffe94d;
  --cyan:      #26e0ff;
  --display:   'Bagel Fat One', system-ui, sans-serif;
}

html, body { height: 100%; }
body {
  padding: 0;
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#unity-container { position: fixed; inset: 0; }
#unity-canvas { width: 100%; height: 100%; background: #231F20; display: block; }

#unity-loading-bar {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  pointer-events: none;
  opacity: 1;
  transition: opacity 480ms cubic-bezier(0.65, 0, 0.35, 1);
  will-change: opacity;
}
#unity-loading-bar.is-visible { display: flex; }
#unity-loading-bar.is-hidden { opacity: 0; }

#unity-loading-shapes {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 360px;
  height: 180px;
  margin-bottom: 32px;
}

.pulse-shape {
  flex-shrink: 0;
  margin: 0 10px;
  animation: pulse-bob 1.6s ease-in-out infinite;
  transform-origin: center;
}
.pulse-shape.circle {
  width: 100px; height: 100px;
  background: var(--pink);
  border-radius: 50%;
  animation-delay: 0s;
}
.pulse-shape.diamond {
  width: 90px; height: 90px;
  background: var(--yellow);
  border-radius: 12px;
  animation-name: pulse-bob-diamond;
  animation-delay: 0.16s;
}
.pulse-shape.square {
  width: 100px; height: 100px;
  background: var(--cyan);
  border-radius: 16px;
  animation-delay: 0.32s;
}

@keyframes pulse-bob {
  0%, 100% { transform: translateY(0)    scale(1);    }
  50%      { transform: translateY(-10px) scale(1.04); }
}
/* Diamond keeps its 45deg rotation while bobbing. */
@keyframes pulse-bob-diamond {
  0%, 100% { transform: rotate(45deg) translateY(0)    scale(1);    }
  50%      { transform: rotate(45deg) translateY(-10px) scale(1.04); }
}

#unity-logo {
  font-family: var(--display);
  font-size: 96px;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--bone);
  margin-bottom: 32px;
  -webkit-text-stroke: 0;
}
#unity-logo::before { content: 'PULSE'; }

#unity-progress-bar-empty {
  width: 360px;
  height: 6px;
  background: var(--slab);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 32px;
}
#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: var(--yellow);
  border-radius: 3px;
  transition: width 220ms ease-out;
}

#unity-loading-status {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--bone-dim);
  text-transform: uppercase;
  animation: pulse-fade 1.4s ease-in-out infinite;
}
@keyframes pulse-fade {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1;    }
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: var(--bone);
  color: #000;
  padding: 10px;
  display: none;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  border-radius: 4px;
}
