body {
	margin: 0;
}

.game-wrap {
	text-align: center;
	width: 500px;
	overflow: hidden;
	margin: 0 auto;
}
.game-title {
	margin: 50px auto 20px;
	font-size: 25px;
}
#game_box {
	margin: 0 auto;
	border-radius: 4px;
	width: 400px;
	height: 400px;
	background-color: #bfbfbf;
	overflow: hidden;
	position: relative;
}
.box-base-grid-wrap {
	position: absolute;
	width: 100%;
	height: 100%;
}
.box-base-grid {
	box-sizing: border-box;
	padding: 20px;
	height: 100%;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	flex-direction: column;
}
.box-base-grid .row {
	display: flex;
	justify-content: space-between;
}
.box-base-grid-item {
	width: 77px;
	height: 77px;
	background-color: #dcdcdc;
}

/*数组格子*/
.data-item-wrap {
	width: 100%;
	height: 100%;
	position: relative;
}
.data-item-wrap .data-item {
	position: absolute;
	width: 77px;
	height: 77px;
	text-align: center;
	line-height: 77px;
	font-size: 40px;
	/*font-family: monospace;*/
	font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
}

.data-item.item_pos_0_0,
.data-item.item_pos_1_0 ,
.data-item.item_pos_2_0 ,
.data-item.item_pos_3_0  {
	left: 20px;
}
.data-item.item_pos_0_1,
.data-item.item_pos_1_1 ,
.data-item.item_pos_2_1 ,
.data-item.item_pos_3_1  {
	left: 114px;
}
.data-item.item_pos_0_2,
.data-item.item_pos_1_2 ,
.data-item.item_pos_2_2 ,
.data-item.item_pos_3_2  {
	left: 208px;
}
.data-item.item_pos_0_3,
.data-item.item_pos_1_3 ,
.data-item.item_pos_2_3 ,
.data-item.item_pos_3_3  {
	left: 302px;
}
.data-item[class*="item_pos_0_"] {
	top: 20px  !important;
}
.data-item[class*="item_pos_1_"] {
	top: 114px  !important;
}
.data-item[class*="item_pos_2_"] {
	top: 209px  !important;
}
.data-item[class*="item_pos_3_"] {
	top: 303px  !important;
}
/*数值样式*/
.data-item.item_value_2 {
	color: black;
	background-color: #fff;
}
.data-item.item_value_4 {
	color: #353535;
	background-color: #ffdede;
}
.data-item.item_value_8 {
	color: white;
	background-color: #ffbbbb;
}
.data-item.item_value_16 {
	background-color: #ff7777;
	color: #fff;
}
.data-item.item_value_32 {
	background-color: #ff6464;
	color: #fff;
}
.data-item.item_value_64 {
	background-color: blue;
	color: #fff;
}
.data-item.item_value_128 {
	background-color: yellow;
	color: #fff;
}
.data-item.item_value_256 {
	background-color: yellow;
	color: #fff;
}
.data-item.item_value_512 {
	background-color: pink;
	color: #fff;
}
.data-item.item_value_1024 {
	background-color: pink;
	color: #fff;
}
.data-item.item_value_2048 {
	background-color: gold;
	color: #fff;
}


.game-utils-undo {
	overflow: hidden;
}
#game-undo-btn {
	float: right;
	margin-right: 70px;
	margin-bottom: 30px;
}
#gameOver-mask {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 2;
	right: 0;
	top: 0;
	/* line-height: 400px; */
	font-size: 40px;
	font-family: monospace;
	background: rgba(0, 0, 0, 0.47);
	/* opacity: .3; */
	color: #ffffff;
	display: none;
}
.gameOver-mask-title {
	margin:  180px auto 10px;
}
.gameOver-mask-tryAgain {
	width: 150px;
	padding: 2px;
	height: 30px;
	line-height: 30px;
	background: #d2bc00;
	margin: 0 auto;
	font-size: 22px;
	font-family: serif;
	border-radius: 4px;
	cursor: pointer;

}


/*响应式*/
@media screen and (max-width: 520px) {
	html,body {
		height: 100%;
		/*background: red;*/
	}
	#game-undo-btn {
		margin: 0;
		margin-bottom: 10px;
	}
	.game-wrap {
		width: 300px;
		margin-bottom: 200px;
	}
	#game_box {
		width: 300px;
		height: 300px;
	}
	.box-base-grid-item {
		width: 50px;
		height: 50px;
		background-color: #dcdcdc;
	}
	.data-item-wrap .data-item {
		position: absolute;
		width: 50px;
		height: 50px;
		text-align: center;
		line-height: 50px;
		font-size: 20px;
		/* font-family: monospace; */
		font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
	}
	.data-item.item_pos_0_0,
	.data-item.item_pos_1_0 ,
	.data-item.item_pos_2_0 ,
	.data-item.item_pos_3_0  {
		left: 20px;
	}
	.data-item.item_pos_0_1,
	.data-item.item_pos_1_1 ,
	.data-item.item_pos_2_1 ,
	.data-item.item_pos_3_1  {
		left: 90px;
	}
	.data-item.item_pos_0_2,
	.data-item.item_pos_1_2 ,
	.data-item.item_pos_2_2 ,
	.data-item.item_pos_3_2  {
		left: 160px;
	}
	.data-item.item_pos_0_3,
	.data-item.item_pos_1_3 ,
	.data-item.item_pos_2_3 ,
	.data-item.item_pos_3_3  {
		left: 230px;
	}
	.data-item[class*="item_pos_0_"] {
		top: 20px  !important;
	}
	.data-item[class*="item_pos_1_"] {
		top: 90px  !important;
	}
	.data-item[class*="item_pos_2_"] {
		top: 160px  !important;
	}
	.data-item[class*="item_pos_3_"] {
		top: 230px  !important;
	}
}