html,
body {
  padding: 0;
  margin: 0;
  overflow: hidden;
}

body {
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: stretch;
  flex-direction: column;
}

.tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 4px;
  padding: 6px 12px;
  font-family: arial, serif;
  font-size: 12px;
  text-shadow: 0 1px 1px gray;
  color: #ffc64a;
  z-index: 4;
  max-width: 500px;
}

.tooltip:before {
  content: " ";
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid rgba(0, 0, 0, 0.9);
  position: absolute;
  top: -7px;
  left: 5px;
}

.quote {
  font-family: "Indie Flower", cursive;
  font-weight: bold;
  text-align: right;
}

.overlay {
  width: 100vw;
  height: 0;
  position: fixed;
  z-index: 4;
  left: 0;
  top: 0;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.8);
  overflow-y: hidden;
  transition: 0.5s;
}

.overlay-content {
  position: relative;
  top: 25%;
  text-align: center;
  margin-top: 30px;
  padding: 0 10%;
}

.overlay a,
.overlay p {
  padding: 8px;
  text-decoration: none;
  font-size: 2rem;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.overlay a:hover,
.overlay a:focus {
  color: #f1f1f1;
}

.overlay .closeOverlayBtn {
  position: absolute;
  top: 20px;
  right: 45px;
  font-size: 60px;
}

header {
  padding: 0 10%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-color: #d5ffce;
  height: 50px;
  flex-shrink: 0;
}

header .showOverlayBtn {
  cursor: pointer;
}

main {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: stretch;
  justify-items: stretch;
}

.openHelpBtn {
  cursor: pointer;
}

#left-side {
  background: url("images/grass.png") repeat;
  position: relative;
  flex-basis: 100%;
  flex-grow: 1;
  height: 100%;
  width: 100%;
}

#left-side > canvas {
  position: absolute;
}

#particles {
  z-index: 2;
}

#left-side .resource-field-anchor,
#left-side .interface-anchor,
#left-side .resource-image-field,
#left-side .resource-field,
#left-side .interface-image-field,
#left-side .interface-field {
  position: absolute;
}

#left-side .resource-image-field,
#left-side .resource-field {
  width: 10vw;
  height: 10vw;
  left: -5vw;
  top: -5vw;
  border-radius: 5vw;
}

#left-side .interface-image-field,
#left-side .interface-field {
  width: 32px;
  height: 32px;
  border-radius: 16px;
}

#left-side .resource-field,
#left-side .interface-field {
  z-index: 3;
  background-image: url(images/empty.png);
}

#left-side .resource-image-field,
#left-side .interface-image-field {
  z-index: 1;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

#left-side .resource-image-field {
  background-color: lightgrey;
  border: blue solid 2px;
}

#left-side .interface-image-field {
  border: blue dashed 1px;
}

#resources {
  display: inline;
  list-style: none;
  margin: 0;
  padding: 0;
}

#resources li {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  list-style: none;
  padding: 0 10px;
  margin: 0;
  height: 32px;
  min-width: 50px;
  cursor: default;
}

#resources li > div,
#resources li > span {
  margin: auto 0;
}

#resources li > span {
  padding: 0 5px;
  font-weight: bold;
}

#resources li div:first-child {
  height: 32px;
  width: 32px;
  display: inline-block;
}

#upgrades {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

#upgrades > div {
  height: 32px;
  width: 32px;
  cursor: pointer;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  margin: 0 3px;
}

footer {
  flex-shrink: 0;
  height: 50px;
}

footer .column {
  background-color: #d5ffce;
  height: 100%;
  padding: 0 5%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

footer a {
  text-decoration: none;
  color: black;
}

.alert-area {
  max-height: 100%;
  position: fixed;
  bottom: 55px;
  left: 20px;
}

.alert-area .alert-content {
  padding-right: 25px;
}

.alert-box {
  font-size: 16px;
  color: white;
  background: rgba(0, 0, 0, 0.9);
  line-height: 1.3em;
  padding: 10px 15px;
  margin: 5px 15px;
  position: relative;
  border-radius: 5px;
  transition: opacity 0.5s ease-in;
}

.alert-box.hide {
  opacity: 0;
}

.alert-close {
  background: transparent;
  width: 12px;
  height: 12px;
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 4;
}

.alert-close:before,
.alert-close:after {
  content: "";
  width: 15px;
  border-top: solid 2px white;
  position: absolute;
  top: 5px;
  right: -1px;
  display: block;
}

.alert-close:before {
  transform: rotate(45deg);
}

.alert-close:after {
  transform: rotate(135deg);
}

.alert-close:hover:before,
.alert-close:hover:after {
  border-top: solid 2px #d8d8d8;
}

header .menu {
  height: 25px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

header .music,
header .sound {
  height: 25px;
  width: 25px;
  cursor: pointer;
  margin-left: 15px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

header .music {
  background-image: url(icons/on.png);
}

header .sound {
  background-image: url(icons/sound_on.png);
}

header .music.off {
  background-image: url(icons/off.png);
}

header .sound.off {
  background-image: url(icons/sound_off.png);
}
