body {
    display: flex;
    height: 100vh;
    margin: 0;
    background-color: #bbb;
}

.room {
    position: relative;
    width: 80vw;
    height: 80vh;
    margin: auto;
    overflow: hidden;
    background-color: #ddd;
    border: 4px solid black;
}

.ball {
    position: absolute;
    bottom: 20%;
    left: 15%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: cadetblue;
    /* animation: fly-ball-x 2s cubic-bezier(0.17, 0.67, 0.6, 1),
        fly-ball-y 2s linear; */
}

.column {
    position: absolute;
    bottom: 0;
    left: 15%;
    border-bottom: calc(0.2 * 80vh) solid green;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
}

.spring {
    position: absolute;
    left: -3%;
    bottom: calc(20% + 15px);
    width: 17%;
    height: 20px;
    background-color: burlywood;
    /* animation: spring 1.5s infinite alternate paused, */
       
}

.panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40vw;
}

.btn-action {
    display: block;
    width: 100%;
    border: none;
    background-color: brown;
    color: white;
    font-size: 20px;
    text-transform: uppercase;
    font-family: arial;
    line-height: 250%;
    user-select: none;
    cursor: pointer;
    transition: background-color 0.3s linear;
}

@media (max-width: 800px) {
    .panel {
        width: auto;
        left: 20px;
    }
}

.btn-action:hover {
    background-color: cadetblue;
}

.bar {
    height: 30px;
    margin-top: 30px;
    box-shadow: 0 0 3px 0 darkred;
}

.fill {
    width: 5%;
    height: 100%;
    background-color: darkred;
    animation-name: fill;
    animation-duration: 1.5s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: ease-out;
    animation-play-state: paused;
}

:root {
    --spring-left: 0;
    --power-x: 0;
}

@keyframes fill {
    100% {
        width: 100%;
    }
}

@keyframes spring {
    100% {
        left: -14%;
    }
}

@keyframes release-spring {
    0% {
        left: var(--spring-left, -14%);
    }
    100% {
        left: -1%;
    }
}

@keyframes fly-ball-x {
    100% {
        left: var(--power-x, 300px);
    }
}

@keyframes fly-ball-y {
    100% {
        bottom: 0;
    }
}
