#espuminhaGame * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#espuminhaGame {
    display: flex;
    justify-content: center;
    align-items: center;
    image-rendering: pixelated;
}

#espuminhaGame .game-container {
    position: relative;
    width: 800px;
    height: 300px;
    margin: 0 auto;
}

#espuminhaGame #game {
    width: 800px;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient( 180deg, #87ceeb 0%, #87ceeb 60%, #90ee90 60%, #228b22 100% );
    border-bottom: 4px solid #228b22;
}

    /* Sol pixel art */
    #espuminhaGame #game::before {
        content: "";
        position: absolute;
        width: 40px;
        height: 40px;
        background-color: #ffd700;
        top: 30px;
        right: 60px;
        box-shadow: 0 0 0 4px #87ceeb, 0 0 0 8px #ffd700, 0 0 20px 10px rgba(255, 215, 0, 0.3);
        border-radius: 50%;
    }

/* Nuvens pixel art */
#espuminhaGame .cloud {
    position: absolute;
    background-color: white;
    border-radius: 4px;
    animation: moveCloud linear infinite;
}

#espuminhaGame .cloud1 {
    width: 60px;
    height: 20px;
    top: 40px;
    animation-duration: 30s;
}

#espuminhaGame .cloud2 {
    width: 40px;
    height: 15px;
    top: 70px;
    animation-duration: 25s;
}

@keyframes moveCloud {
    from

{
    left: 800px;
}

to {
    left: -100px;
}

}

#espuminhaGame #character {
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: 0;
    left: 50px;
    background-image: url("/Images/espuminha-1.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 3;
}

#espuminhaGame #obstacle {
    position: absolute;
    bottom: 0;
    left: 800px;
    image-rendering: pixelated;
    z-index: 2;
}

#espuminhaGame #obstacles-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

#espuminhaGame .obstacle {
    position: absolute;
    bottom: 0;
    left: 800px;
}

#espuminhaGame .obstacle-type-1 {
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #808080, #a9a9a9);
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

#espuminhaGame .obstacle-type-2 {
    width: 40px;
    height: 25px;
    background: linear-gradient(45deg, #8b4513, #a0522d);
    clip-path: polygon(0% 40%, 40% 0%, 100% 40%, 60% 100%, 0% 100%);
}

#espuminhaGame .obstacle-type-3 {
    width: 25px;
    height: 35px;
    background: linear-gradient(45deg, #696969, #808080);
    clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
}

#espuminhaGame .jump {
    animation: jump 0.5s linear;
}

@keyframes jump {
    0%

{
    bottom: 0;
}

50% {
    bottom: 100px;
}

100% {
    bottom: 0;
}

}

#espuminhaGame .info-panel {
    display: flex;
    justify-content: space-between;
    font-family: "Courier New", Courier, monospace;
    font-size: 18px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    color: white;
}

#espuminhaGame #game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Courier New", Courier, monospace;
    font-size: 24px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 100;
    font-weight: bold;
}

#espuminhaGame #final-score {
    font-size: 16px;
    font-weight: normal;
    display: block;
    margin: 16px 0 16px 0;
}

#game-over b,
#espuminhaGame #game-over strong {
    font-weight: bold;
}

#espuminhaGame #welcome-screen {
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px;
    border-radius: 10px;
    font-family: "Courier New", Courier, monospace;
    z-index: 200;
}

    #espuminhaGame #welcome-screen h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    #espuminhaGame #welcome-screen p {
        font-size: 18px;
        margin-bottom: 30px;
    }

    #espuminhaGame #welcome-screen button {
        padding: 10px 20px;
        font-size: 18px;
        color: white;
        background-color: #4caf50;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }

        #espuminhaGame #welcome-screen button:hover {
            background-color: #45a049;
        }

#espuminhaGame .hidden {
    display: none;
}

#espuminhaGame #trees-container {
    position: absolute;
    bottom: 40%;
    left: 0;
    width: 100%;
    height: 60%;
    pointer-events: none;
    z-index: 1;
}

#espuminhaGame .tree {
    position: absolute;
    bottom: 0;
    width: 20px;
    height: 40px;
    background-repeat: no-repeat;
    background-position: bottom;
    transition: left linear;
    opacity: 0.8;
}

#espuminhaGame .tree-1 {
    background: linear-gradient( to bottom, transparent 0%, #228b22 30%, #228b22 70%, #8b4513 70%, #8b4513 100% );
    clip-path: polygon( 50% 0%, 80% 50%, 90% 30%, 100% 100%, 0% 100%, 10% 30%, 20% 50% );
}

#espuminhaGame .tree-2 {
    background: linear-gradient( to bottom, transparent 0%, #006400 30%, #006400 80%, #8b4513 80%, #8b4513 100% );
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

#espuminhaGame .tree-3 {
    background: linear-gradient( to bottom, transparent 0%, #3cb371 20%, #3cb371 90%, #8b4513 90%, #8b4513 100% );
    clip-path: polygon(50% 0%, 90% 50%, 100% 100%, 0% 100%, 10% 50%);
}

#espuminhaGame .building {
    position: absolute;
    bottom: 0;
    width: 40px;
    height: 80px;
    background-repeat: no-repeat;
    background-position: bottom;
    transition: left linear;
    opacity: 0.7;
}

#espuminhaGame .building-1 {
    background: linear-gradient(to bottom, #708090 0%, #708090 100%);
    clip-path: polygon(0% 20%, 100% 0%, 100% 100%, 0% 100%);
}

#espuminhaGame .building-2 {
    background: linear-gradient(to bottom, #4682b4 0%, #4682b4 100%);
    height: 100px;
    clip-path: polygon(0% 0%, 100% 10%, 100% 100%, 0% 100%);
}

#espuminhaGame .building-3 {
    background: linear-gradient(to bottom, #bc8f8f 0%, #bc8f8f 100%);
    height: 50px;
    width: 50px;
    clip-path: polygon(20% 0%, 80% 0%, 100% 40%, 100% 100%, 0% 100%, 0% 40%);
}

#espuminhaGame #buildings-container {
    position: absolute;
    bottom: 45%;
    left: 0;
    width: 100%;
    height: 60%;
    pointer-events: none;
    z-index: 0;
}

#espuminhaGame #restart-button {
    padding: 10px 20px;
    font-size: 18px;
    color: white;
    background-color: #4caf50;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

    #espuminhaGame #restart-button:hover {
        background-color: #45a049;
    }
