body {
	margin: 0;
  	background: #2a323d;
}

canvas {
	margin: auto;
	max-width: 100%;
	max-height: 80%;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	transition: all 1s ease;
	top: 20%;
}

canvas.inactive {
	max-height: 0%;
}

button {
	border: none;
	color: #ffab40;
	font-size: x-large;
	background: #242a33;
	text-align: center;
	transition: all .2s ease;
}

button:hover {
    color: #ffd8a6;
    background-color: #2C333F;
    cursor: pointer;
}

button:disabled {
  opacity: 0.65; 
  cursor: not-allowed;
}

.farm {
    background-color: pink;
}

.upgrade {
	background-color: blueviolet;
}

.unlock {
	background-color: silver;
}

.inactive {
	pointer-events: none;
}

.start {
	position: absolute;
  	top: 0;
  	bottom: 0;
  	right: 0;
  	left: 0;
  	display: flex;
  	align-items: center;
  	flex-wrap: wrap;
  	transition: opacity 1s ease;
  	background: #2a323d;
}

.start.inactive {
	opacity: 0;
}

.start p {
  	top: 50%;
	left: 0%;
	right: 0%;
	display: block;
	color: #fff;
	font-size: x-large;
	width: 600px;
	max-width: 90%;
	margin: auto;
	text-align: center;
}

.world {
	background: url(../assets/WorldMap.png);
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-size: cover;
	background-position: center;
	transition: all 1s ease;
}

.world.inactive {
	top: -100%;
	bottom: 100%;
}

.level {
	position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 20px;
    border: cyan solid 4px;
    background-color: blue;
}

.level.completed {
	background-color: darkcyan;
    border-color: lightgreen;
}

.level.locked {
	background-color: grey;
	border-color: darkred;
}

.level.available {
	cursor: pointer;
}

.level.available::before {
    content: attr(data-name);
    position: absolute;
    bottom: 30px;
    text-align: center;
    min-width: 100px;
	background: bisque;
	left: -47px;
    white-space: pre;
    border-radius: 8px;
    padding: 4px;
}

.level.available::after {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid bisque;
    position: absolute;
    top: -20px;
    content: "";
    left: -5px;
}

.level.available.below::before {
    bottom: -48px;
}

.level.available.below::after {
    top: 20px;
    border-bottom: 10px solid bisque;
    border-top: none;
}

.title {
  font-size: 4em !important;
}

.subtitle {
  font-style: italic;
}

.start-button {
	background: none !important;
	left: 0;
	right: 0;
	margin: auto;
}

.stage {
	pointer-events: none;
}

.stage canvas {
	top: 0;
	bottom: 50%;
}

.shop {
	position: absolute;
	top: 0;
	height: 20%;
	width: 100%;
	background-color: #333c4a;
	box-shadow: 2px 2px 3px #222;
	z-index: 1;
	display: flex;
	transition: all 1s ease;
	min-height: 100px;
}

.shop.inactive {
	top: -20%;
}

.tab-buttons {
	height: 100%;
    width: 20%;
    max-width: 100px;
    min-width: 9em;
}

.tab-button {
	height: 50%;
	width: 100%;
	overflow-x: auto;
}

.tab-button p {
	margin: 0;
    font-size: small;
}

.tab {
	height: 100%;
	overflow-x: auto;
	padding: 8px;
	box-sizing: border-box;
	white-space: nowrap;
	overflow-y: hidden;
}

.tab button {
	min-width: 100px;
    height: 100%;
    margin-right: 4px;
}

.shop-item {
	border: none;
    font-size: x-large;
    background: #242a33;
    text-align: center;
    transition: all .2s ease;
    height: 100%;
    position: relative;
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	margin-right: 8px;
	border-radius: 4px;
	-webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.shop-item:hover {
    background: #2C333F;
    cursor: pointer;
}

.shop-item p {
	pointer-events: none;
}

.shop-item .gold, .shop-item .food {
	font-size: large;
}

.item-name {
    margin: 0;
    font-size: large;
    color: white;
	margin: 4px;
}

.item-desc {
	font-size: small;
    color: white;
    margin: 4px;
}

.quantity {
    border-radius: 20px;
    position: absolute;
    right: -2px;
    bottom: -2px;
    font-size: medium;
    height: 1em;
    padding: 0 4px 2px 4px;
	animation-name: pulse_animation;
	animation-duration: 500ms;
}

.settings {
	position: absolute;
	bottom: -2em;
	height: 2em;
	right: .5em;
	text-align: right;
	background-color: #333c4a;
	box-shadow: 2px 2px 3px #222;
}

.settings-button {
	background: unset;
	font-size: medium;
	pointer-events: all;
	text-align: center;
	width: 6em;
	padding: 0;
	margin: .5em;
	overflow: hidden;
}

.settings-button:hover {
	background: unset;
}

.settings-button.inactive {
	width: 0;
	margin: 0;
}

.chatbox {
	position: absolute;
	height: 50%;
	top: 50%;
	width: 100%;
	left: 0;
	background-color: #242a33;
	box-shadow: 2px 2px 3px #222;
	transition: all 1s;
	overflow: hidden;
}

.chatbox.inactive {
	top: 100%;
	height: 0;
}

.chatbox > div {
	width: calc(100% - 16px);
    height: calc(100% - 16px);
    border-radius: 8px;
    border: 2px solid #969696;
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 20px;
    color: white;
    font-size: large;
    box-sizing: border-box;
}

.name {
	margin-bottom: 10px;
	font-weight: bold;
	color: gold;
}

.continue {
	position: absolute;
	bottom: 10px;
	width: 100%;
	text-align: center;
}

.food {
	color: pink;
	margin: 0;
}

.gold {
	color: gold;
	margin: 0;
}

.pulse {
  	box-shadow: 0 0 0 0 rgba(232, 76, 61, 0.7);
	-webkit-animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
  	-moz-animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
  	-ms-animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
  	animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
  	z-index: 100;
	position: relative;
}

@keyframes pulse_animation {
	0% { transform: scale(1); }
	50% { transform: scale(1.5); }
	100% { transform: scale(1); }
}

@-webkit-keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
@-moz-keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
@-ms-keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
@keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}

@media (max-height: 500px) {
  canvas {
  	max-height: calc(100% - 100px);
  	top: 100px;
  }

  .shop.inactive {
  	top: -100px;
  }

  .start-button {
  	top: 80%;
	position: absolute;
  }
}
