body{
    margin-bottom:0px !important;
}

.pixel-game {
    max-width: 1170px;
    width: 100%;
    position: relative;
    padding: 10px 10px 100px 10px; 
    min-height: 350px;
    overflow: hidden;
}

.pixel-game .word {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.pixel-game .letter {
    display: grid;
    gap: 12px;
}

.pixel-game .letter.completed .pixel.active {
    animation: letterPop 0.6s ease;
}

@keyframes letterPop {

    0%,
    100% {
        transform: scale(1.05);
    }

    50% {
        transform: scale(1.2);
    }
}

.pixel-game .pixel {
    width: var(--pixel-size);
    height: var(--pixel-size);
    background: #DADADA;
    border-radius: 4px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pixel-game .pixel.active {
    background: linear-gradient(135deg, #2d5bff, #00c2c2);
    transform: scale(1.05);
}

.pixel-game .pixel.magnet {
    background: #b9c6ff;
    transform: scale(1.05);
}

.floating-blocks {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.pixel-game .block {
    width: var(--pixel-size);
    height: var(--pixel-size);
    position: absolute;
    background: linear-gradient(135deg, #2d5bff, #00c2c2);
    cursor: grab;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(45, 91, 255, 0.35);
    z-index: 10;
    pointer-events: auto;
    touch-action: none;
}

.pixel-game .block.dragging {
    cursor: grabbing;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(45, 91, 255, 0.5);
    transform: scale(1.1);
}

.pixel-game .trail {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(45, 91, 255, 0.5), transparent);
    animation: trailFade 0.5s linear forwards;
    z-index: 5;
}

@keyframes trailFade {
    to {
        opacity: 0;
        transform: scale(2.5);
    }
}

.progress-bar {
    text-align: center;
    margin-top: 32px;
    font-size: 13px;
    color: #bbb;
    letter-spacing: 1px;
    display: none;
}

.progress-bar.done {
    color: #2d5bff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 2px;
}

.sparkle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 50;
    animation: sparkleBurst 0.7s ease forwards;
}

@keyframes sparkleBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(0);
    }
}

/* DESKTOP */

:root {
    --pixel-size: 35px;
}

/* TABLET */

@media (max-width: 991px) {

    :root {
        --pixel-size: 26px;
    }

    .pixel-game {
        padding-top: 70px;
        min-height: 300px;
    }

    .pixel-game .word {
        justify-content: center;
        gap: 14px;
    }

    .pixel-game .letter {
        gap: 8px;
    }
}

/* MOBILE */

@media (max-width: 767px) {

    :root {
        --pixel-size: 18px;
    }

    .pixel-game {
        padding-top: 50px;
        min-height: 220px;
    }

    .pixel-game .word {
        justify-content: center;
        gap: 10px;
    }

    .pixel-game .letter {
        gap: 5px;
    }
}

/* SMALL MOBILE */

@media (max-width: 480px) {

    :root {
        --pixel-size: 14px;
    }

    .pixel-game .word {
        gap: 8px;
    }

    .pixel-game .letter {
        gap: 4px;
    }

    .pixel-game {
        min-height: 180px;
    }
}