html, body
{
	margin: 0;
	padding: 0;
}

#container
{
	position: relative;
	width: 500px;
	margin: 0px auto;
}

#topbar
{
	position: relative;
	height: 40px;
	margin-bottom: 10px;
	text-align: center;
}

#score
{
	display: inline-block;
	line-height: 40px;
}

#topright
{
	float: right;
	text-align: center;
}

#next-block
{
	display: inline-block;
	width: 40px;
	height: 40px;
	line-height: 40px;
	border-radius: 6px;
	visibility: hidden;
}

#topright-button
{
	display: inline-block;
	height: 40px;
	border-radius: 6px;
	padding: 0 15px;
	line-height: 40px;
	cursor: pointer;
}

#overlay
{
	display: inline-block;
	margin: 300px auto;
	position: relative;
	height: 100px;
	
	left: 110%;
	transition: left 0.4s;
	
	padding: 0 20px;

	z-index: 100;

	border-radius: 20px;

	line-height: 100px;
	font-size: 40px;
	font-weight: bold;
}

#grid
{
	position: relative;
	width: 500px;
	height: 700px;
	z-index: 0;
	overflow: hidden;

	text-align: center;
	cursor: default;
}

#bottombar
{
	position: fixed;
	width: 500px;
	bottom: 10px;
	margin: 0 auto;

	text-align: right;
	cursor: pointer;
}

#bottombar div
{
	display: inline-block;
	margin: 0 10px;
}

.block
{
	width: 100px;
	height: 100px;
	position: absolute;
	line-height: 100px;

	z-index: 2;
}

.transitioning
{
	transition: left 0.1s, top 0.1s;
}

@keyframes bounce
{
    from {transform: scale(1);}
    to {transform: scale(1.2);}
}

.bouncing
{
	animation-name: bounce;
    animation-duration: 0.1s;
    animation-iteration-count: 2;
    animation-direction: alternate;

    z-index: 3;
}

.merging
{
	z-index: 1;
}

/* mobile settings */

@media screen and (max-width: 520px)
{
	#container
	{
		width: 300px;
	}

	#grid
	{
		width: 300px;
		height: 420px;
	}

	#overlay
	{
		margin: 170px auto;
		height: 80px;
		
		line-height: 80px;
	}

	.block
	{
		width: 60px;
		height: 60px;
		line-height: 60px;
	}

	#bottombar
	{
		width: 300px;
		bottom: 10px;
	}

}