@font-face {
  font-family: 'Tw Cen MT';
  src: url('TwCenMT.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0f;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loading-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 40%, #141428 0%, #0a0a14 50%, #050508 100%);
  z-index: 15;
  transition: opacity 0.5s ease-out;
}

#loading-background.hidden {
  opacity: 0;
  pointer-events: none;
}

#unity-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

#unity-canvas {
  background: #0a0a0f;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

#unity-canvas.game-ready {
  opacity: 1;
}

#unity-loading-screen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50%;
  max-width: 500px;
  min-width: 260px;
  z-index: 100;
  pointer-events: none;
}

#loading-mascot {
  width: 240px;
  height: auto;
  margin-bottom: 36px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 40px rgba(62, 207, 142, 0.5))
         drop-shadow(0 0 80px rgba(62, 207, 142, 0.25));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

#loading-text {
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Tw Cen MT', Arial, sans-serif;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 28px;
  opacity: 1;
  transition: opacity 0.6s ease;
  text-align: center;
  white-space: nowrap;
}

#loading-text.fade {
  opacity: 0;
}

#unity-progress-bar-empty {
  width: 100%;
  height: 14px;
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2ebd7f 0%, #3ecf8e 50%, #5eeaa0 100%);
  border-radius: 7px;
  transition: width 0.3s ease;
  box-shadow: 0 0 20px rgba(62, 207, 142, 0.7), 0 0 6px rgba(62, 207, 142, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#loading-percent {
  color: rgba(255, 255, 255, 0.35);
  font-family: 'Tw Cen MT', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  margin-top: 14px;
}
