* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #05061a;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  font-family: 'Poppins', sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

#app-frame {
  position: fixed;
  inset: 0;
  height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05061a;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow: hidden;
}

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

#pixi-holder canvas {
  display: block;
  touch-action: none;
  border-radius: 0;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

/* ---------------- loading screen ---------------- */
#loading-screen {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(circle at 50% 30%, #1c0b3a 0%, #05061a 75%);
  transition: opacity 0.4s ease;
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }

.loading-logo {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 34px;
  color: #ffffff;
  letter-spacing: 1px;
  text-align: center;
}
.loading-logo span {
  display: block;
  font-size: 15px;
  color: #22e5ff;
  letter-spacing: 3px;
  font-weight: 700;
  margin-top: 4px;
}
.loading-bar {
  width: 180px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}
.loading-bar-fill {
  width: 40%;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #ff3d9a, #22e5ff);
  animation: loadSlide 1.1s ease-in-out infinite;
}
@keyframes loadSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
.loading-hint {
  font-size: 12px;
  color: #b9b6e8;
  letter-spacing: 0.5px;
}

/* ---------------- rotate overlay ---------------- */
#rotate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #05061a;
  text-align: center;
  padding: 24px;
}
#rotate-overlay.visible { display: flex; }
.rotate-icon {
  font-size: 54px;
  animation: rotateHint 1.6s ease-in-out infinite;
}
@keyframes rotateHint {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-90deg); }
}
.rotate-text {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  color: #e8e6ff;
  line-height: 1.5;
}
