:root {
	--top: #9BB1FF;
	--middle: #7678ED;
	--bottom: #083D77;

	--gold-light: #f7e6ad;
	--gold: #FFD447;
	--gold-dark: #e38424;
	--menu: #FF674D;
	--menu-dark: #ad4634;

	--day: #d5e9ff;
	--night: #000000;
	--sunset: #FAD6A5;

	--ui-color-bad: red;
	--ui-color-good: white;

	--ui-padding: 25px;
	--ui-shadow-offset: 5px;
	--ui-shadow-offset-neg: -5px;
	--ui-shadow-blur: 5px;
}

*{
	margin: 0;
	padding: 0;
	color: white;
	font-family: Century Gothic, Arial, sans-serif;
	font-weight: 600;
}

#bottom>div>a {
	/*color: var(--top);*/
	font-size: 130%;
}

body, html{
	background-color: var(--bottom);
	height: 100%;
	/*overflow: hidden;*/
	min-height: 700px;
}

body {
	overflow: hidden;
}

#wrapper {
	height: 100%;
	width: 100%;
	background-color: grey;
	border-radius: 50px;
}

#top {
	height: 20%;
	position: relative;
	overflow: hidden;
}

#stars {
	position: absolute;
	width: 100%;
	height: 100%;
	background-image: url(img/twst.gif);
}

#sea {
	background-color: dodgerblue;
	position: absolute;
	margin: 0;
	padding: 0;
	left: 0;
}

#middle {
	height: 60%;
	/*background-color: var(--middle);*/
}

#bottom {
	height: 20%;
	width: 100%;
	background-color: var(--bottom);
	/*background: rgb(2,0,36);
	background: linear-gradient(0deg, var(--bottom) 0%, var(--bottom) 90%, var(--middle) 100%); */
}

.cloud {
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

.materials {
	color: #bababa;
	font-size: 80%;
}

.craft {
	color: var(--gold);
	font-size: 130%;
	text-decoration: none;
}

.menu {
	background-color: var(--menu);
	border-radius: 20px;
	box-shadow: 6px 6px var(--menu-dark);
}

#event {
	visibility: hidden;
	height: 700px;
	width: 600px;
	position: absolute;
	bottom: 50%;
	left: 50%;
	margin-bottom: -350px;
	margin-left: -300px;
	animation: show-event;
	animation-duration: 1s;
	animation-timing-function: ease;
}

.popup {
	animation: show-event;
	animation-duration: 0.5s;
	animation-timing-function: ease;
}

.popup-reverse {
	animation: show-event;
	animation-duration: 0.5s;
	animation-direction: reverse;
	animation-timing-function: ease;
	animation-fill-mode: forwards;
}

.quit {
	background-color: var(--menu-dark);
	font-size: 130%;
	border-radius: 50%;
	transform: rotate(45deg);
	width: 30px;
	height: 30px;
	border: none;
	position: absolute;
	right: 30px;
	top: 10px;
}

.quit:hover {
	background-color: white;
	color: var(--menu-dark);
	cursor: pointer;
}

.content {
	position: relative;
	width: 100%;
	height: 100%;
	padding: 10px;
}

#text-save {
	visibility: hidden;
	height: 400px;
	width: 400px;
	position: absolute;
	bottom: 50%;
	left: 50%;
	margin-bottom: -200px;
	margin-left: -200px;
}

#text-load {
	visibility: hidden;
	height: 400px;
	width: 400px;
	position: absolute;
	bottom: 50%;
	left: 50%;
	margin-bottom: -200px;
	margin-left: -200px;
}

.text-box {
	margin-top: 15px;
	height: 90%;
	width: 95%;
	display: flex;
	justify-content: center;
}

.area {
	width: 100%;
	height: 70%;

	padding: 5px;
	font-weight: 100;
	border-radius: 15px;
	background-color: var(--menu-dark);
	resize: none;
}

@keyframes show-event {
	0% {
		bottom: -50%;
		transform: scale(0.5);
	}

	80% {
		bottom: 51%;
		transform: scale(1.0005);
	}

	100% {
		bottom: 50%;
		transform: scale(1);
	}
}

#left-panel {
	position: absolute;
	left: 0;
	margin-top: 100px;
}

#resource-panel {
	height: 300px;
	width: 230px;
	margin: 20px;
}

#crafting-panel {
	height: 150px;
	width: 230px;
	margin: 20px;
}

#objective-panel {
	height: 300px;
	width: 230px;
	margin: 120px 20px;
	position: absolute;
	right: 0;
}

.objective-title {
	color: var(--gold) !important;
	text-decoration: underline;
}

tr, th, th>a{
	width: 100%;
}

/*.objective-button {
	color: var(--ui-color-good);
	text-decoration: underline;
}*/

.objective-button:hover {
	color: var(--gold);
}

.resource-negative {
	color: var(--ui-color-bad);
	/*text-decoration: 3px solid line-through;*/
}

.resource-positive {
	color: var(--ui-color-good);
}

.fonts-main {
	color: white;
	font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}

h3 {
	padding-top: 18px;
	text-align: center;
}

.menu-image {
	width: 580px;
	padding: 10px;
	border-radius: 25px;
}

.menu-title {
	font-size: 150%;
	font-weight: 700;
	text-shadow: 1px 1px black;
	text-align: center;
	text-decoration: underline;
}

.menu-desc {
	padding: 15px;
}

.menu-options {
	width: 100%;
	bottom: 10px;
}

.notification {
	color: var(--top);
}

.menu-button {
	padding: 20px;
	margin: 20px 10px;
	border-radius: 20px;
	background-color: var(--gold-dark);
	flex-grow: 1;
	text-align: center;
	color: var(--gold-light);
	/*font-weight: 900;*/
	border-width: 1px;
	border-style: solid;
	border-color: var(--gold);
	text-decoration: none;
}

.menu-button:hover {
	color: var(--gold-dark);
	background-color: var(--gold);
}

.flex-column-centered {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.center {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

table {
	width: 100%;
	padding: 15px;
}
td:nth-child(2) {
	text-align: right;
}

.position-bottom {
	position: absolute;
	bottom: 5px;
}

table, tr {
	width: 100%;
}

td{
	width: 100%;
}

.flex-spread {
	width: 100%;
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
}

#middle {
	position: relative;
}

#location {
	width: 500px;
	height: 250px;
	position: absolute;
	top: 38%;
	left: 50%;
	margin-top: -125px;
	margin-left: -250px;
}

#island {
	width: 100%;
	height: 120%;
	background-image: url(img/island.png);
	background-size: 100% 100%;
	position: relative;
}

.island-object:hover, .island-object-occupied {
	/*-webkit-filter: drop-shadow(var(--ui-shadow-offset) var(--ui-shadow-offset) var(--ui-shadow-blur) var(--gold))
            		drop-shadow(-var(--ui-shadow-offset) -var(--ui-shadow-offset) var(--ui-shadow-blur) var(--gold));*/
  	filter: drop-shadow(var(--ui-shadow-offset) var(--ui-shadow-offset) var(--ui-shadow-blur) var(--gold)) 
          	drop-shadow(var(--ui-shadow-offset-neg) var(--ui-shadow-offset-neg) var(--ui-shadow-blur) var(--gold));
}

@keyframes grow {
	0% {
		transform: scale(.95) rotate(5deg);
	}

	20% {
		transform: scale(1.05);
	}

	50% {
		transform: rotate(-5deg);
	}

	100% {
		transform: rotate(0deg);
		transform: scale(1);
	}
}

.island-object:hover {
	animation-name: grow;
	animation-duration: 0.4s;
	animation-timing-function: ease-out;
}

@keyframes shine {
	0% {
		background-position: 0% 50%;
	}
	30% {
		background-position: 150% 50%;
	}
	100% {
		background-position: 150% 50%;
	}
}

.island-object::after {
  content: "";
  position: absolute;
  background-image: linear-gradient(45deg, rgba(245, 246, 252, 0.1), rgba(245, 246, 252, 0.1) 48%, rgba(245, 246, 252, 0.9) 49%, rgba(245, 246, 252, 0.9) 51%, rgba(245, 246, 252, 0.1) 52%, rgba(245, 246, 252, 0.1));
  background-size: 400% 400%;
  /*background-image: linear-gradient(45deg, rgba(0,0,0,0) 0%, white 45%, white 55%, rgba(0,0,0,0) 100%);*/
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  width: 100%;
  height: 100%;
  animation: shine 5.5s linear infinite;
  animation-fill-mode: forwards;
}



#palms {
	background-image: url(img/palms.png);
	top: 15px;
	left: 175px;
	width: 150px;
	height: 140px;
}

#palms:after {
	mask-image: url(img/palms.png);
	-webkit-mask-image: url(img/palms.png);
}

#bush-1, #bush-2 {
	background-image: url(img/bush.png);
	width: 100px;
	height: 50px;
}

#bush-1:after, #bush-2:after {
	mask-image: url(img/bush.png);
	-webkit-mask-image: url(img/bush.png);
}

#bush-1 {
	top: 135px;
	left: 125px;
}

#bush-2 {
	top: 95px;
	left: 275px;
}

#rocks {
	background-image: url(img/rocks.png);
	right: 95px;
	bottom: 55px;
	width: 125px;
	height: 75px;
}

#rocks:after {
	mask-image: url(img/rocks.png);
	-webkit-mask-image: url(img/rocks.png);
}

#crabs {
	background-image: url(img/crabs.png);
	bottom: 25px;
	left: 70px;
	width: 100px;
	height: 80px;
}

#crabs:after {
	mask-image: url(img/crabs.png);
	-webkit-mask-image: url(img/crabs.png);
}

.island-object{
	background-size: 100% 100%;
	background-repeat: no-repeat;
	position: absolute;
}

@keyframes wiggle-continuous {
	0% {
		transform: rotate(5deg);
	}

	50% {
		transform: rotate(-5deg);
	}

	100% {
		transform: rotate(5deg);
	}
}

@keyframes spin-continuous {
	0% {
		transform: rotate(0deg);
	}

	50% {
		transform: rotate(360deg);
	}

	100% {
		transform: rotate(721deg);
	}
}

@keyframes pulse-continuous {
	0% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.3);
	}

	100% {
		transform: scale(1);
	}
}

.wiggles {
	animation-name: wiggle-continuous;
	animation-duration: 0.3s;
	animation-iteration-count: infinite;
	animation-timing-function: ease;
}

.spins {
	animation-name:spin-continuous;
	animation-duration: 3s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
}

.pulses {
	animation-name:pulse-continuous;
	animation-duration: 2s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
}

.urgent {
	color: red;
	animation-name:pulse-continuous;
	animation-duration: 0.5s;
	animation-iteration-count: infinite;
	animation-timing-function: ease-in;
}

#title {
	margin-top: 25px;
	font-size: 150%;
	animation: wiggle-continuous 5s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
	z-index: 5;
}

/*.island-object>svg {
	visibility: hidden;
}*/

/*.island-object:hover>svg{
	visibility: visible;
}*/

.popup-buttons {
	position: absolute;
	width: 90%;
	height: 65px;
	bottom: 30px;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	justify-content: space-around;
}
.popup-buttons>a {
	background-color: var(--menu-dark);
	text-decoration: none;
	text-shadow: none;
	flex-grow: 1;
	padding: 10px;
	margin: 4px;
	border-radius: 10px;
}

.popup-buttons>a:hover {
	background-color: white;
	color: var(--menu-dark);
}

.survivor-idle, .survivor-busy {
	background-size: 100% 100%;
	border-radius: 50%;
	width: 70px;
	height: 70px;
	border: 7px solid white;
}

.survivor {
	margin-left: 5px;
	margin-right: 5px;
	margin-bottom: -100px;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
}

.pbar {
	position: relative;
	background-color: var(--menu-dark);
	width: 100%;
	height: 16px;
	border-radius: 10px;
}

.pbar-value{
	background-color: var(--gold);
	position: absolute;
	height: 8px;
	top: 4px;
	left: 4px;
	border-radius: 5px;
}

h5, a, p, h1, h2, h3, h4, td, th {
	text-shadow: -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000, 1px 1px 2px #000;
	-webkit-font-smoothing: antialiased;
}

h5 {
	text-align: center;
}

.survivor-busy {
	border-color: var(--menu-dark);
}

.survivor-idle {
	border-color: var(--top);
}

.flex-center-bottom {
	display: flex;
	justify-content: center;
	align-items: flex-end;
}

#survivors {
	position: absolute;
	bottom: -10px;
}

.full {
	width: 4000px;
	height: 4000px;
	position: absolute;
	left:50%;
	top:50%;
	margin-left: -2000px;
	margin-top:  -2000px;
	visibility: hidden;
	animation-fill-mode: forwards;
}

#loss {
	background-color: black; 
}

@media only screen and (max-width: 800px) {
	#objective-panel {
		left: 50%;
		width: 260px;
		margin-left: -130px;
		top: -150px;
	}

	#left-panel {
		margin-top: 190px;
	}

	#left-panel>* {
		width: 170px;
	}

	#location {
		top: auto;
		left: auto;
		right: 15px;
		bottom: 155px;

		width: 400px;
		height: 200px;
		margin-top: -100px;
		margin-left: -200px;
	}

	.survivor-idle, .survivor-busy {
		width: 55px;
		height: 55px;
	}

	#rocks {
		right: 72px;
		bottom: 37px;
		width: 83px;
		height: 50px;
	}

	#bush-1, #bush-2 {
		width: 67px;
		height: 33px;
	}

	#bush-1 {
		top: 110px;
	}

	#bush-2 {
		left: auto;
		right: 100px;
	}

	#palms {
		top: 20px;
		left: 157px;
		width: 110px;
		height: 103px;
	}

	#crabs {
		bottom: 25px;
		left: 50px;
		width: 67px;
		height: 53px;
	}

}

/*
#objective-panel {
	height: 300px;
	width: 230px;
	margin: 120px 20px;
	position: absolute;
	right: 0;
}


#rocks {
	background-image: url(img/rocks.png);
	right: 95px;
	bottom: 55px;
	width: 125px;
	height: 75px;
}

#bush-1, #bush-2 {
	background-image: url(img/bush.png);
	width: 100px;
	height: 50px;
}


#palms {
	background-image: url(img/palms.png);
	top: 15px;
	left: 175px;
	width: 150px;
	height: 140px;
}


#crabs {
	background-image: url(img/crabs.png);
	bottom: 25px;
	left: 70px;
	width: 100px;
	height: 80px;
}

#location {
	width: 500px;
	height: 250px;
	margin-top: -125px;
	margin-left: -250px;
	position: absolute;
	top: 38%;
	left: 50%;

}
*/