*{
	margin: 0;
	padding: 0;
}
body{
	background: #0000ff;
}
#board{
	width: 600px;
	height: 600px;
	border:3px #333 solid;
}
#board div div{
	float: left;
	width: 75px;
	height: 75px;
	box-sizing:border-box;
	border: #000 solid .01cm;
}

#board .even div:nth-child(even){
	background: #ffbf00;
}

#board .even div:nth-child(odd){
	background: #009000;
}

#board .odd div:nth-child(even){
	background: #009000;
}

#board .odd div:nth-child(odd){
	background: #ffbf00;
}

.animate{
	animation: rotateBoard 1s ease-out;
	animation-fill-mode: both;
}
@keyframes rotateBoard { 
  0% {
    transform: rotateZ(0);
  }
  100%{
  	transform: rotateZ(-180deg);
  }

}
.forward{
	transform: rotateZ(-180deg);
}
.backward{
	transform: rotateZ(0);
}
.animate-backward{
	animation: rotateBoardBackward 1s ease-out;
	animation-fill-mode: both;
}
@keyframes rotateBoardBackward { 
  0% {
    transform: rotateZ(-180deg);
  }
  100%{
  	transform: rotateZ(0);
  }

}
img{
	width: 75px;
	height: 75px; 
}
.allowed{
	opacity: .8;
	background: radial-gradient(#333,#222 )!important;
	/*-webkit-box-shadow: inset 1px -4px 92px 0px rgba(0,0,0,0.75);
	-moz-box-shadow: inset 1px -4px 92px 0px rgba(0,0,0,0.75);
	box-shadow: inset 1px -4px 92px 0px rgba(0,0,0,0.75);*/
	border:1px solid black !important;
}
.clicked-square{
	background: radial-gradient(#333,#222 )!important;
	border:1px solid black !important;
}
#sematary img{
	transform: rotateZ(0);
}
#whiteSematary{
	position: absolute;
    top: 0;
    left: 610px;
    width: 180px;
}
#blackSematary{
	position: absolute;
    top: 0;
    left: -190px;
    width: 180px;
}
#blackSematary div{
	overflow-y: auto;
	margin-bottom: 2px;
}
#blackSematary img{
	float: right;
}
#sematary img{
	width: 60px;
	height: 60px;
}
#endscene{
	position: relative;
	display: none;
	opacity: 0;
	z-index: 1;
}
.overlay{
	position: fixed;
	width: 100%;
	height: 100%;
	background: #000;
	opacity: .5;
}
#endscene p{
	position: fixed;
	color:#fff;
	z-index: 2;
	width: 100%;
    text-align: center;
    margin-top: 40vh;
    font-size: 40px;
}
.show{
	display: block !important;
	animation: showMessage 1s ease-out;
	animation-fill-mode: both;
}
@keyframes showMessage { 
  0% {
  	opacity: 0;
  }
  100%{
  	opacity: 1;
  }

}
#turn{
	text-align: center;
	font-size: 24px;
	background-color: #fff;
    color: #000;
	padding: 10px 20px;
	margin-left: 33%;
	margin-right: 33%;
}
.winning-sign:first-letter{
	text-transform: uppercase;
}

.flip-board, .restart {
	padding: 10px 20px;
    border-radius: 5px !important;
    outline: 0;
    background: #ff4500;
    color: #fff;
    border: 0;
	font-size: 24px;
}

.restart {
	margin-left: 20px;
}

.center-screen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.flip-board:hover, .restart:hover {
	background-color: #ff0000;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 25% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 40%;
    text-align: center;
}

.modal button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 8px;
    border: none;
}

.modal button:hover {
    background-color: #45a049;
}

#buttons {
	position: relative;
	margin-top: 20px;
	margin-left: 20px;
}

@media (max-width: 768px) {
    body {
        transform: scale(0.7);
        transform-origin: top left;
    }

	#board {
		margin-top: 200px;
		margin-left: 10px;
	}

	#buttons {
		display: flex;
		align-items: center;
		justify-content: center;
		margin-top: 40px;
		position: relative;
	}
}

@media (max-width: 480px) {
    body {
        transform: scale(0.45);
        transform-origin: top left;
    }

	#board {
		margin-top: 200px;
		margin-left: 10px;
	}

	#buttons {
		display: flex;
		align-items: center;
		justify-content: center;
		margin-top: 40px;
		position: relative;
	}
}