body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif; 
    background-image: radial-gradient(#104069,#000000);

}

.game-container {
    background: #bbada0;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.score-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2vw;
    font-size: 4vw;
    font-weight: bold;
    color: #ffffff;
}
#board {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    grid-template-rows: repeat(4, 100px);
    gap: 10px;
}

.tile {
    width: 100px;
    height: 100px;
    background: #cdc1b4;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #776e65;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.tile[data-value="2"] { background: #eee4da; }
.tile[data-value="4"] { background: #ede0c8; }
.tile[data-value="8"] { background: #f2b179; color: #f9f6f2; }
.tile[data-value="16"] { background: #f59563; color: #f9f6f2; }
.tile[data-value="32"] { background: #f67c5f; color: #f9f6f2; }
.tile[data-value="64"] { background: #f65e3b; color: #f9f6f2; }
.tile[data-value="128"] { background: #edcf72; color: #f9f6f2; }
.tile[data-value="256"] { background: #edcc61; color: #f9f6f2; }
.tile[data-value="512"] { background: #edc850; color: #f9f6f2; }
.tile[data-value="1024"] { background: #edc53f; color: #f9f6f2; }
.tile[data-value="2048"] { background: #edc22e; color: #f9f6f2; }

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.popup.show {
    visibility: visible;
    opacity: 1;
}

button {
    padding: 10px 20px;
    margin-top: 10px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background: #8f7a66;
    color: #fff;
}

button:hover {
    background: #9c8b7a;
}

#exit{
    background-color: red;
}
.exit{
    display: flex;
    align-items: center;
    width: 400px;
    margin-left: calc(100% - 67%);
    text-decoration: none;
    display: block;
}
.exit button{
    background: red;
    width: 40%;
}