@keyframes moveup{
    0%{
        transform: translateY(0);
        opacity: 1;
    }
    100%{
        transform: translateY(-150px);
        opacity: 0;
    }
}
@keyframes appear{
    0%{
        transform: scale(0);
    }
    100%{
        transform: scale(1);
    }
}
@keyframes add{
    0%{
        transform: scale(1);
        box-shadow: 0 0 1px red;
    }
    50%{
        transform: scale(1.2);
    }
    100%{
        transform: scale(1);
    }
}
@import "../font/clear-sans.css";.game2048-wrap *{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}.game2048-wrap{
    font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
    color: #776e65;
    font-size: 18px;
}.game2048-wrap a{
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}.game2048-wrap .container{
    position: relative;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 450px;
    height: auto;
    box-sizing: content-box;
}.game2048-wrap .heading{
    margin: 20px 0;
}.game2048-wrap .heading{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}.game2048-wrap h1.title{
    font-size: 74px;
    line-height: 66px;
    font-weight: bold;
}.game2048-wrap .scores-container{
    float: right;
}.game2048-wrap .score-container, .game2048-wrap .best-container{
    float: left;
    padding: 3px 20px;
    background: #bbada0;
    border-radius: 3px;
    font-size: 25px;
    font-weight: bold;
    color: white;
    text-align: center;
}.game2048-wrap .score-container{
    position: relative;
    margin-right: 15px;
    margin-bottom: 5px;
}.game2048-wrap .score-container .title, .game2048-wrap .best-container .title{
    font-size: 13px;
    color: #eee4da;
}.game2048-wrap .score-addition{
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    color: rgba(119, 110, 101, 0.9);
    z-index: 100;
    opacity: 0;
    font-size: 1rem;
}.game2048-wrap .score-addition.action{
    animation: 2s moveup;
}.game2048-wrap .above-game{
    font-size: 0.9rem;
}.game2048-wrap .restart-btn{
    margin: 5px 0 0 5px;
    float: right;
    padding: 0 8px;
    background: #8f7a66;
    color: white;
    height: 40px;
    line-height: 40px;
    border-radius: 3px;
    font-weight: bold;
}.game2048-wrap h2.subtitle{
    font-size: 1em;
}.game2048-wrap .game-container{
    position: relative;
    margin-top: 15px;
    width: 450px;
    height: 450px;
    background: #bbada0;
    border-radius: 6px;
    touch-action: none;
}.game2048-wrap .grid-container, .game2048-wrap .tile-container, .game2048-wrap .pop-container{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 426px;
    height: 426px;
}.game2048-wrap .grid-row{
    display: flex;
    margin-bottom: 2%;
}.game2048-wrap .grid-row, .game2048-wrap .tile{
    height: 23.5%;
}.game2048-wrap .grid-cell, .game2048-wrap .tile{
    width: 23.5%;
    border-radius: 3px;
}.game2048-wrap .grid-cell{
    margin-right: 2%;
    background: rgba(238, 228, 218, 0.35);
}.game2048-wrap .grid-cell:nth-of-type(4n){
    margin-right: 0;
}.game2048-wrap .tile{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 53px;
    font-weight: bold;
    background: #eee4da;
    transition: all 0.15s ease;
}.game2048-wrap .tile.new-tile{
    animation: 0.5s appear;
}.game2048-wrap .tile.addition{
    animation: 0.3s add;
}.game2048-wrap .tile[data-val]{
    color: #f9f6f2;
}.game2048-wrap .tile[data-val="2"], .game2048-wrap .tile[data-val="4"]{
    color: #776e65;
}.game2048-wrap .tile[data-val="128"], .game2048-wrap .tile[data-val="256"], .game2048-wrap .tile[data-val="512"]{
    font-size: 45px;
}.game2048-wrap .tile[data-val="1024"], .game2048-wrap .tile[data-val="2048"]{
    font-size: 33px;
}.game2048-wrap .tile[data-val="4"]{
    background: #ede0c8;
}.game2048-wrap .tile[data-val="8"]{
    background: #f2b179;
}.game2048-wrap .tile[data-val="16"]{
    background: #f59563;
}.game2048-wrap .tile[data-val="32"]{
    background: #f67c5f;
}.game2048-wrap .tile[data-val="64"]{
    background: #f65e3b;
}.game2048-wrap .tile[data-val="128"]{
    background: #edcf72;
}.game2048-wrap .tile[data-val="256"]{
    background: #edcc61;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.31746), inset 0 0 0 1px rgba(255, 255, 255, 0.19048);
}.game2048-wrap .tile[data-val="512"]{
    background: #edc850;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.39683), inset 0 0 0 1px rgba(255, 255, 255, 0.2381);
}.game2048-wrap .tile[data-val="1024"]{
    background: #edc53f;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.47619), inset 0 0 0 1px rgba(255, 255, 255, 0.28571);
}.game2048-wrap .tile[data-val="2048"]{
    background: #edc22e;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.55556), inset 0 0 0 1px rgba(255, 255, 255, 0.33333);
}.game2048-wrap .pop-container{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(238, 228, 218, 0.8);
    z-index: 100;
    opacity: 0;
    transition: all 1s ease;
}.game2048-wrap .winning-container p:nth-child(1){
    transform: rotate(90deg);
}.game2048-wrap .winning-container.action p:nth-child(1){
    transform-origin: center;
    animation: winning 1.5s infinite;
}.game2048-wrap .failure-container.action p:nth-child(1){
    transform-origin: center;
    animation: failure 5s infinite;
}

@keyframes winning{
    0%,25%,50%,75%,100%{
		transform: rotate(90deg) translateX(-5px);
	}
	12.5%{
		transform: rotate(80deg);
	}
	37.5%{
		transform: rotate(70deg);
	}
	62.5%{
		transform: rotate(100deg);
	}
	87.5%{
		transform: rotate(120deg);
	}
}

@keyframes failure{
    0%,25%,50%,75%,100%{
		transform: rotate(90deg) scale(0.7,1) rotateX(40deg);
	}
	12.5%{
		transform: rotate(90deg);
	}
	37.5%{
		transform: rotate(90deg);
	}
	62.5%{
		transform: rotate(90deg);
	}
	87.5%{
		transform: rotate(90deg);
	}
}.game2048-wrap .pop-container.action{
    opacity: 1;
}.game2048-wrap .pop-container p{
    font-size: 60px;
    font-weight: bold;
}.game2048-wrap .footer{
    flex: 1;
    padding: 10px 0;
    text-align: center;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    font-size: 0.75rem;
    color: #333;
    opacity: 0.7;
}
@media screen and (max-width:1250px){
    .game2048-wrap{
        font-size: 15px;
    }
    .game2048-wrap .container{
        width: 320px;
        max-width: 100%;
    }
    .game2048-wrap h1.title{
        font-size: 31px;
    }
    .game2048-wrap .score-container,
    .game2048-wrap .best-container{
        padding: 3px 10px;
    }
    .game2048-wrap .game-container{
        margin-top: 10px;
        width: 320px;
        height: 320px;
        max-width: 100%;
    }
    .game2048-wrap .grid-container,
    .game2048-wrap .tile-container{
        width: 298px;
        height: 298px;
    }
    .game2048-wrap .grid-row,
    .game2048-wrap .tile{
        height: 22.75%;
    }
    .game2048-wrap .grid-cell,
    .game2048-wrap .tile{
        width: 22.75%;
    }
    .game2048-wrap .grid-row{
        margin-bottom: 3%;
    }
    .game2048-wrap .grid-cell{
        margin-right: 3%;
    }
    .game2048-wrap .tile{
        font-size: 40px;
    }
    .game2048-wrap .tile[data-val="128"],
    .game2048-wrap .tile[data-val="256"],
    .game2048-wrap .tile[data-val="512"]{
        font-size: 28px;
    }
    .game2048-wrap .tile[data-val="1024"],
    .game2048-wrap .tile[data-val="2048"]{
        font-size: 23px;
    }
    .game2048-wrap .pop-container p{
        font-size: 30px;
    }
}

