html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  font-family: system-ui, -apple-system, sans-serif;
}
#game {
  position: relative;
  width: 100%;
  height: 100%;
  background: url('../assets/background.png') repeat;
  background-size: contain;
}
.fairy {
  position: absolute;
  width: 96px;
  height: 96px;
  background: url('../assets/sprite.png') center/contain no-repeat;
  pointer-events: auto;
  touch-action: none;
}
.gem {
  position: absolute;
  width: 64px;
  height: 64px;
  background: url('../assets/gemstone.png') center/contain no-repeat;
  pointer-events: none;
}

/* UI widgets */
#scoreBox {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  background: rgba(255, 255, 255, 0.75);
  padding: 4px 12px;
  border-radius: 12px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
}
#resetBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 16px;
  background: #d9534f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
}
#lifeCtrl {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.75);
  padding: 4px 8px;
  border-radius: 8px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  user-select: none;
}
#lifeSlider {
  width: 110px;
}

/* halfway warning (orange tint) */
.fairy.warning {
  filter: sepia(1) hue-rotate(30deg) saturate(3) brightness(1);
}

/* low-life danger (red tint) */
.fairy.danger {
  filter: sepia(1) hue-rotate(-15deg) saturate(8) brightness(1.2);
}
