Etta: Mushrooms 3

by whelkaholism

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Move the Mushroom Character</title>
    <style>
        body {
            margin: 0;
            overflow: hidden;
        }

        #gameArea {
            position: relative;
            width: 100vw;
            height: 100vh;
            background-color: #87CEEB; /* Light sky blue */
        }

        .apple {
            position: absolute;
            width: 30px;  /* Updated width of the apple image */
            height: 42px; /* Updated height of the apple image */
            background-image: url('https://cfront.co.uk/images/apple.png'); /* Apple image */
            background-size: cover; /* Ensure the image covers the element */
        }

        #character {
            position: absolute;
            width: 100px;   /* Fixed width */
            height: 115px;  /* Fixed height */
            background-image: url('https://cfront.co.uk/images/mushroomai.png');
            background-size: cover;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }

        #score {
            position: absolute;
            top: 20px;
            left: 20px;
            font-size: 24px;
            color: white;
            background-color: rgba(0, 0, 0, 0.5);
            padding: 10px;
            border-radius: 5px;
        }

        #challenge {
            position: absolute;
            top: 80px;
            left: 20px;
            font-size: 18px;
            color: yellow;
            background-color: rgba(0, 0, 0, 0.5);
            padding: 10px;
            border-radius: 5px;
            display: none; /* Initially hidden */
        }

        #notification {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 30px; /* Increased font size */
           ...