/* 2048 Game CSS */
body {
    background: #faf8ef;
    color: #776e65;
    font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
}

h2 {
    text-align: center;
    margin-top: 20px;
}

.game-container {
    width: 400px;
    margin: 50px auto;
    position: relative;
    background: #bbada0;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
}

.grid-container {
    display: grid; /* Utiliser une grille */
    grid-template-columns: repeat(4, 1fr); /* 4 colonnes égales */
    grid-template-rows: repeat(4, 1fr); /* 4 lignes égales */
    gap: 10px; /* Espacement entre les cases */
    background: #bbada0;
    border-radius: 6px;
    padding: 10px;
    position: relative;
    margin-bottom: 20px;
}

.grid-cell {
    background: rgba(238, 228, 218, 0.35);
    border-radius: 3px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    line-height: 80px; /* Centrer verticalement */
    height: 80px; /* Hauteur fixe pour chaque case */
    width: 80px; /* Largeur fixe pour chaque case */
    color: #776e65;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

.tile-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.score-container {
    text-align: center;
    margin-bottom: 10px;
}

.score-container .score,
.score-container .best-container {
    background: #bbada0;
    border-radius: 3px;
    padding: 10px;
    margin: 0 5px;
    display: inline-block;
}
.tile {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #eee4da;
    border-radius: 3px;
    font-size: 24px;
    font-weight: bold;
    line-height: 80px;
    text-align: center;
    transition: transform 0.2s ease-in-out; /* Animation pour les mouvements */
}

.tile-new {
    animation: pop 0.3s;
}

@keyframes pop {
    0% {
        transform: scale(0.5);
    }
    100% {
        transform: scale(1);
    }
}

