body {
  width: 100%;
  height: 100vh;
  background: url(img/background.png) no-repeat;
  background-size: cover;
  overflow: hidden;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: monospace;
  user-select: none;
  -moz-window-dragging: no-drag;
  -webkit-user-drag: none;
}

#header {
  position: fixed;
  top: 0;
  left: 0;
  background: #222;
  color: #fff;
  width: 100%;
  z-index: 3;
  border: 1px solid #000;
  box-shadow: 0 2px 6px #000;
  display: flex;
}

#header > div {
  position: relative;
  background: #333;
  border: 1px solid #444;
  box-shadow: inset 0 0 6px #000;
  padding: 8px;
  cursor: default;
}

#header > div:hover {
  background: #444;
}

#header > div.link {
  color: #3db438;
  text-shadow: 0 1px 2px #3cb43860;
  cursor: pointer;
}

#header > div:hover::before {
  pointer-events: none;
  content: attr(data-title);
  padding: 8px;
  background: #222;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  border: 1px solid #333;
  position: absolute;
  left: 50%;
  top: 100%;
  white-space: pre;
  transform: translateX(-50%);
}

#treeContainer {
  position: absolute;
  left: 320px;
  width: calc(100% - 640px);
  height: 100vh;
  gap: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#treeContainer #info {
  color: #fff;
  font-weight: 500;
  width: 100%;
  padding: 12px;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.2);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  z-index: 4;
  text-align: center;
}

#treeContainer #info #trees {
  font-size: 18px;
  font-weight: 600;
}

#treeContainer #info #treesPerSecond {
  font-size: 14px;
  font-weight: 500;
}

#tree {
  width: 128px;
  height: 128px;
  background: url(img/tree.png) no-repeat;
  background-size: cover;
  cursor: pointer;
  z-index: 2;
}

#tree:hover {
  filter: brightness(1.1);
  transform: scale(1.1);
}

#tree:active {
  filter: brightness(0.9);
  transform: scale(0.9);
}

#store, #leftPanel {
  padding-top: 32px;
  position: absolute;
  width: 320px;
  height: 100vh;
  background: url(img/darkNoise.jpg), #222;
  box-shadow: inset 0 0 12px #000;
  left: calc(100% - 320px);
  color: #ccc;
}

#leftPanel {
  left: 0;
}

#store h1, #leftPanel h1 {
  color: #ccc;
  text-shadow: 0 2px 6px #000;
  font-weight: 900;
  width: 100%;
  padding: 32px 0;
  text-align: center;
}

#store #buyables {
  height: 100vh;
  overflow-y: auto;
  padding-bottom: 128px;
}

#store #buyables > div {
  position: relative;
  width: 100%;
  height: 64px;
  padding-left: 72px !important;
  border: 1px solid #000;
  box-shadow: inset 0 0 6px #000;
  padding: 8px;
  background: #333 no-repeat;
  cursor: pointer;
  text-shadow: 0 2px 6px #000;
}

#store #buyables div:hover {
  background: #444 no-repeat;
}

#store #buyables > div.grayed {
  color: #f00;
  filter: brightness(0.8);
  pointer-events: none;
}

#store #buyables div b {
  font-size: 120%;
  font-weight: 900;
}

#store #buyables div .amount {
  position: absolute;
  color: #555;
  font-size: 24px;
  font-weight: 500;
  top: 50%;
  transform: translateY(-50%);
  right: 32px;
}

moni {
  background: url(img/tree.png) no-repeat;
  background-size: 16px;
  width: 16px;
  height: 16px;
  display: inline-block;
  position: relative;
  top: 4px;
  margin-right: -3px;
}

#leftPanel #upgrades {
  height: 100vh;
  overflow-y: auto;
  padding-bottom: 128px;
  display: flex;
  padding: 16px;
  gap: 16px;
  flex-direction: row;
  justify-content: center;
}

#leftPanel #upgrades > div { 
  position: relative;
  width: 48px;
  height: 48px;
  background: #333 no-repeat;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 6px #000;
  border: 1px solid rgb(190, 185, 154);
  cursor: pointer;
}

#leftPanel #upgrades > div:hover {
  background: #444 no-repeat;
  background-size: cover;
}

#leftPanel #upgrades > div.grayed {
  color: #f00;
  filter: brightness(0.5);
}

#leftPanel #upgrades > div:hover::before {
  pointer-events: none;
  content: attr(data-title);
  max-width: 256px;
  padding: 8px;
  background: #222;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  border: 1px solid #333;
  position: absolute;
  left: 50%;
  top: 100%;
  white-space: pre;
  transform: translateX(-50%);
}

#runningVersion {
  position: absolute;
  left: calc(320px + 8px);
  bottom: 8px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  text-shadow: 0 2px 6px #000;
}

#navbar {
  position: absolute;
  left: 320px;
  padding-top: 34px;
  width: calc(100% - 640px);
  height: 100px;
  background: #222;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-direction: row;
  border-bottom: 1px solid #000;
  box-shadow: 0 2px 6px #000;
}

#navbar > div {
  color: #fff;
  background: #333;
  border: 1px solid #666;
  padding: 8px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  z-index: 3;
}

#navbar > div:hover {
  background: #444;
}

.modal {
  background: rgba(0,0,0,.9);
  display: none;
  position: absolute;
  left: 320px;
  top: 100px;
  width: calc(100% - 640px);
  height: calc(100vh - 100px);
  padding: 32px;
  top: 100px;
  z-index: 5;
  overflow-y: auto;
}

.modal h1 {
  color: #fff;
  font-size: 32px;
  font-weight: 500;
  text-align: center;
  width: 100%;
}

.modal .content {
  margin: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal#info .content > div {
  width: 100%;
  color: #fff;
  pointer-events: none;
  border-radius: 0px;
  background: #222;
  padding: 16px;
}

.modal#info .content > div h1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal#info .content > div h1 .date {
  font-size: 50%;
  color: #1ac;
}

.modal#info .content > div p {
  font-size: 14px;
  font-weight: 500;
}

.modal .content > div {
  width: 100%;
  color: #ccc;
  border: 1px solid #666;
  background: #222;
  padding: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
  text-align: center;
  cursor: pointer;
}

.modal .content > div:hover {
  background: #333;
}

.modal .content > p {
  color: #fff;
  font-size: 16px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
  font-weight: 500;
}

.modal .content div h1 {
  color: #fff;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #ccc;
}

.modal .content div p {
  color: #ccc;
}

#pops {
  position:absolute;
  left:0px;
  top:0px;
  z-index:3;
  pointer-events:none;
}

.pop {
  font-weight: 900;
  color: #fff;
  width: 200px;
  height: 20px;
  font-size: 20px;
  text-align: center;
  text-shadow: 0px 2px 6px #000;
}

#treeFloor {
  position: absolute;
  width: calc(100% - 640px);
  left: 320px;
  bottom: 0;
  height: 32px;
  background: url(img/treefloor_small.png);
}

#treeFloor.medium {
  background: url(img/treefloor_medium.png);
}

#treeFloor.large {
  background: url(img/treefloor_large.png);
}