/* 2048游戏样式 */
.game-2048-container {
    padding: 15px;
    background: #C0C0C0;
    position: relative;
    font-family: "Arial", sans-serif;
}

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

.game-2048-title {
    font-size: 48px;
    font-weight: bold;
    color: #776e65;
    margin: 0;
}

.game-2048-scores {
    display: flex;
    gap: 10px;
}

.score-container {
    background: #bbada0;
    padding: 8px 12px;
    border-radius: 4px;
    color: white;
    text-align: center;
    min-width: 60px;
}

.score-label {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.score-value {
    font-size: 18px;
    font-weight: bold;
}

.game-2048-instructions {
    color: #776e65;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.game-2048-board {
    background: #bbada0;
    border-radius: 6px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    position: relative;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.game-2048-board:active {
    cursor: grabbing;
}

.tile {
    background: rgba(238, 228, 218, 0.35);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: #776e65;
    transition: all 0.15s ease-in-out;
}

/* 数字方块样式 */
.tile-2 {
    background: #eee4da;
    color: #776e65;
}

.tile-4 {
    background: #ede0c8;
    color: #776e65;
}

.tile-8 {
    background: #f2b179;
    color: #f9f6f2;
    font-size: 30px;
}

.tile-16 {
    background: #f59563;
    color: #f9f6f2;
    font-size: 30px;
}

.tile-32 {
    background: #f67c5f;
    color: #f9f6f2;
    font-size: 30px;
}

.tile-64 {
    background: #f65e3b;
    color: #f9f6f2;
    font-size: 28px;
}

.tile-128 {
    background: #edcf72;
    color: #f9f6f2;
    font-size: 26px;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.2);
}

.tile-256 {
    background: #edcc61;
    color: #f9f6f2;
    font-size: 26px;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.31);
}

.tile-512 {
    background: #edc850;
    color: #f9f6f2;
    font-size: 26px;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.39);
}

.tile-1024 {
    background: #edc53f;
    color: #f9f6f2;
    font-size: 22px;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.47);
}

.tile-2048 {
    background: #edc22e;
    color: #f9f6f2;
    font-size: 22px;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.55);
}

/* 更高数字的样式 */
.tile-4096 {
    background: #3c3a32;
    color: #f9f6f2;
    font-size: 20px;
}

.tile-8192 {
    background: #3c3a32;
    color: #f9f6f2;
    font-size: 18px;
}

.game-2048-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.game-2048-button {
    background: #8f7a66;
    color: #f9f6f2;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.game-2048-button:hover {
    background: #9f8a76;
}

.game-2048-button:active {
    background: #7f6a56;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .game-2048-container {
        padding: 10px;
    }
    
    .game-2048-title {
        font-size: 36px;
    }
    
    .game-2048-board {
        width: 240px;
        height: 240px;
        gap: 8px;
        padding: 8px;
    }
    
    .tile {
        font-size: 28px;
    }
    
    .tile-8, .tile-16, .tile-32 {
        font-size: 26px;
    }
    
    .tile-64 {
        font-size: 24px;
    }
    
    .tile-128, .tile-256, .tile-512 {
        font-size: 22px;
    }
    
    .tile-1024, .tile-2048 {
        font-size: 18px;
    }
    
    .tile-4096, .tile-8192 {
        font-size: 16px;
    }
}

/* 游戏说明文字 */
.game-2048-help {
    color: #776e65;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    line-height: 1.3;
}

/* 动画效果 */
@keyframes tile-appear {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

.tile-new {
    animation: tile-appear 0.2s ease-in-out;
}

@keyframes tile-merge {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.tile-merged {
    animation: tile-merge 0.2s ease-in-out;
}
