/* === GLOBAL STYLES === */
body {
  margin: 0;
  background: #ffffff;
  cursor: url("images/wand.png") 16 16, auto;
  overflow: hidden; /* prevent scrollbars */
}

#thegame {
  width: 100vw;
  height: 100vh; /* full viewport height */
  background: transparent;
  position: relative; /* for children positioning */
}

#thegame canvas:hover {
  cursor: url("images/wand.png") 16 16, auto;
}
.volume-slider {
  position: absolute;
  left: 1000px; /* ← move left/right */
  bottom: 80px; /* ← move up/down */
}

/* === SHAKE ANIMATION === */
.shake {
  animation: shake 1.5s;
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5px, -2px); }
  20% { transform: translate(5px, 2px); }
  30% { transform: translate(-6px, 1px); }
  40% { transform: translate(6px, -1px); }
  50% { transform: translate(-4px, 2px); }
  60% { transform: translate(4px, -2px); }
  70% { transform: translate(-5px, 1px); }
  80% { transform: translate(5px, -1px); }
  90% { transform: translate(-3px, 0); }
}

/* === LOADING SCREEN === */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  color: #fff;
  font-family: Arial, sans-serif;
  transition: opacity 0.5s ease;

  /* === THE FIX === */
  background-image: url('../images/loading_background.png');
  background-size: contain; /* FIT code only */
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a1a1a; 
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

/* spinner loader if used */
.loader {
  width: 50px;
  height: 50px;
  border: 5px solid #fff;
  border-top: 5px solid #4e9b22;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-text {
  font-size: 18px;
  color: #fff;
  margin-top: 5px;
  text-align: center;
}