.block.grass   { background-image: url(/Tiles/dirt_grass.png); }

.block.treeTopLeft     { background-image: url(/Tiles/leaves_transparent.png); }
.block.treeTopMiddle   { background-image: url(/Tiles/leaves_transparent.png); }
.block.treeTopRight    { background-image: url(/Tiles/leaves_transparent.png); }

.block.treeCrownLeft   { background-image: url(/Tiles/leaves_transparent.png); }
.block.treeCrownMiddle { background-image: url(/Tiles/leaves_transparent.png); }
.block.treeCrownRight  { background-image: url(/Tiles/leaves_transparent.png); }

.block.treeTrunkLeft   { background-image: url(/Tiles/leaves_transparent.png); }
.block.treeTrunkMiddle { background-image: url(/Tiles/trunk_mid.png); }
.block.treeTrunkRight  { background-image: url(/Tiles/leaves_transparent.png); }

.block.treeRootLeft    { background-image: url(/Tiles/tree_root_left.png); }
.block.treeRootMiddle  { background-image: url(/Tiles/trunk_bottom.png); }
.block.treeRootRight   { background-image: url(/Tiles/tree_root_right.png); }

.block.soil         { background-image: url(/Tiles/dirt.png); }
.block.soilGravel  { background-image: url(/Tiles/gravel_dirt.png); }
.block.stoneGravel { background-image: url(/Tiles/gravel_stone.png); }
.block.stone        { background-image: url(/Tiles/stone.png); }
.block.bedrock      { background-image: url(/Tiles/greystone.png); }
.block.cave         { background-color: #000; }
#field .block:hover { outline: 1px solid white; z-index: 10; }

.morning0 .block, .morning0 #player { filter: saturate(50%) brightness(0.6) hue-rotate(-10deg); }
.morning1 .block, .morning1 #player { filter: saturate(100%) brightness(0.8) hue-rotate(-20deg); }
.morning2 .block, .morning2 #player { filter: saturate(200%) hue-rotate(-30deg); }

.evening0 .block, .evening0 #player { filter: brightness(0.8) hue-rotate(-10deg); }
.evening1 .block, .evening1 #player { filter: brightness(0.6) hue-rotate(-20deg); }
.evening2 .block, .evening2 #player { filter: brightness(0.4) hue-rotate(-10deg) saturate(50%); }

.night .block, .night #player { filter: brightness(0.3) saturate(30%); }

#player {
  --player-width: 64px;
  --player-height: 76px;
  position: absolute;
  left: calc(var(--field-width) / 2);
  top: calc(var(--field-height) / 2 - 10px);
  display: flex;
  flex-flow: column nowrap;
  width: var(--player-width);
  height: var(--player-height);
}
#player > div {
  margin: auto;
  background: transparent center no-repeat;
  background-size: cover;
}
#player.right {
  transform: scaleX(-1);
}
#player > .head {
  width: 46px;
  height: 46px;
  background-image: url(/Characters/Alien/alien_head.png);
  z-index: 1;
}
#player > .body {
  width: 22px;
  height: 24px;
  margin-top: -8px;
  background-image: url(/Characters/Alien/alien_body.png);
}
#player > .legs {
  position: relative;
  width: 14px;
  height: 18px;
}
#player > .legs > div {
  position: absolute;
  width: 14px;
  height: 18px;
  background-image: url(/Characters/Alien/alien_leg.png);
  transform-origin: top center;
}
#player.walking > .legs > div.right {
  animation: dingle .3s linear infinite alternate;
}
#player.walking > .legs > div.left {
  animation: dangle .3s linear infinite alternate;
}
#player > .arms {
  position: absolute;
  width: 8px;
  height: 16px;
  top: 48px;
  left: 30px;
  background-image: url(/Characters/Alien/alien_arm.png);
  transform-origin: top center;
}
#player.walking > .arms {
  animation: dangle .3s linear infinite alternate;
}
.block {
  flex: 0 0 auto;
  width: var(--block-size);
  height: var(--block-size);
  background-color: transparent;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#blocks {
  position: absolute;
  top: calc(var(--block-size) * (var(--spare-blocks) / -2));
  left: calc(var(--block-size) * (var(--spare-blocks) / -2));
  width: calc(var(--field-width) + var(--spare-blocks) * var(--block-size));
  height: calc(var(--field-height) + var(--spare-blocks) * var(--block-size));
  display: flex;
  flex-flow: row wrap;
}

@keyframes dingle {
  from { transform: rotate(20deg); }
  to { transform: rotate(-20deg); }
}
@keyframes dangle {
  from { transform: rotate(-20deg); }
  to { transform: rotate(20deg); }
}
