.game-container-2048 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    user-select: none;
    touch-action: none;
}

.header-2048 {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 1rem;
    align-items: center;
}

.score-container {
    background: #bbada0;
    padding: 5px 15px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    text-align: center;
}

.score-title {
    color: #eee4da;
    text-transform: uppercase;
}

.game-2048 .grid-2048 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 0;
    background: #332f60;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    box-sizing: border-box;
}

.game-2048 .grid-cell-bg {
    background: rgba(255, 255, 255, 0.2);
    width: 100%;
    height: 100%;
    outline: solid 3px #332f60;
    outline-offset: -3px;
    border-radius: 6px;
    box-shadow: 0 0 0 1px #332f60;
}

.game-2048 .tile-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    pointer-events: none;
}

.game-2048 .tile {
    position: absolute;
    width: calc(100% / 4);
    height: calc(100% / 4);
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 30px;
    transition: left 0.15s ease-in-out, top 0.15s ease-in-out, transform 0.1s;
    will-change: left, top, transform;
    z-index: 10;
    border: solid 3px transparent;
    box-sizing: border-box;
}

.game-2048 .tile[data-merged="true"] {
    z-index: 5;
}

.game-2048 .tile-inner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 3px;
    color: #ffffff;
}

/* Csempe színek – JAVÍTOTT szelektorok */
.game-2048 .tile-2 .tile-inner {
    background: #c45bd1;
}

.game-2048 .tile-4 .tile-inner {
    background: #5bc0f8;
}

.game-2048 .tile-8 .tile-inner {
    background: #32d1c0;
}

.game-2048 .tile-16 .tile-inner {
    background: #7adf58;
}

.game-2048 .tile-32 .tile-inner {
    background: #f76c4e;
}

.game-2048 .tile-64 .tile-inner {
    background: #8064f0;
}

.game-2048 .tile-128 .tile-inner {
    background: #b8b2ac;
}

.game-2048 .tile-256 .tile-inner {
    background: #f2ad3d;
}

.game-2048 .tile-512 .tile-inner {
    background: #4bc96b;
}

.game-2048 .tile-1024 .tile-inner {
    background: #8da4ff;
}

.game-2048 .tile-2048 .tile-inner {
    background: #d1439f;
}

.game-2048 .tile-super .tile-inner {
    background: #444444;
}

.game-2048 .tile.new-tile {
    animation: pop 0.2s ease-in;
}

.game-2048 .tile.merged-tile {
    animation: pop 0.2s ease-in;
    z-index: 20;
}

@keyframes pop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}