:root {
    --yellow: #feca57;
    --burgundy: #ee5253;
}

.directions {
    padding: 2rem;
    border-top: 1px solid #000000;
    border-bottom: 1px solid #000000;
}

.container-2048 {
    margin: 0 auto;
    padding-bottom: 3.5rem;
    flex: 1;
    width: 100%;
    text-align: center;
    background-color: var(--ui-color-panel);
}
.header-2048 .container-2048 {
    padding: 0;
    padding: 2rem 4rem;
}

.scores {
    display: flex;
    justify-content: center;
}

.score-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.8rem;
    font-size: 1.2rem;
    line-height: 1;
    color: #555;
}
.score-container.best-score {
    color: #9a9a95;
}

.score {
    margin-left: 1rem;
    position: relative;
    font-weight: bold;
    font-size: 1.5rem;
    vertical-align: middle;
    text-align: right;
}

.game {
    position: relative;
    margin: 0 auto;
    background: #9a9a95;
    padding: 7px;
    display: inline-block;
    border-radius: 3px;
    box-sizing: border-box;
}

.tile-container {
    border-radius: 6px;
    position: relative;
    width: 400px;
    height: 400px;
}

.tile,
.background {
    display: block;
    color: #f8ffe5;
    position: absolute;
    width: 100px;
    height: 100px;
    box-sizing: border-box;
    text-align: center;
}

.background {
    z-index: 1;
    text-align: center;
    border: 7px solid #9a9a95;
    background-color: #f8ffe5;
}

.tile {
    opacity: 0;
    z-index: 2;
    background: var(--yellow);
    color: #f8ffe5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    align-items: center;
    transition: 110ms ease-in-out;
    border-radius: 3px;
    border: 7px solid #9a9a95;
    box-sizing: border-box;
}
.tile--4 {
    background: var(--burgundy);
    color: #f8ffe5;
}
.tile--8 {
    background: #1b9aaa;
    color: #f8ffe5;
}
.tile--16 {
    background: #06d6a0;
    color: #f8ffe5;
}
.tile--32 {
    background: #f37694;
    color: #f8ffe5;
}
.tile--64 {
    background: #22c2d6;
    color: #f8ffe5;
}
.tile--128 {
    background: #17f8be;
    color: #f8ffe5;
}
.tile--256 {
    background: var(--yellow);
    color: #f8ffe5;
}
.tile--512 {
    background: #eb184a;
    color: #f8ffe5;
}
.tile--1024 {
    background: #14727e;
    color: #f8ffe5;
}
.tile--2048 {
    background: #05a47b;
    color: #f8ffe5;
}
.tile--pop {
    animation: pop 0.3s ease-in-out;
    animation-fill-mode: forwards;
}
.tile--shrink {
    animation: shrink 0.5s ease-in-out;
    animation-fill-mode: forwards;
}

.add {
    position: absolute;
    opacity: 0;
    left: 120%;
    top: 0;
    font-size: 1rem;
    color: #1b9aaa;
}
.add.active {
    animation: add 0.8s ease-in-out;
}

@keyframes add {
    0% {
        opacity: 1;
        top: 0;
    }
    100% {
        opacity: 0;
        top: -100%;
    }
}
@keyframes pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    90% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
@keyframes shrink {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.9;
    }
}
.end {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(85, 85, 85, 0.9);
    color: white;
    font-size: 2rem;
    transition: opacity 0.3s ease-in-out;
}
.end btn {
    margin-top: 1rem;
}
.end.active {
    opacity: 1;
    z-index: 2;
}

.monkey {
    font-size: 3rem;
    margin: 1rem 0;
}

.btn {
    font-family: inherit;
    font-size: 1rem;
    border: none;
    background: #1b9aaa;
    letter-spacing: 1px;
    color: white;
    font-weight: 300;
    padding: 0.9em 1.5em;
    border-radius: 3px;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn:hover {
    background-color: #14727e;
}
.btn:active {
    background-color: #0d4a52;
}
.btn:focus {
    box-shadow: 0 0 10px #0d4a52 inset;
    outline: none;
}

.not-recommended {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
}
.not-recommended * + * {
    margin-left: 10px;
}
.not-recommended__item + .not-recommended__annotation:before {
    font-size: 30px;
    content: "😐";
}
.not-recommended__item:hover + .not-recommended__annotation:before {
    content: "😟";
}
.not-recommended__item:focus + .not-recommended__annotation:before {
    content: "😄";
}
.not-recommended__item:active + .not-recommended__annotation:before {
    content: "😨";
}
