body{
  display: flex;
  background: #faf8ef;
  align-items: center;
  justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
}
.container {
  position: relative;
  display: flex;
  flex-direction: row;
}
.board {
  display: flex;
  width: 40vw;
  height: 40vw;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: #bbada0;
}
.square {
  display: flex;
  width: 22%;
  height: 22%;
  margin: 1%;
  border-radius: 3px;
  background: rgba(238,228,218,0.35);
  justify-content: center;
  align-items: center;
  position: relative;
}
.elementContainer {
  margin-bottom: 70px;
}
.title{
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
}
h1 {
  font-size: 70px;
  color:#776e65;
}
.scoreElementContainer {
  display: flex;
  flex-direction: column;
  background: #bbada0;
  padding:15px 25px;
  font-size: 25px;
  font-weight: bold;
  border-radius: 3px;
  color: white;
  text-align: center;
  margin-left: 10px;
}

#scoreLabel {
  color:#eee4da;
  font-size: 20px;
}
button {
  width:180px;
  height: 50px;
  outline: none;
  font-size: large;
  font-weight: bold;
  background-color: #8f7a66;
  color:#f9f6f2;
  border: none;
  border-radius: 3px;
  margin-left: 10px;
  margin-top: 10px;
  cursor: pointer;
}

.tile {
  width: 22%;
  height: 22%;
  display: flex;
  z-index: 1;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  font-weight: bold;
  position: absolute;
  color:#f9f6f2;
  background-color: #edc22e;
  transition: top 0.25s, left 0.25s, width 1s, height 1s;
}

.row1{
  top:75%;
}
.row2{
  top:51%;
}
.row3{
  top:27%;
}
.row4{
  top:3%;
}

.column1{
  left:3%;
}
.column2{
  left:27%;
}
.column3{
  left:51%;
}
.column4{
  left:75%;
}

.value2 {
  color:rgb(119, 110, 101);
  background-color: #eee4da;
}
.value4 {
  color:rgb(119, 110, 101);
  background-color: #eee1c9;
}
.value8 {
  color:#f9f6f2;
  background-color: #f3b27a;
}
.value16 {
  color:#f9f6f2;
  background-color: #f69664;
}
.value32 {
  color:#f9f6f2;
  background-color: #f77c5f;
}
.value64 {
  color:#f9f6f2;
  background-color: #f75f3b;
}
.value128 {
  color:#f9f6f2;
  background-color: #edd073;
}
.value256 {
  color:#f9f6f2;
  background-color: #edcc62;
}
.value512 {
  color:#f9f6f2;
  background-color: #edc950;
}
.value1024 {
  color:#f9f6f2;
  background-color: #edc53f;
  font-size: 40px;
}
.value2048 {
  color:#f9f6f2;
  background-color: #edc22e;
  font-size: 40px;
}

@keyframes blink {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.7);
  } 
   100% {
    transform: scale(1);
  }
}
.merged {
  animation: blink 0.25s;
}
#alert {
  color: rgb(119, 110, 101);
  background: rgba(238, 228, 218, 0.73);
  font-size: 60px;
  font-weight: bold;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  display: none;
  position: absolute;
  z-index: 3;
}

@media(max-width:600px) {
  .tile{
    font-size: 25px;
  }
  h1 {
    font-size:40px;
  }
  button {
    width: 100px;
    height: 30px;
    font-size: small;
  }
  .scoreElementContainer{
    font-size: 16px;
  }
  #scoreLabel {
    font-size: 18px;
  }
}


































@keyframes blink {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.7);
  }
  100% {
    transform: scale(1);
  }
}
.merged {
  animation: blink 0.25s;
}



@media (max-width: 600px) {
  .tile {
    font-size: 25px;
  }
  h1 {
    font-size: 40px;
  }
  button {
    width: 100px;
    height: 30px;
    font-size: small;
  }
  .scoreElementContainer {
    font-size: 16px;
  }
  #scoreLabel {
    font-size: 18px;
  }
  .board {
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

#alert {
  color: rgb(119, 110, 101);
  background: rgba(238, 228, 218, 0.73);
  font-size: 60px;
  font-weight: bold;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  display: none;
  position: absolute;
  z-index: 3;
}
