body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
}

canvas {
    border: 1px solid #fff;
    background: url('snake_background.png') no-repeat center center; /* Ensure the image path is correct */
    background-size: cover;
    width: 100%;
    height: auto;
}

#gameContainer {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 400px;
}

#info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 420px;
    margin-bottom: 10px;
    font-size: 16px;
}

#startOver {
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
}

#startOver:hover {
    background-color: #555;
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.hidden {
    display: none;
}

#instructions {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

#controls {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    margin: 5px;
}

#touchControls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

#arrowButtons {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#arrowButtons > div {
    display: flex;
    justify-content: center;
    width: 100%;
}

.arrow {
    width: 50px;
    height: 50px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background-color: #555;
}

@keyframes scaleUp {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(1);
    }
}
