*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}

body {
  /* background-image: url(../img/bg.png); */
  background: #033205;
  -webkit-user-select: none;
  overflow: hidden;
}

#background {
  width: 100%;
  height: 100%;
  position:absolute;
  left: 0;
  top: 0;
}


#progress::before {
  content: "LOADING";
  position: absolute;
  text-align: left;
  top: -20px;
  font-size: 20px;
  font-family: 'Impact';
  color: #215e31;
  width: 200px;
  height: 50px;
}
#progress {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  margin-left: -30px;
  margin-top: -130px;
  z-index: 5000;
  font-size: 50px;
  text-align: left;
  color: #215e31;
  font-family: 'Impact';
}

button {
  position: relative;
  width: 200px;
  border-left: 4px solid #f5e7d7;
  border-top: 4px solid #f5e7d7;
  border-right: 4px solid #a1886c;
  border-bottom: 4px solid #a1886c;
  padding: 12px 0 0 0;
  background-position: center center;
  background-image: url(../img/popup-panel.gif);
}

button:hover {
  top: -2px;
  cursor: url(../img/cursor-touch.png) 50 50, default;
}
button:active {
  top: 0;
  cursor: url(../img/cursor-touch.png) 50 50, default;
}

.voxel-canvas {
  border: 1px solid pink;
  z-index: 500;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 256px;
  height: 256px;
}

.filter-output-canvas {
  z-index: 500;
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  /* width: 256px; */
  
  image-rendering: auto;
  image-rendering: -moz-auto;
  image-rendering: -webkit-auto;
  -ms-interpolation-mode: auto;
}

.filter-input-canvas {
  border: 1px solid blue;
  z-index: 500;
  display: none;
  position: absolute;
  top: 0;
  left: 300px;
  width: 256px;
}

#canvas-panel {
  border: none;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  background: #033205;
   transition: opacity .8s;
  -moz-transition: opacity .8s; /* Firefox 4 */
  -webkit-transition: opacity .8s; /* Safari and Chrome */
  -o-transition: opacity .8s; /* Opera */
}

#scratch-canvas {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  border: 3px solid pink;
  z-index: 99999;
  background: white;
}

.canvas-panel-faded-in {
  opacity: 1;
}

.canvas-panel-faded-out {
  opacity: 0;
}




#settings-panel {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1001;
  text-align: center;
  zoom: 1;
  display: none;
}
.settings-bottom #settings-panel {
  width: 256px;
  height: 25px;
  margin-top: 90px;
  margin-left: -128px;
  letter-spacing: 10px;
}
.settings-right #settings-panel {
  width: 30px;
  height: auto;
  margin-top: -89px;
  margin-left: 120px;
}
.settings-button {
  width: 27px;
  height: 27px;
  display: inline-block;
  background-image: url(../img/icons.png);
  border: 1px solid black;
  background-color: black;
}
.settings-button:hover {
  background-color: #2c7675;
  border-left: 1px solid #4bbbba;
  border-top: 1px solid #4bbbba;
  border-bottom: 1px solid #1e5453;
  border-right: 1px solid #1e5453;
}
.settings-button:active {
  margin: 1px 0 -1px 0;
  background-color: #2c7675;
  border-left: 1px solid #4bbbba;
  border-top: 1px solid #4bbbba;
  border-bottom: 1px solid #1e5453;
  border-right: 1px solid #1e5453;
}
.settings-button#equipment {
  background-position: 0px 0px;
}
.settings-button#save {
  background-position: -25px 0px;
}
.settings-button#volume-off {
  background-position: -50px 0px;
}
.settings-button#volume-on {
  background-position: -75px 0px;
}
.settings-button#about {
  background-position: -100px 0px;
}
.settings-button#fullscreen-on {
  background-position: -125px 0px;
}
.settings-button#fullscreen-off {
  background-position: -150px 0px;
}
.settings-button#facebook {
  background-position: -175px 0px;
}
.settings-button#fps-mode {
  background-position: -200px 0px;
}


#welcome-panel {
  position: absolute;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  text-align: center;
  padding: 40px 20px;
}

#welcome-text {
  font-size: 16px;
  font-family: 'Minecraftia';
  color: white;
  display: inline-block;
  max-width: 640px;
  width: 100%;
  margin: auto;
  text-align: left;
  line-height: 30px;
  letter-spacing: 1px;
}

#welcome-text b {
  font-weight: normal;
  text-transform: uppercase;
}

#welcome-text p {
  margin-top: 27px;
}

#welcome-text a {
  text-decoration: none;
  color: yellow;
}

#welcome-text a:hover {
  color: orange;
}

canvas, img, div {
  image-rendering: optimizeSpeed;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: optimize-contrast;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
}

.pixelated {
  image-rendering: optimizeSpeed;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: optimize-contrast;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
}

.canvas-faded-in {
  opacity: 1;
}

.canvas-faded-out {
  opacity: 0;
}

#icon-sounds {
  position: absolute;
  width: 40px;
  height: 40px;
  background-image: url(../img/sound.png);
  z-index: 9000;
  opacity: .1;
  cursor: pointer;
}

#icon-sounds:hover {
  transition: opacity .5s;
  -moz-transition: opacity .5s; /* Firefox 4 */
  -webkit-transition: opacity .5s; /* Safari and Chrome */
  -o-transition: opacity .5s; /* Opera */
  opacity: .5;
}

.slide {
  color: white;
  position: absolute;

  margin-top: 200px;
  margin-left: 100px;
  z-index: 99;
  transition: opacity 1s;
  -moz-transition: opacity 1s; /* Firefox 4 */
  -webkit-transition: opacity 1s; /* Safari and Chrome */
  -o-transition: opacity 1s; /* Opera */
  cursor: url(../img/cursor-look.png) 50 50, default;
  display: none;
  opacity: 0;
}

.slide-faded-out {
  opacity: 0;
  display: block;
}

.slide-faded-in {
  opacity: 1;
  display: block;
}


#main-panel {
  position: absolute;
  left: 0;
  height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.envelope-panel {
  width: 100%;
  height: 100%;
  position: absolute;
  
  left: 0;
  z-index: 10000;
    transition: top 1s;
  -moz-transition: top 1s; 
  -webkit-transition: top 1s; 
  -o-transition: top 1s;
}
.envelope-panel-hidden {
  top: 100%;
}
.envelope-panel-visible {
  top: 0;
}


#envelope-front {
  width: 600px;
  height: 150px;
  position: absolute;
  top: 100%;
  margin-top: -100px;
  left: 50%;
  margin-left: -300px;
  z-index: 10010;
  background: url(../img/envelope-front.png);
  background-repeat: no-repeat;
}
#envelope-back {
  width: 600px;
  height: 150px;
  position: absolute;
  top: 100%;
  margin-top: -100px;
  left: 50%;
  margin-left: -300px;
  z-index: 10000;
  background-color: #c7a35e;
}
#envelope-flap {
  width: 600px;
  height: 114px;
  position: absolute;
  top: 100%;
  margin-top: -214px;
  left: 50%;
  margin-left: -300px;
  z-index: 10000;
  background: url(../img/envelope-flap.png);
  background-repeat: no-repeat;
}
#envelope-scroller {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10005;
  overflow: auto;
  padding-top: 10%;
}
.envelope-page {
  margin: 0 auto;
  width: 550px;
  border: 3px solid black;
  background: white;
  min-height: 600px;
  box-shadow: 6px 6px 0 rgba(0,0,0,.5);

  font-family: 'Minecraftia', serif;
  padding: 24px;
  font-size: 12px;
  line-height: 15px;
  transition: margin-top 1s;
  -moz-transition: margin-top 1s; 
  -webkit-transition: margin-top 1s; 
  -o-transition: margin-top 1s;
  margin-bottom: 100%;
}
.envelope-page-hidden {
  margin-top: 100%;
}
#envelope-loadn {
  width: 120px;
  height: 120px;
  position: absolute;
  top: 50%;
  margin-top: -60px;
  left: 50%;
  margin-left: -60px;
  z-index: 10001;
  background: url(../img/envelope-loadn.png);
  background-repeat: no-repeat;
}

#api-iframe {
  width: 100px;
  height: 100px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20000;
}

.save-restore-panel {
  display: block;
  width: 208px;
  height: 117px;
  position: fixed;
  background-image: url(../img/popup-panel.gif);
  z-index: 1010;
  top: 50%;
  left: 50%;
  margin-left: -104px;
  margin-top: -58px;
  padding: 16px 12px 14px 14px;
  font-family: 'Minecraftia', serif;
  font-size: 8px;
  line-height: 10px;
  color: #500808;
  zoom: 3;
  display: none;
}

#restore-panel-items {
  margin-top: 3px;
  display: inline-block;
  width: 120px;
  border: 1px solid #500808;
  vertical-align: top;
  float: left;
  overflow: auto;
  height: 77px;
  background: none;
  font-family: 'Minecraftia', serif;
  font-size: 8px;
  line-height: 10px;
  outline: none;
}

input[type=text], input[type=email] {
  margin-top: 3px;
  display: inline-block;
  width: 120px;
  border: 1px solid #500808;
  vertical-align: top;
  float: left;
  overflow: auto;
  height: 16px;
  background: none;
  font-family: 'Minecraftia', serif;
  font-size: 8px;
  line-height: 12px;
  outline: none;
  padding-top: 6px;
  background-color: white;
}

.restore-panel-item {
  padding-top: 4px;
  padding-left: 3px;
}
option {
  padding-top: 2px;
  padding-left: 3px;
  padding-bottom: 0;
  margin-bottom: 0px;
  height: 15px;
  overflow: hidden;
}

.restore-panel-item:hover, option:hover, option:checked {
  background: #500808;
  color: #e3c39d;
  background: linear-gradient(#500808, #500808);
  
}



/*
#inventory-view-buttons {
  position: absolute;
  position: absolute;
  top: 84px;
  left: 104px;
  width: 200px;
}
#inventory-back-button {
  width: 38px;
}
#inventory-use-button {
  width: 26px;
}
#inventory-ok-button {
  width: 20px;
}
.inventory-item {
  border: 1px solid rgba(0,0,0,0);
  margin-right: -1px;
  margin-bottom: -1px;
  outline: none;
  width: 30px;
  height: 30px;
}
.inventory-item-view {
  margin: 2px 12px 0 2px;
  border-right: 1px solid #f5e7d7;
  border-bottom: 1px solid #f5e7d7;
  border-top: 1px solid #a1886c;
  border-left; 1px solid #a1886c;
  
}
.inventory-item:hover {
  border-bottom: 1px solid #500808;
  border-right: 1px solid #500808;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
}
.inventory-item:active {
  border-bottom: 1px solid #fff;
  border-right: 1px solid #fff;
  border-top: 1px solid #500808;
  border-left: 1px solid #500808;
}
.inventory-item-view {
  float: left;
  margin-right: 6px;
  width: 90px;
  height: 90px;
}
.inventory-description {
  padding-top: 6px;
}
*/

select:not(:checked) {
  color: #500808;
}

.restore-panel-button {
  display: inline-block;
  width: 53px;
  border: 1px solid #500808;
  margin: 3px 0 1px 3px;
  text-align: center;
  vertical-align: top;
  padding-top: 5px;
  height: 16px;
  font-family: 'Minecraftia', serif;
  font-size: 8px;
  line-height: 12px;
  background: none;
  text-align: center;
}
.restore-panel-button:hover {
  border: 2px solid #500808;
  padding-top: 4px;
}

#about-panel {
  line-height: 14px;
}

#about-panel a {
  text-decoration: none;
  cursor: url(../img/cursor-talk.png) 50 50, default;
}





#tool-panel {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 56px;
  z-index: 100;
}
.main-canvas {
  position: fixed;
  top: 0;
  left: 0;
  image-rendering: optimizeSpeed;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: optimize-contrast;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
  
  
  /* cursor: url(img/dropper.png) 32 32, auto; */
}
.buffer-canvas {
  position: absolute;
  right: 10px;
  bottom: 10px;
  image-rendering: pixelated;
  box-shadow: 0px 2px 4px gray;
  border: 4px solid white;
  background: none;
  display: none;
}

.texture-canvas {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 128px;
  image-rendering: pixelated;
  box-shadow: 0px 2px 4px gray;
  border: 4px solid green;
  background: none;
  display: none;
}
.chunk-canvas {
  position: absolute;
  left: 10px;
  bottom: 10px;
  box-shadow: 0px 2px 4px gray;
  border: 4px solid red;
  background: none;
  z-index: 9000;
  xdisplay: none;
}
.debug-panel {
  z-index: 9000;
  display: none;
}
.slice-canvas {
  position: absolute;
  left: 148px;
  bottom: 10px;
  box-shadow: 0px 2px 4px gray;
  width: 128px;
  height: 128px;
  border: 4px solid red;
  background: none;
  z-index: 9000;
  xdisplay: none;
}
.world-preview-canvas {
  position: absolute;
  left: 148px;
  bottom: 148px;
  box-shadow: 0px 2px 4px gray;
  width: 128px;
  height: 128px;
  border: 4px solid purple;
  background: none;
  z-index: 9000;
  xdisplay: none;
}

.light-mask-canvas {
  position: absolute;
  left: 10px;
  top: 10px;
  image-rendering: auto;
  border: 4px solid red;
  background: none;
  display: none;
  width: 128px;
}
#crosshair-vertical {
  position: absolute;
  z-index: 1000;
  width: 34px;
  height: 4px;
  background: white;
  left: 50%;
  top: 50%;
  margin-left: -17px;
  margin-top: -2px;
  /* box-shadow: 0 0 2px white; */
  opacity: .9;
  display: none;
}
#crosshair-horizontal {
  position: absolute;
  z-index: 1000;
  width: 4px;
  height: 34px;
  background: white;
  left: 50%;
  top: 50%;
  margin-top: -17px;
  margin-left: -2px;
  /* box-shadow: 0 0 2px white; */
  opacity: .9;
  display: none;
}
  