* {
  box-sizing: border-box;
  -webkit-user-select: none; /* webkit (safari, chrome) browsers */
  -moz-user-select: none; /* mozilla browsers */
  -khtml-user-select: none; /* webkit (konqueror) browsers */
  -ms-user-select: none; /* IE10+ */
}

body {
  text-align: center;
  margin: 0;
  overflow:hidden;
}

.home {
  width: 50%;
  height: 80%;
  min-height: 500px;
  background-color: white;
  opacity: 0.8;
  margin: 0px auto;
  text-align: center;
  padding-top: 50px;
}

#score-board {
  height: 60%;
  overflow: scroll;
  margin-bottom: 10px;
}

table {
  display: inline-block;
  font-size: 20px;
}

table td, table th {
  padding: 8px;
}

table th {
  padding: 12px 0;
  background-color: mediumseagreen;
  color: white;
  width: 100px;
}

h1 {
  font-family: 'Roboto', sans-serif;
  font-size: 3.5rem;
  margin: 0
}

#game-start {
  background: url("../img/forest_bg.jpg") no-repeat;
  background-size: cover;
  height: 100vh;
  padding-top: 100px;
}

#game-running {
  display: none;
}

#final-score {
  font-size: 30px;
}

.play-button {
  font-size: 20px;
  width: 100px;
  height: 50px;
  padding: 10px 20px;
  border-radius: 10px;
  background-color: mediumseagreen;
  border: none;
  color: white;
  box-shadow: 8px 8px 5px rgba(0, 0, 0, 0.1);
}

.play-button:hover {
  transform: scale(1.2);
  outline: none;
  border: none;
}

.main {
  overflow: hidden;
  position: relative;
  height: 600px;
  width: 100%;
}

.controls {
  height: 200px;
  width: 100%;
  position: relative;
}

/* background */
#scrolling-bg {
  position: absolute;
  height: 15000px;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, darkseagreen 33%, skyblue 66%, black 100%);
}

#space-bg, #sky-bg, #forest-bg {
  height: 5000px;
}

.background-cloud {
  background: #fff;;
  border-radius: 100px;
  box-shadow: 0 8px 5px rgba(0, 0, 0, 0.1);
  height: 120px;
  position: relative;
  width: 350px;
}

.background-cloud:after, .background-cloud:before {
  background: #fff;
  content: '';
  position: absolute;
}

.background-cloud:after {
  border-radius: 100px;
  height: 100px;
  left: 50px;
  top: -50px;
  width: 100px;
}

.background-cloud:before {
  border-radius: 200px;
  width: 180px;
  height: 180px;
  right: 50px;
  top: -90px;
}

.background-tree {
  position: absolute;
  bottom: 0;
  background: darkolivegreen;
}

/* score and bonus points */
#score-wrapper {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translate(-50%);
  z-index: 999;
}

.bonus-points {
  position: absolute;
  top: 0;
  left: 15px;
  z-index: 999;
  width: 100px;
  color: gold;
  font-weight: bold;
}

/* progress bar */
#progress-bar {
  position: absolute;
  width: 102px;
  height: 15px;
  border-radius: 10px;
  top: 15px;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1px;
  background-color: white;
  border: 1px black solid;
  z-index: 999;
}

#progress {
  border-radius: 10px;
  height: 100%;
  width: 50%;
  background-color: green;
}

.level, #score {
  color: white;
}

/* tree segments */
#tree {
  position: relative;
  z-index: 1;
  left: 50%;
  transform: translate(-50%);
}

.trunk {
  width: 50px;
  height: 150px;
  margin: 0 auto;
  background-color: #9a4d00;
  display: inline-block;
  position: relative;
  /* inline element displays weird behavior
     if element has no content.
     user vertical-align to control alignment
  */
  vertical-align: bottom;
  /*box-shadow: 8px 0 2px 0 rgba(0, 0, 0, 0.2)*/
}

.trunk:before {
  content: "";
  width: 25px;
  height: 150px;
  background-color: black;
  opacity: 0.1;
  position: absolute;
}

.ridges {
  border-bottom: 5px solid rgba(0, 0, 0, 0.2);
  position: absolute;
  border-bottom-right-radius: 50% 50%;
  border-bottom-left-radius: 50% 50%;
}

.branch-wrapper {
  width: 120px;
  display: inline-block;
  /* inline element displays weird behavior
     if element has no content.
     user vertical-align to control alignment
  */
  vertical-align: bottom;
  transform: translate(0,-50px);
}

.branch {
  width: 120px;
  height: 50px;
  border-bottom: 15px solid #9a4d00;
  z-index: -2;
  position: relative;

}

.left-branch {
  border-bottom-left-radius: 100%;
}

.right-branch {
  border-bottom-right-radius: 100%;
}

.leaves-wrapper {
  position: relative;
}

.leaves {
  width: 120px;
  height: 40px;
  border-radius: 50px;
  background: darkgreen;
  position: absolute;
  display: inline-block;
  z-index: -1;
}

.leaves:before, .leaves:after {
  content: "";
  background: darkgreen;
}

.leaves:before {
  width: 50px;
  height: 80px;
  border-radius: 100px;
  position: absolute;
  top: -15px;
  left: 15px;
}

.leaves:after {
  width: 55px;
  height: 90px;
  border-radius: 200px;
  position: absolute;
  top: -25px;
  left: 50px;
}

.leaves-right {
  left: 50px;
  top: -35px;
}

.leaves-left {
  right: 50px;
  top: -35px;
}

/* leaves-bg */
.leaves-bg {
  width: 120px;
  height: 40px;
  border-radius: 50px;
  background: darkgreen;
  position: absolute;
  display: inline-block;
  z-index: -1;
}

.leaves-bg:before, .leaves-bg:after {
  content: "";
  border-radius: 100px;
  position: absolute;
  z-index: 99;
  width: 100px;
  height: 80px;
  transform: scale(0.2);
  border-bottom: 15px solid rgba(0, 0, 0, 0.2);
}

.leaves-bg:before {
  top: -20px;
  left: -10px;
}

.leaves-bg:after {
  top: -20px;
  left: 10px;
}

.leaves-bg-right {
  left: 50px;
  top: -35px;
}

.leaves-bg-left {
  right: 50px;
  top: -35px;
}

.apple-placeholder {
  width: 30px;
  height: 30px;
  margin: 0 auto;
}

.apple-placeholder-left {
  transform: translate(-50px,-5px);
}

.apple-placeholder-right {
  transform: translate(50px,-5px);
}

.apple {
  background: url("../img/apple-edited.png") no-repeat;
  background-size: contain;
  z-index: 999;
}

.rotten-apple {
  background: url("../img/apple-rotten.png") no-repeat;
  background-size: contain;
}

.empty-branch {
  width: 120px;
  height: 15px;
  display: inline-block;
  /* inline element displays weird behavior
     if element has no content.
     user vertical-align to control alignment
  */
  vertical-align: bottom;
}

/* user actions */
#user-keys {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  bottom: 50px;
}

.arrows {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 30px solid transparent;
  border-bottom: 30px solid transparent;
  margin: 0 20px;
}

#left-arrow {
  border-right: 60px solid black;
}

#right-arrow {
  border-left: 60px solid black;
}

#spacebar {
  width: 180px;
  height: 60px;
  background-color: black;
  display: inline-block;
  vertical-align: top;
}

.user-keys {
  cursor: pointer;
}

/* user cue: mimic pressing of key */
.user-keys:hover {
  transform: translateY(-4px);
}

.user-keys:active {
  transform: translateY(4px);
}

#spacebar p {
  color: white;
  line-height: 60px;
  font-size: 14px;
  margin: 0;
}

/* monkey image */
#monkey-start, #monkey-left, #monkey-right {
  background: url("../img/monkey-start.png") no-repeat;
  background-size: contain;
  margin: 0 auto;  
  position: absolute;
  width: 72px;
  height: 100px;
  left: 50%;
}

#monkey-start {
  transform: translate(-50%, -50%);
  bottom: 148px;
  z-index: 1;
}

#monkey-left {
  bottom: 266px;
  transform: translate(-100px);
  display: none;
  z-index: 1;
}

#monkey-right {
  bottom: 266px;
  transform: translate(30px);
  display: none;
  z-index: 1;
}  
