* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #faf8ef;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 500px;
    width: 100%;
}

h1 {
    font-size: 48px;
    color: #776e65;
    margin-bottom: 20px;
}

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

.score-container {
    background: #bbada0;
    padding: 10px 20px;
    border-radius: 6px;
    color: white;
    font-size: 18px;
}

.cheat-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#cheat-button {
    background: #bbada0;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

#cheat-button.active {
    background: #8f7a66;
}

#hint-text {
    color: #776e65;
    font-size: 16px;
    font-weight: bold;
    min-height: 20px;
}

#new-game {
    background: #8f7a66;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

#new-game:hover {
    background: #7f6a56;
}

.game-container {
    background: #bbada0;
    padding: 15px;
    border-radius: 6px;
    width: 430px;
    margin: 0 auto;
    box-sizing: border-box;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.grid-cell {
    width: 100%;
    height: 100%;
    background: rgba(238, 228, 218, 0.35);
    border-radius: 3px;
    box-sizing: border-box;
}

.tile {
    position: absolute;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    font-weight: bold;
    transition: all 0.15s ease;
    width: 88.75px;
    /* (400px - 3 * 15px) / 4 */
    height: 88.75px;
    box-sizing: border-box;
}

/* 不同数字的背景色 */
.tile-2 {
    background: #eee4da;
}

.tile-4 {
    background: #ede0c8;
}

.tile-8 {
    background: #f2b179;
    color: white;
}

.tile-16 {
    background: #f59563;
    color: white;
}

.tile-32 {
    background: #f67c5f;
    color: white;
}

.tile-64 {
    background: #f65e3b;
    color: white;
}

.tile-128 {
    background: #edcf72;
    color: white;
    font-size: 30px;
}

.tile-256 {
    background: #edcc61;
    color: white;
    font-size: 30px;
}

.tile-512 {
    background: #edc850;
    color: white;
    font-size: 30px;
}

.tile-1024 {
    background: #edc53f;
    color: white;
    font-size: 25px;
}

.tile-2048 {
    background: #edc22e;
    color: white;
    font-size: 25px;
}

.difficulty-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#hell-mode {
    background: #bbada0;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

#hell-mode.active {
    background: #ff4d4d;
}