* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {

    min-height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;

    background:
    linear-gradient(
        135deg,
        #667eea,
        #764ba2
    );

    font-family:
    "Microsoft YaHei",
    sans-serif;

}


/* 游戏主体 */

.game-container {

    width:420px;

    background:
    rgba(255,255,255,0.18);

    backdrop-filter:blur(12px);

    padding:30px;

    border-radius:30px;

    box-shadow:
    0 25px 50px rgba(0,0,0,.25);

    text-align:center;

}



/* 标题 */

h1 {

    font-size:65px;

    color:white;

    letter-spacing:3px;

}



/* 分数 */

.score {

    color:white;

    font-size:24px;

    margin:10px 0 25px;

}



/* 棋盘 */

.board {

    width:360px;

    height:360px;

    background:#bbada0;

    border-radius:18px;

    padding:10px;

    display:grid;


    grid-template-columns:
    repeat(4,1fr);


    grid-template-rows:
    repeat(4,1fr);


    gap:10px;

}



/* 空格 */

.cell {


    background:#cdc1b4;


    border-radius:12px;


    display:flex;

    justify-content:center;

    align-items:center;


    font-size:38px;

    font-weight:bold;


    color:#776e65;


    transition:.15s;


}



/* 数字动画 */

.cell:not(:empty){

    animation:
    pop .15s ease;

}



@keyframes pop{

    0%{

        transform:scale(.5);

    }


    100%{

        transform:scale(1);

    }

}



/* 按钮区域 */

.controls{

    margin-top:25px;

}



button{

    border:none;

    cursor:pointer;

}



.controls button{


    width:65px;

    height:50px;


    margin:5px;


    font-size:28px;


    border-radius:15px;


    background:white;


    box-shadow:
    0 5px 10px rgba(0,0,0,.15);


}



.controls button:hover{

    transform:translateY(-3px);

}



/* 重开按钮 */

.restart{


    margin-top:20px;


    padding:12px 35px;


    border-radius:25px;


    font-size:18px;


    background:#ffcc70;


    box-shadow:
    0 5px 15px rgba(0,0,0,0.2);

}



/* 手机适配 */

@media(max-width:500px){


    .game-container{

        width:95%;

        padding:20px;

    }


    .board{

        width:90vw;

        height:90vw;

    }

}
/* 2048数字颜色 */

.tile-2 {
    background:#eee4da;
    color:#776e65;
}


.tile-4 {
    background:#ede0c8;
    color:#776e65;
}


.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;
}


.tile-256 {
    background:#edcc61;
    color:white;
}


.tile-512 {
    background:#edc850;
    color:white;
}


.tile-1024 {
    background:#edc53f;
    color:white;
}


.tile-2048 {
    background:#edc22e;
    color:white;
}