
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: lightblue;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;

}

#world {
    position: absolute;
    width: 5000px;
    height: 100%;
    left: 0;
    top: 0;
}

#gamearea {
    width: 100%;
    height: 100%;
    background: lightblue;
    position: relative;
    padding: 5%;
}

.heroContainer {
    position: absolute;
    left: 50px;
    bottom: 110px;
    width: 180px;
    animation: respawn 1s ease-in-out;
    
}


.hero {
    width: 60px;
    height: 110px;
    position: absolute;
    left: 110px;
    bottom: 45px;
    z-index: 1000;
    animation: breathe 1.5s infinite ease-in-out;
    overflow: visible;
    
}
.hit *{
    background-color: red;
    animation: flash 0.5s ease-in-out;
    opacity : 0.7;
}
.hitbox{
    position:absolute;
    width:60%;
    height:70%;
    top:15%;
    left:20%;
}

@keyframes flash {
    0%
{
        transform:scale(1);
        background-color: red;
}

    50% {
        transform:scale(1.1);
        background-color: darkred;
    }
    100%{
        transform:scale(1);
        background-color: red;
    }
    
}

.hud {
    width: 100%;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    justify-content: space-around;
    font-size: 3rem;
    display: flex;
    color: white;
    font-weight: 500;
}



@keyframes breathe {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

/* Head*/
.hero .head {
    width: 35px;
    height: 35px;
    background-color: #ffaf64;
    position: absolute;
    border-radius: 50%;
    top: 0;
    border: 1px solid black;
    outline: 2px solid #000;
    outline-offset: -2px;
}

.hero .cap {
    width: 44px;
    height: 10px;
    background-color: darkorange;
    position: absolute;
    left: 1px;
    border: 1px solid black;
    border-bottom-right-radius: 100%;
    border-top-right-radius: 100%;
    outline: 2px solid #000;
    outline-offset: -2px;
}

.hero .eyes {
    width: 35px;
    height: 10px;
    position: absolute;
    top: 12px;
    left: 5px;
    display: flex;
    justify-content: space-around;

}

.hero .eyes div {
    width: 6px;
    height: 6px;
    background-color: black;
    border-radius: 50%;
}

.hero .pupil {
    width: 35px;
    height: 10px;
    position: absolute;
    top: 13px;
    left: 5px;
    display: flex;
    justify-content: space-around;
}

.hero .pupil div {
    width: 2px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
}

.hero .body {
    width: 40px;
    height: 40px;
    background-color: rgb(255, 111, 0);
    position: absolute;
    top: 35px;
    right: 20px;
    border-radius: 5px;
    border: 1px solid black;
    outline: 2px solid #000;
    outline-offset: -2px;
}

.hero .mouth {
    width: 10px;
    height: 3px;
    background-color: black;
    position: absolute;
    top: 25px;
    left: 16px;
    outline: 2px solid #000;
    outline-offset: -2px;
}

.backpack {
    width: 28px;
    height: 50px;
    background-color: #ff0000;
    border: solid black 1px;
    border-radius: 4px;
    position: absolute;
    top: 30px;
    right: 60px;
    outline: 2px solid #000;
    outline-offset: -2px;

    z-index: -1;
}

.cirkel1 {
    width: 20px;
    height: 20px;
    background-color: #333;
    border-radius: 50%;
    position: relative;
}

.cirkel2 {
    width: 13px;
    height: 13px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    bottom: 33px;
    right: 10px;
}

.cirkel3 {
    width: 8px;
    height: 8px;
    background-color: #ff0000;
    border-radius: 50%;
    position: absolute;
    bottom: 35px;
    left: 10px;

}

.left-leg {
    background-color: #737373;
    width: 15px;
    height: 45px;
    border-radius: 5px;
    position: absolute;
    top: 70px;
    left: 10px;
    outline: 2px solid #000;
    outline-offset: -2px;
}

.left-foot {
    width: 15px;
    height: 15px;
    background-color: #000;
    border-radius: 0px 50% 50% 0px;
    position: absolute;
    top: 40px;
    outline: 2px solid #000;
    outline-offset: -2px;

    transform: rotate(90deg);
}

.hero .left-arm {
    background-color: #ffaf64;
    width: 10px;
    height: 30px;
    border: solid black 1px;
    border-radius: 4px;
    position: absolute;
    left: 35px;
    bottom: 55px;
    outline: 2px solid #000;
    outline-offset: -2px;
    transform: rotate(-120deg);
}

.hero .right-arm {
    background-color: #ffaf64;
    width: 10px;
    height: 30px;
    border: solid black 1px;
    border-radius: 4px;
    position: absolute;
    left: 50px;
    bottom: 60px;
    top: 30px;
    outline: 2px solid #000;
    outline-offset: -2px;
    transform: rotate(-110deg);
}

.scooter {
    position: absolute;
    width: 120px;
    height: 60px;
    left: 63px;
    bottom: 20px;
    z-index: 1;
    animation: scooterIdle 1.5s infinite ease-in-out
}

@keyframes scooterIdle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}


.scooter .wheel {
    width: 26px;
    height: 26px;
    background-color: #222;
    border-radius: 50%;
    position: absolute;
    bottom: 10px;
    outline: 3px solid black;
    outline-offset: -3px;
    animation: rounding 1.5s infinite ease-in-out
}

@keyframes rounding {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}


.scooter .back-wheel {
    left: 30px;
}

.scooter .front-wheel {
    right: 15px;
}

.scooter .body {
    width: 100px;
    height: 35px;
    position: absolute;
    left: 23px;
    background-color: #f7c851;
    border-radius: 30px 30px 10px 10px;
    outline: 3px solid black;
    outline-offset: -3px;

}

.scooter .seat {
    width: 50px;
    height: 15px;
    background-color: #333;
    position: absolute;
    bottom: 50px;
    left: 35px;
    border-radius: 30px;
    outline: 3px solid black;
    outline-offset: -3px;
}

.scooter .handlebar-stem {
    width: 25px;
    height: 70px;
    background-color: #f7c851;
    position: absolute;
    left: 110px;
    bottom: 20px;
    border-radius: 0px 0px 50% 0px;
    outline: 3px solid black;
    outline-offset: -3px;
}

.scooter .handle-right,
.scooter .handle-left {
    width: 15px;
    height: 6px;
    background-color: #333;
    position: absolute;
    bottom: 95px;
    border-radius: 50px;
    outline: 3px solid black;
    outline-offset: -3px;
}

.scooter .handle-right {
    left: 115px;
}

.scooter .handle-left {
    left: 95px;
}

.street {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 500000000000px;
    padding-right: 100%;
    height: 150px;
    background-color: #555;
    border-top: 5px solid #ffd700;
}

#gameover {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0, 0, 0, 0.8);
    color: white;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    animation: fadeIn 0.3s ease-in-out;
    z-index: 999;
}

@keyframes fadeIn {

    0%,
    50% {
        opacity: 0;
        ;
    }

    100% {
        opacity: 5;
    }
}

#gameover button {
    margin-top: 30px;
    padding: 10px 20px;
    font-size: 40px;
    background: rgb(255, 0, 0);
    color: white;
    border-radius: 50px;
    border: 5px solid black;
    text-shadow: 2px 2px black;
    cursor: pointer;
    z-index:999;
}

.obstacles {
    position: absolute;
    left: 700px;
    bottom: 100%;
    background-color: #333;
    border-radius: 30px;
    width: 100px;
    height: 140px;
    z-index: 999;
    outline: 5px solid black;
    outline-offset: -3px;


}

.cirkel {
    position: absolute;
    left: 0;
    top:0px;
    bottom:20px;
    background: #ffffff;
    border-radius: 50%;
    width: 100px;
    height: 50px;
    z-index: 100;
    outline: 5px solid black;
    outline-offset: -3px;
}

.cirkel::before{
    content: '';
    position: absolute;
    left: 35px;
    bottom: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ff0000;
}

.order-style {
    width: 50px;
    height: 50px;
    position: absolute;
    background-color: rgb(0, 0, 0);
    display: none;
    box-shadow: 1px 10px 50px 1px yellow;
    border-radius: 20px;
}
.order-style::after{
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgb(255, 145, 0);
    border-radius: 50%;
}
.order-container {
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 999;
}

#huis-container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 0; /* Achter alles */
    pointer-events: none;
}

.huizen {
    position: absolute;
    top: 0;
    top:33px;
    width:100px;
    height:100px;
    display: none;
    z-index: 999;

/* BELANGRIJK */
transform: none;
}

.dak {
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 40px solid rgba(255, 255, 255);
    position: absolute;
    bottom:100px;
    right:0px;
    left:0;
}

.body-huis {
    position: absolute;
    top: 0;
    width: 100px;
    height: 100px;
    background-color: #000000;
}

.deur {
    width: 30px;
    height: 60px;
    background-color: rgb(255, 106, 0);
    position: absolute;
    left: 35px;
    bottom: 0px;
}
.obstacles2 {
    position: relative;
    width: 100%;
    height: 100vh;
    

}
.spike {
    position: absolute;
    top: -50px;
    left: 100px;
    width: 0px;
    height: 0px;
     border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid rgb(0, 0, 0);
    display:none;
}
.spike2 {
    position: absolute;
    top: -50px;
    left: 140px;
    width: 0px;
    height: 0px;
     border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid rgb(0, 0, 0);

}
.spike3 {
    position: absolute;
    top: -50px;
    left: 180px;
    width: 0px;
    height: 0px;
     border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid rgb(0, 0, 0);

}
.debug-spike{
    position: fixed;
    left:700px;
}
#speed-btn{

    width: 200px;
    height:200px;
    background-color:#6b6b6b;
    position: fixed;
    left:80%;
    bottom:250px;
    z-index: 1000;
    border-radius: 50%;
    cursor:pointer;
    border:#fff200 solid 5px;
    
    
}
#speed-btn img{
    width: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 50%;

    
    
}
#speed-btn h1{
font-size: 2.1rem;
font-weight: 600;
line-height: 1.1;
}
.win{
     position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0, 0, 0, 0.8);
    color: white;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    animation: fadeIn 0.3s ease-in-out;
    z-index: 999;
    font-family: "Pixelify sans";

}
#restart-btn {
   background: rgba(255,0,0,0.5);
   margin-top: 20px;
   padding:10px 20px;
   font-size:1.8rem;
    border-radius: 50px;
    border: 5px solid black;
    text-shadow: 2px 2px black;
    cursor: pointer;
}


