body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f8f9fa;
}

.container {
    margin-top: 50px;
}

input {
    padding: 10px;
    margin: 5px;
}

button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

/* Bigger Game Canvas (Responsive) */
.game-container {
    position: relative;
    width: 90vw; /* Responsive width */
    max-width: 600px;
    height: 250px;
    margin: 50px auto;
    border: 2px solid #333;
    background: url("origbig.png") no-repeat center;
    background-size: cover;
    overflow: hidden;
}

/* Monster (Starts Left) */
#monster {
    width: 100px;
    height: 100px;
    position: absolute;
    bottom: 30px;
    left: 50px; /* Starts at the left */
    background: url("monster-stay.png") no-repeat center;
    background-size: contain;
}

/* Cat (Stays Right) */
#kitty {
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: 30px;
    right: 50px; /* Cat stays still on the right */
    background: url("cat.png") no-repeat center;
    background-size: contain;
}

/* Monster running animation */
.monster-run {
    animation: moveMonster 10s linear, monsterAnimation 0.5s steps(2) infinite;
}

@keyframes moveMonster {
    from {
        left: 50px;
    }
    to {
        left: calc(100% - 150px); /* Moves toward the cat */
    }
}

/* Monster Image Switching */
@keyframes monsterAnimation {
    0% {
        background: url("monster-A.png") no-repeat center;
        background-size: contain;
    }
    50% {
        background: url("monster-B.png") no-repeat center;
        background-size: contain;
    }
    100% {
        background: url("monster-A.png") no-repeat center;
        background-size: contain;
    }
}

/* Monster eating (shaking effect) */
.monster-eat {
    left: calc(100% - 150px);
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%,
    100% {
        transform: translate(0px, 0px);
    }
    25% {
        transform: translate(2px, 2px);
    }
    50% {
        transform: translate(-2px, -2px);
    }
    75% {
        transform: translate(2px, -2px);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .game-container {
        height: 200px;
    }
    #monster,
    #kitty {
        width: 60px;
        height: 60px;
    }
}
