.flip .body {
	padding: 0 10px;
}
.flip .table-container {
	display: flex;
	justify-content: center;
	margin: 20px auto;
}
.flip .table {
	display: inline-grid;
}
.flip .scores {
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.flip .scores span {
	font-weight: bold;
}
.flip .scores > div {
	text-align: left;
}
.flip .scores > div:nth-child(2) {
	text-align: right;
}
.flip #top.new {
	animation-name: newtopscore;
	animation-duration: 0.5s;
	animation-iteration-count: 5;
}
@keyframes newtopscore {
	0% { color: inherit; }
	25% { color: red; }
	50% { color: green; }
	75% { color: #3080D0; }
}
.flip .board {
	position: relative;
	background: #ddd;
	box-sizing: none;
	border: 5px solid #ddd;
}
.flip .timer {
	width: 100%;
	height: 22px;
	box-sizing: border-box;
	border: 1px solid #3080D0;
}
.flip #time {
	background-color: #3080D0;
	width: 100%;
	height: 20px;
}

.flip #gameOver {
	width: 100%;
	height: fit-content;
	background: #ddd;
	opacity: 0.8;
	display: none;
	color: #000;
	font-size: 30px;
	font-weight: bold;
	text-align: center;
	margin-top: -212px;
	z-index: 100;
}

.flip .cell {
	position: absolute;
	opacity: 1;
	z-index: 1;
}
.flip .cell.empty {
	display: none;
}
.flip .cell.selected {
	transform: rotate(6deg) scale(1.13);
	z-index: 2;
}

.flip .cell.marked {
	animation-name: destroy;
	animation-duration: 0.30s;
}

.flip .cell.left {
	animation-name: moveleft;
	animation-duration: 0.30s;
}
.flip .cell.right {
	animation-name: moveright;
	animation-duration: 0.30s;
}
.flip .cell.up {
	animation-name: moveup;
	animation-duration: 0.30s;
}
.flip .cell.down {
	animation-name: movedown;
	animation-duration: 0.30s;
}

@keyframes moveleft {
	from { margin-left: 0px; }
	to { margin-left: -40px; transform: rotate(0) scale(1);}
}

@keyframes moveright {
	from { margin-left: 0px; }
	to { margin-left: 40px; transform: rotate(0) scale(1);}
}

@keyframes moveup {
	from { margin-top: 0px; }
	to { margin-top: -40px; transform: rotate(0) scale(1);}
}

@keyframes movedown {
	from { margin-top: 0px; }
	to { margin-top: 40px; }
}

@keyframes destroy {
	0% { opacity: 1; }
	50% { opacity: 0.5; transform: scale(1.2);}
	100% { opacity: 0; transform: scale(1); }
}
.flip .rules {
	margin-bottom: 3em;
}

.flip .rules p {
	margin-bottom: 1em;
}

.flip h2 {
	line-height: 2em;
	font-size: 130%;
	font-weight: normal;
}
