﻿body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    background-color: #edfbff;
    font-family: Arial, sans-serif;
    overflow: hidden; /* Hide scrollbars */
}

#game-container {
    width: 600px;
    height: 200px;
    position: relative;
    overflow: hidden; /* Keep elements inside */
    background-color: #edfbff;
    margin-top: 20px;
}

#ground {
    width: 100%;
    height: 5px;
    background-color: forestgreen;
    position: absolute;
    bottom: 0;
    left: 0;
}

#cow {
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: 0; /* Starts on the ground */
    left: 50px;
    /* Simple square - replace with image later */
    background-image: url('cow.png');
    background-size: cover;
}

/* Animation for jumping */
.jump-animation {
    animation: jump 0.5s ease-in-out;
}

@keyframes jump {
    0% { bottom: 0px; }
    50% { bottom: 100px; } /* Peak of the jump */
    100% { bottom: 0px; }
}


#obstacle {
    width: 20px;
    height: 40px;
    position: absolute;
    bottom: 0; /* Starts on the ground */
    right: -30px; /* Start off-screen */
    background-image: url('silo.png');
    background-size: cover
}

/* Animation for moving the obstacle */
.move-animation {
    animation: moveObstacle 2s linear infinite; /* Adjust duration for speed */
}

@keyframes moveObstacle {
    0% { right: -30px; } /* Start off-screen right */
    100% { right: 600px; } /* Move fully across to off-screen left */
}


#score-container {
    margin-top: 20px;
    font-size: 1.5em;
}

#message {
    margin-top: 10px;
    font-size: 1.2em;
    color: #555;
}