.div2048{
    background: linear-gradient(135deg, #f9f3e6 0%, #e8dccc 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
    border-radius: 6px;
}

.night .div2048{
    background: #181a1b;
    border: 1px solid #444;
}

.game-panel {
    background: #bbada0;
    border-radius: 6px;
    padding: 0.75rem;
    max-width: 20rem;
    box-shadow: inset 0px 0px 0 rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.1);
}

.night .game-panel{
    background-color: #444444;
}

.header2048 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0;
}

.night .header2048{
    background-color: #444;
}

.title2048 {
    font-size: 2rem;
    font-weight: 400;
    color: #eee4da;
    letter-spacing: 2px;
    line-height: 1;
}

.scores {
    display: flex;
    gap: 0.2rem;
    position: relative;
}

.score-box {
    background: #8f7a66;
    border-radius: 6px;
    padding: 0.25rem 0rem 0.25rem 0;
    text-align: center;
    box-shadow: inset 0px 0px 0px rgba(0, 0, 0, 0.2), 0 2px 0 #5e4b38;
    width: 4rem;
    position: relative;
    overflow: hidden;
}

.night .score-box{
    background-color: #333;
    box-shadow: inset 0px 0px 0px rgba(0, 0, 0, 0.2), 0 2px 0 #222;
}

.score-label {
    font-size: 0.65rem;
    line-height: 1;
    font-weight: 400;
    color: #eee4da;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.score-value {
    font-size: 0.75rem;
    font-weight: 400;
    color: #ffffff;
    line-height: 1;
    margin-top: 0.25rem;
    text-shadow: 1px 1px 0 #5e4b38;
}

.score-addition {
    position: absolute;
    right: 20px;
    top: 25px;
    color: #ed5565;
    font-size: 22px;
    font-weight: bold;
    z-index: 100;
    pointer-events: none;
    animation: move-up 0.5s ease-out forwards;
}

@keyframes move-up {
    0% { top: 25px; opacity: 1; transform: translateY(0); }
    100% { top: -30px; opacity: 0; transform: translateY(-10px); }
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    background-color: #cdc1b4;
    border-radius: 6px;
    box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    width: 100%;
    height: auto;
    touch-action: none;
}

@media (max-width: 550px) {
    .title2048{
        font-size: 1.6rem;
    }
    .header2048 {
        margin-bottom: 0.5rem;
    }
    .game-panel{
        padding: 0.5rem;
    }
}

@media (max-width: 450px) {
    .div2048{
        padding: 0;
    }
    .game-panel {
        max-width: 100%;
    }
}

@media (max-width: 320px) {
    .title2048 {
        font-size: 1.2rem;
    }
    .score-box{
        box-shadow: none;
    }
    .score-label{
        display: none;
    }
    .score-value {
        font-size:0.6rem;
        margin-top: 0;
    }
}