* {
  user-select: none;
  image-rendering: optimizeSpeed;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
}

@font-face {
  font-family: 'Minecraft';
  src: url('/textures/font/Minecraft-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

body {
  background: #9bd7ff;
  background: radial-gradient(#d1e6fa, #75b3f0);
  font-family: 'Minecraft', sans-serif;
  color: #ffffff;
  text-shadow: 1.5px 1.5px #3f3f3f;
  font-size: 16px;
  word-spacing: 4px;
  line-height: 1.25em;
  margin: 0;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: #1b1b1b;
  background: #b2b2b2;
  text-shadow: none;
}

#gui {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  z-index: 1000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#crosshair {
  position: absolute;
  width: 16px;
  height: 16px;
  background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20viewBox%3D%220%200%2021%2021%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M8.625%200h3v21h-3z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M0%209h20.25v3H0z%22%2F%3E%3C%2Fsvg%3E');
  background-size: 100%;
  left: calc(50% - 8px);
  top: calc(50% - 8px);
  mix-blend-mode: difference;
}

#gui.pause #crosshair {
  display: none;
}

.hotbar {
  position: absolute;
  bottom: 0;
  width: 368px;
  height: 48px;
  background: url('textures/widgets.png') no-repeat;
  background-size: 518px;
  background-position: 0 3px;
  display: flex;
}

.hotbar::after {
  content: attr(tooltip);
  position: absolute;
  top: -42px;
  width: 100%;
  text-align: center;
}

.hotbar.tooltip::after {
  animation: tooltip-fade 2s linear forwards;
}

@keyframes tooltip-fade {
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.hotbar .slot {
  height: 30px;
  width: 30px;
  margin-top: 10px;
  margin-left: 7px;
  margin-right: 3.5px;
  display: grid;
  place-content: center;
  position: relative;
  background: url('textures/InvSprite.png') no-repeat;
}

.slot.selected::before {
  content: '';
  position: absolute;
  top: -9px;
  left: -9px;
  width: 48.8px;
  height: 47px;
  background: url(textures/widgets.png) no-repeat;
  background-size: 518px;
  background-position: 0 -45px;
}

#gui.pause .hotbar {
  display: none;
}

.inventory {
  display: none;
  z-index: 1;
}

#gui.takingInv .inventory {
  display: block;
}

#gui.pause .inventory {
  display: none;
}

.items {
  background: url(/textures/tab_item_search.png) no-repeat;
  width: 394px;
  height: 275px;
  z-index: 1;
  background-size: 518px;
  padding-left: 16px;
  box-sizing: border-box;
}

.inventory .search {
  text-shadow: none;
  color: #3f3f3f;
  font-size: 20px;
  padding-top: 10px;
  display: flex;
  word-spacing: initial;
  line-height: 0.9;
}

.inventory .search .input {
  outline: none;
  width: 179px;
  height: 21px;
  padding-left: 3px;
  margin-left: 15px;
  box-sizing: border-box;
  color: #FCFCFC;
  text-shadow: 1.5px 1.5px #3f3f3f;
  caret-color: transparent;
  cursor: default;
}

.search .input:focus::after {
  content: '_';
  margin-left: 2px;
  pointer-events: none;
  user-select: none;
  position: absolute;
  animation: 1s blink step-end infinite;
}

@keyframes blink {
  from, to {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.inventory .tab {
  width: 328px;
  margin-top: 4px;
  height: 182px;
  overflow-y: auto;
}

.inventory .slot {
  position: relative;
  display: inline-block;
  background: #8B8B8B no-repeat center center / 32px 32px;
  border: 2.23px solid;
  border-color: #373737 #FFF #FFF #373737;
  width: 32px;
  height: 32px;
  font-size: 16px;
  line-height: 1;
  text-align: left;
  vertical-align: bottom;
  margin: 0;
}

.inventory .slot::before, .inventory .slot::after {
  content: "";
  position: absolute;
  background-color: #8B8B8B;
  height: 2px;
  width: 2px;
  pointer-events: none;
}

.inventory .slot::before {
  bottom: -2px;
  left: -2px;
}

.inventory .slot::after {
  top: -2px;
  right: -2px;
}

.inventory .slot .item, .inventory .item.drag {
  display: inline-block;
  width: 32px;
  height: 32px;
  vertical-align: middle;
  background: url(textures/InvSprite.png) no-repeat;
  background-position: inherit;
  pointer-events: none;
}

.inventory .item.drag {
  position: fixed;
  top: 0;
  left: 0;
  margin: -16px;
  display: none;
}

.inventory .item.drag.visible {
  display: inline-block;
}

.inventory .slot:hover .item::before {
  content: '';
  width: 100%;
  height: 100%;
  position: absolute;
  background: #ffffff80;
  top: 0;
  left: 0;
}

.inventory .hotbar {
  position: relative;
  margin-top: 8px;
  background: transparent;
  width: 328px;
  height: 37px;
}

.minetip {
  position: fixed;
  top: 0;
  left: 0;
  background-color: #100010;
  background-color: rgba(16,0,16,0.94);
  padding: 0.375em;
  font-size: 20px;
  word-spacing: normal;
  white-space: nowrap;
  margin: -1.875em 1em;
  pointer-events: none;
  display: none;
  z-index: 9999;
}

.minetip.visible {
  display: block;
}

.minetip::before {
  content: "";
  position: absolute;
  top: 0.125em;
  right: -0.124em;
  bottom: 0.125em;
  left: -0.124em;
  border: 0.125em solid #100010;
  border-style: none solid;
  border-color: rgba(16,0,16,0.94);
}

.minetip::after {
  content: "";
  position: absolute;
  top: 0.125em;
  right: 0;
  bottom: 0.125em;
  left: 0;
  border: 0.125em solid #2D0A63;
  border-image: -webkit-linear-gradient(rgba(80,0,255,0.31),rgba(40,0,127,0.31)) 1;
  border-image: linear-gradient(rgba(80,0,255,0.31),rgba(40,0,127,0.31)) 1;
}

.format-0{color:#000;text-shadow:.125em .125em 0 #000}.format-1{color:#00a;text-shadow:.125em .125em 0 #00002a}.format-2{color:#0a0;text-shadow:.125em .125em 0 #002a00}.format-3{color:#0aa;text-shadow:.125em .125em 0 #002a2a}.format-4{color:#a00;text-shadow:.125em .125em 0 #2a0000}.format-5{color:#a0a;text-shadow:.125em .125em 0 #2a002a}.format-6{color:#fa0;text-shadow:.125em .125em 0 #2a2a00}.format-7{color:#aaa;text-shadow:.125em .125em 0 #2a2a2a}.format-8{color:#555;text-shadow:.125em .125em 0 #151515}.format-9{color:#55f;text-shadow:.125em .125em 0 #15153f}.format-a{color:#5f5;text-shadow:.125em .125em 0 #153f15}.format-b{color:#5ff;text-shadow:.125em .125em 0 #153f3f}.format-c{color:#f55;text-shadow:.125em .125em 0 #3f1515}.format-d{color:#f5f;text-shadow:.125em .125em 0 #3f153f}.format-e{color:#ff5;text-shadow:.125em .125em 0 #3f3f15}.format-f{color:#fff;text-shadow:.125em .125em 0 #3f3f3f}.format-l{font-weight:700;letter-spacing:.125em}.format-m{text-decoration:line-through}.format-n{text-decoration:underline}.format-o{font-style:italic}

.options {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAwBQTFRFWT0peVU6dFhEbGxslmxKuYVch4eHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQDLsGAAAAGBJREFUKBUFwYEBAzEMxKCjL2f/kQu74opxbhq9uWjbscNhO+s7zZVclm7RfJpZaRvD7cbjzp20c1e0ohbJFGY1NnCnlTvX7tSzqNNXls1SB7ib+Cm7uVp2Zhi1XHkVZX9AGgJf5gL0qAAAAABJRU5ErkJggg==');
  background-size: 100px;
  font-size: 16px;
  word-spacing: 4px;
  line-height: normal;
  display: grid;
  place-content: center;
  text-align: center;
  z-index: 1;
}

.options.titlescreen {
  background: url(textures/title/header_background.png);
  background-size: contain;
}

.options.hidden {
  display: none;
}

#gui.pause .options {
  background: transparent;
  display: grid;
}

.options::before, .inventory::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 80%);
  z-index: -1;
}

.options h1 {
  position: relative;
  font: inherit;
  margin-top: -70px;
}

.options h2 {
  position: relative;
  font: inherit;
  margin-top: 0;
}

.options img ~ h2 {
  margin-bottom: 25px;
}

.options img {
  position: relative;
  margin: auto;
  height: 100px;
}

.button {
  background: url(/textures/widgets.png);
  background-size: 436px;
  background-position: 0 -111.7px;
  z-index: 1;
  width: 340px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  white-space: nowrap;
  margin-bottom: 5px;
  word-spacing: normal;
  box-sizing: border-box;
  padding-bottom: 3px;
}

.button::before {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 3px;
  z-index: -1;
  background: inherit;
  background-position-x: 98.2px;
  content: '';
}

.button:hover {
  background-position: 0 -145.75px;
}

.button.disabled {
  background-position: 0 -78.1px;
  color: gray;
  text-shadow: none;
  pointer-events: none;
}

.options .button:last-of-type {
  margin-bottom: 0;
}

.buttons {
  display: flex;
  justify-content: space-between;
}

.buttons .button {
  width: 162px;
}

.options.titlescreen .button {
  margin-bottom: 7px;
  margin-left: auto;
  margin-right: auto;
}

.options.titlescreen .button:last-of-type {
  margin-bottom: 0;
}

.progress {
  height: 4px;
  width: 200px;
  position: relative;
  background: #808080;
}

.progress .fill {
  background: #80FF80;
  width: 0%;
  height: 100%;
  position: absolute;
  left: 0;
}

.title {
  margin: auto;
  height: 80px;
  width: 496px;
  position: relative;
  margin-bottom: 70px;
  margin-bottom: 60px;
}

.title.minceraft::before {
  background-image: url(/textures/title/minceraft.png);
}

.title::before {
  background-image: url(/textures/title/minecraft.png);
  content: '';
  width: 281px;
  height: 100%;
  position: absolute;
  left: 0;
  background-size: 464px;
  top: 0;
}

.title::after {
  background-image: url(/textures/title/minecraft.png);
  content: '';
  width: 215px;
  height: 100%;
  position: absolute;
  left: 281px;
  background-size: 464px;
  background-position: 0 -81.5px;
  top: 0;
}

.title .edition {
  position: relative;
  margin: auto;
  top: 70px;
  width: 190px;
  height: 26px;
  background: url(/textures/title/edition.png);
  z-index: 1;
  background-size: 243px;
}

.title .splash {
  position: absolute;
  right: -20px;
  top: 50px;
  z-index: 1;
  transform: rotate(-20deg);
  font-size: 25px;
  color: #FFFF55;
  line-height: 1.25em;
  text-shadow: 0.1em 0.1em #3F3F15;
  word-spacing: normal;
  animation: splash-pulse .25s infinite alternate ease-in;
}

.title .splash.small {
  font-size: 20px;
}

.title .splash.supersmall {
  font-size: 16px;
}

.options .version {
  position: absolute;
  bottom: 0;
  left: 3px;
  word-spacing: normal;
}

@keyframes splash-pulse {
  to {
    transform: rotate(-20deg) scale(1.1);
  }
}

.debugscreen {
  position: fixed;
  left: 1px;
  top: 1px;
  display: none;
}

.debugscreen.visible {
  display: block;
}

.debugscreen p {
  margin: 0;
  background: #5a5a5a6e;
  color: white;
  text-shadow: none;
  width: max-content;
  word-spacing: 0;
  line-height: normal;
}

#camera {
  --x: 0;
  --y: 0;
  --z: 0;
  --rotX: 0;
  --rotY: 0;
  --perspective: 700px;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  perspective: var(--perspective);
  overflow: hidden;
  z-index: 500;
  transition: perspective 0.5s cubic-bezier(0.07, 0.95, 0, 1);
}

#camera.sprint, #camera.fly {
  perspective: calc(var(--perspective) / 1.05);
}

#camera.fly.sprint {
  perspective: calc(var(--perspective) / 1.1);
}

#scene {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rotX)) rotateY(var(--rotY)) translateX(var(--x)) translateY(var(--y)) translateZ(var(--z)) translateZ(var(--perspective));
  transform-origin: 50% 50% var(--perspective);
}

.imgloader {
  display: none;
}

.block {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 50%;
  transform-style: preserve-3d;
}

.face {
  position: absolute;
  width: 100px;
  height: 100px;
  left: calc(50% - 50px);
  background-size: 100px;
}

.block[focus='true'] .face {
  box-shadow: inset 0 0 0 0.5px black;
}

.face2 {
  position: absolute;
  width: 100px;
  height: 100px;
  left: calc(50% - 50px);
  background-size: 100px;
}

.block.torch .face {
  width: 20px;
  height: 60px;
  left: calc(50% - 10px);
  top: 40px;
}

.block.torch .face:last-of-type {
  height: 20px;
}

.block.torch .face2 {
  width: 30px;
  left: calc(50% - 15px);
  background-position: center;
}

.block.redstone .face {
  transform: rotateX(810deg) translateZ(-70px) !important;
  width: 55px;
  height: 55px;
  background-position: center;
  left: calc(50% - 27.5px);
  display: none;
}

.block.redstone .face {
  display: block;
}

.block.animate .face {
  animation: animate1 10s infinite linear;
}

.block.animate .face::after {
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  animation: animate2 10s infinite linear;
  content: '';
}

.block[focus='true'].animate .face::after {
  box-shadow: inset 0 0 0 0.5px black;
}

@keyframes animate1 {
  0%, 12.5% {
    background-position: 0 0;
  }
  12.6%, 37.5% {
    background-position: 0 -100px;
  }
  37.6%, 49.9% {
    background-position: 0 -200px;
  }
  50%, 74.9% {
    background-position: 0 -300px;
  }
  75%, 100% {
    background-position: 0 0;
  }
}

@keyframes animate2 {
  0% {
    background-position: 0 -100px;
    opacity: 0;
  }
  12.5% {
    background-position: 0 -100px;
    opacity: 1;
  }
  24.9% {
    background-position: 0 -100px;
    opacity: 0;
  }
  25% {
    background-position: 0 -200px;
    opacity: 0;
  }
  37.5% {
    background-position: 0 -200px;
    opacity: 1;
  }
  49.9% {
    background-position: 0 -200px;
    opacity: 0;
  }
  50% {
    background-position: 0 -300px;
    opacity: 0;
  }
  62.5% {
    background-position: 0 -300px;
    opacity: 1;
  }
  74.9% {
    background-position: 0 -300px;
    opacity: 0;
  }
  75% {
    background-position: 0 0;
    opacity: 0;
  }
  87.5% {
    background-position: 0 0;
    opacity: 1;
  }
  100% {
    background-position: 0 0;
    opacity: 0;
  }
}
