#game {
    width: 600px;
    height: 600px;
    margin: 20px auto;
    background-color: #383434;
    position: relative;
}

.snake {
    position: absolute;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.snake::before {
    content: "";
    position: absolute;          /* 🔥 labai svarbu */
    width: 16px;          /* 🔥 siauresnis nei cell */
    height: 16px;
    background: linear-gradient(180deg, #32cd32, #228b22);
    border-radius: 6px;
    box-shadow: 0 0 4px rgba(0,255,0,0.5);
}

.snake::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 10px;
    background: rgba(0,0,0,0.2);
}

.snake.head {
    background: radial-gradient(circle at 30% 30%, #00ffcc, #008f7a);
    border-radius: 5px;
    box-shadow: 0 0 10px #00ffcc;
}


.snake.head::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    background: black;
    border-radius: 50%;
    left: 5px;
    top: 6px;
    box-shadow: 6px 0 black; /* antra akis */
}



.food {
    position: absolute;
    width: 20px;
    height: 20px;
    /* background: red; */
}


/* .snake.hit {
    background: red;
    animation: hitFlash 0.4s ease-in-out infinite alternate;
} */

.snake.hit::before {
    animation: hitFlash 0.4s ease-in-out infinite alternate;
}

@keyframes hitFlash {
    0%   { transform: scale(1);   box-shadow: 0 0 5px red; }
    100% { transform: scale(1.3); box-shadow: 0 0 20px red; }
}

.snake.hit::after {
    content: "💥";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 20px;
}

/*
Žaidimo pavadinimas: "Ėsk pelę" (arba "Snake", jei norite tarptautinio varianto)
*/
/*
.game-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;

    color: #00ffcc;

    text-shadow:
        0 0 5px #00ffcc,
        0 0 10px #00ffcc,
        0 0 20px #00ffcc,
        0 0 40px #00ffaa;

    animation: glowPulse 1.5s ease-in-out infinite alternate;
}
*/


.game-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;

    background: linear-gradient(90deg, #00ffcc, #00ffaa, #00ffcc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow:
        0 0 10px rgba(0,255,200,0.8),
        0 0 20px rgba(0,255,200,0.6);

    animation: glowPulse 1.5s ease-in-out infinite alternate;
}



@keyframes glowPulse {
    0% {
        text-shadow:
            0 0 5px #00ffcc,
            0 0 10px #00ffcc,
            0 0 20px #00ffcc;
    }
    100% {
        text-shadow:
            0 0 10px #00ffcc,
            0 0 20px #00ffcc,
            0 0 40px #00ffaa,
            0 0 60px #00ffaa;
    }
}


