A first-order phase transition for pulsar surface