html,
body {
  margin: 0;
  padding: 0;
  background: #faf8ef;
  color: #776e65;
  font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 62.5%;
}

body {
  margin: 80px 0;
}

.container {
  width: 500px;
  margin: 0 auto;
}

.score-container:after {
  content: "Score";
}

.best-container::after {
  content: "Best";
}

.heading {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  width: 500px;
}

.heading .title {
  font-size: 10rem;
  font-weight: bold;
  margin: 0;
  order: 0;
}

.heading .scores-container {
  order: 1;
  align-self: auto;
}

.score-container,
.best-container {
  position: relative;
  display: inline-block;
  background: #bbada0;
  color: #ffffff;
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  border-radius: .5rem;
  margin-top: .8rem;
  padding: 2rem 1.5rem;
  height: 1.2rem;
}

.score-container::after,
.best-container::after {
  position: absolute;
  color: #eee4da;
  font-size: 1.3rem;
  width: 100%;
  top: .9rem;
  left: 0;
}

.above-game {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-content: center
}

.above-game .game-info {
  display: inline-block;
  padding: .8rem 1.5rem;
  font-size: 2rem;
  margin: 0;
}

.above-game .restart-button {
  display: inline-block;
  background: #8f7a66;
  border-radius: .5rem;
  color: #ffffff;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  font-size: 2rem;
  padding: 0.8rem 3rem;
}

.above-game .connect-button {
  display: inline-block;
  background: #8f7a66;
  border-radius: .5rem;
  color: #ffffff;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  font-size: 2rem;
  padding: 0.8rem 3rem;
  margin-left: 3rem;
}

/****************************/

.game-container {
  box-sizing: border-box;
  margin-top: 4vh;
  position: relative;
  background: #bbada0;
  width: 500px;
  height: 500px;
  border-radius: .5rem;
  padding: 15px;
}

.grid-container {
  position: absolute;
  z-index: 1
}

.grid-row {
  margin-bottom: 15px;
}

.grid-row:last-child {
  margin-bottom: 0;
}

.grid-row:after {
  content: "";
  display: block;
  clear: both;
}

.grid-ceil {
  float: left;
  width: 106.25px;
  height: 106.25px;
  margin-right: 15px;
  border-radius: .3rem;
  background: rgba(238, 228, 218, 0.35);
}

.tile-inner {
  text-align: center;
  font-size: 5rem;
  font-weight: bold;
  line-height: 106.25px;
  border-radius: .3rem;
}

.tile-2 {
  background:#eee4da;
}

.tile-4 {
  background:#ede0c8;
}

.tile-8{
  color: #f9f6f2;
  background: #f2b179; 
}
.tile-16{
  color: #f9f6f2;
  background: #f59563; 
}

.tile-32{
  color: #f9f6f2;
  background: #f67c5f;
}

.tile-64{
  color: #f9f6f2;
  background: #f65e3b; 
}

.tile-128{
  color: #f9f6f2;
  background: #edcf72;
}
.tile-256{
  color: #f9f6f2;
  background: #edcc61;
}

.tile-512{
  color: #f9f6f2;
  background: #edc850;
}

.tile-1024{
  color: #f9f6f2;
  background: #edc53f;
}

.tile-1024 >.tile-inner {
  font-size: 3.5rem;
}

.tile-2048{
  color: #f9f6f2;
  background: #edc22e;
}

.tile-2048 >.tile-inner {
  font-size: 3.5rem;
}

.tile-4096{
  color: #f9f6f2;
  background: #edaa2e;
}

.tile-4096 >.tile-inner {
  font-size: 3.5rem;
}

.tile-8192{
  color: #f9f6f2;
  background: #ed8a2e;
  font-size: 3.5rem;
}

.tile-8192 >.tile-inner {
  font-size: 3.5rem;
}

.tile-16384{
  color: #f9f6f2;
  background: #ed8a2e;
  font-size: 3.5rem;
}

.tile-16384 >.tile-inner {
  font-size: 3.5rem;
}

.tile-32768{
  color: #f9f6f2;
  background: #ed6a2e;
  font-size: 3.5rem;
}

.tile-32768 >.tile-inner {
  font-size: 3.5rem;
}

.tile-65536{
  color: #f9f6f2;
  background: #ed4b2e;
  font-size: 3.5rem;
}

.tile-65536 >.tile-inner {
  font-size: 3.5rem;
}

.max-tile{
  float: right;
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
  background: rgb(0, 140, 255);
  border-radius: 13.5px;
  padding: 5px;
  margin: -10px -9px 0 -50px;
}

.new-tile{
  float: right;
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
  background: red;
  border-radius: 13.5px;
  padding: 5px;
  margin: -10px -9px 0 -50px;
}