@font-face {
  font-family: "Lilita";
  src: url("LilitaOne-Regular.ttf") format("truetype");
  font-display: swap;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b1220;
}

#unity-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #0b1220;
  outline: none;
  touch-action: none;
}

/* Loading screen */
#loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1220;
  transition: opacity 0.5s ease;
  z-index: 10;
}
#loading.done { opacity: 0; pointer-events: none; }

#loading-bg {
  position: absolute;
  inset: -20px;
  background: url("loading-bg.jpg") center / cover no-repeat;
  filter: blur(6px) brightness(0.45);
}

#loading-box {
  position: relative;
  text-align: center;
  font-family: "Lilita", "Arial Black", sans-serif;
  padding: 0 16px;
}

.logo-top, .logo-bottom {
  line-height: 1;
  letter-spacing: 1px;
  text-shadow:
    0 0 0 #121628,
    3px 3px 0 #121628, -3px 3px 0 #121628, 3px -3px 0 #121628, -3px -3px 0 #121628,
    0 6px 14px rgba(0, 0, 0, 0.55);
}
.logo-top { color: #ffd21a; font-size: clamp(40px, 9vw, 96px); }
.logo-bottom { color: #ff801e; font-size: clamp(32px, 7vw, 76px); margin-top: 4px; }

#bar {
  width: min(420px, 78vw);
  height: 18px;
  margin: 28px auto 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
}
#bar-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff801e, #ffd21a);
  transition: width 0.2s ease;
}
#bar-text {
  color: #ffffff;
  font-size: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* Warnings and errors */
#message {
  display: none;
  position: fixed;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 10px 16px;
  border-radius: 8px;
  font: 15px/1.4 Arial, sans-serif;
  z-index: 20;
}
#message.warning { background: #ffd21a; color: #121628; }
#message.error { background: #d93025; color: #ffffff; }
