@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: "Press Start 2P", cursive;
}

canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    background-image: url('background.png');
    background-repeat: repeat-x;
    background-size: auto 100%; /* Breite bleibt normal, Höhe passt sich an */
    background-position: top;
    height: 100vh;
    overflow: hidden;
    animation: moveBackground 10s linear infinite;
}

@keyframes moveBackground {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -50% 0;
    }
}

#gameOverScreen {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
}

button {
    background: #2ed147;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 10px;
    border-radius: 5px;
}

button:hover {
    background: #25ad39;
}
