/* style.css */
body {
    font-family: 'Inter', sans-serif;
    /* background-color: #faf8ef; */
    color: #776e65;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

.game-container {
    width: 400px;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 60px;
    margin: 0;
}

.score-container {
    background: #bbada0;
    padding: 10px 20px;
    border-radius: 6px;
    text-align: center;
    color: white;
}

.score-title {
    font-size: 13px;
    text-transform: uppercase;
    font-weight: bold;
}

#score {
    font-size: 25px;
    font-weight: bold;
}

.grid-container {
    background: #bbada0;
    border-radius: 6px;
    width: 400px;
    height: 400px;
    padding: 10px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    position: relative;
}

.grid-cell {
    background: rgba(238, 228, 218, 0.35);
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    font-weight: bold;
    color: transparent;
    transition: all 0.15s ease-in-out;
}

.grid-cell[data-val="0"] { background: rgba(238, 228, 218, 0.35); color: transparent; }
.grid-cell[data-val="2"] { background: #eee4da; color: #776e65; }
.grid-cell[data-val="4"] { background: #ede0c8; color: #776e65; }
.grid-cell[data-val="8"] { background: #f2b179; color: #f9f6f2; }
.grid-cell[data-val="16"] { background: #f59563; color: #f9f6f2; }
.grid-cell[data-val="32"] { background: #f67c5f; color: #f9f6f2; }
.grid-cell[data-val="64"] { background: #f65e3b; color: #f9f6f2; }
.grid-cell[data-val="128"] { background: #edcf72; color: #f9f6f2; font-size: 30px; }
.grid-cell[data-val="256"] { background: #edcc61; color: #f9f6f2; font-size: 30px; }
.grid-cell[data-val="512"] { background: #edc850; color: #f9f6f2; font-size: 30px; }
.grid-cell[data-val="1024"] { background: #edc53f; color: #f9f6f2; font-size: 25px; }
.grid-cell[data-val="2048"] { background: #edc22e; color: #f9f6f2; font-size: 25px; }

.game-message {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(238, 228, 218, 0.73);
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 6px;
    margin-top: 100px;
}

.game-message p {
    font-size: 60px;
    font-weight: bold;
    margin-bottom: 20px;
}

.retry-button {
    background: #8f7a66;
    border-radius: 3px;
    padding: 10px 20px;
    color: #f9f6f2;
    border: none;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
}
.retry-button:hover {
    background: #9f8b77;
}

@media (max-width: 450px) {
    .game-container {
        width: 300px;
    }
    .grid-container {
        width: 300px;
        height: 300px;
    }
    .grid-cell {
        font-size: 25px;
    }
    h1 {
        font-size: 40px;
    }
}
