* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --black: #1e1e1e;
    --sand: #FFECC5;
    --rose: #E77658;
    --light-rose: #F1C1B4;
    --yellow: #F2BC41;
    --green: #009D5C;
    --light-green: #9CD9BA;
    --blue: #6BA6D6;
    --light-blue: #C2D2DF;
}

.level-style {
    background-color: var(--light-blue) !important;
    border: 3px solid var(--blue) !important;
}

body {
    font-family: "baloo-2", sans-serif;
    font-weight: 700;
    font-style: normal;
    width: 100%;
    background: black;
    /* Optional */
    overflow-x: hidden;
}

canvas {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid black;
}


/* Main container that wraps the canvas */
#canvas-container {
    position: relative;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    z-index: 998;
    pointer-events: all;
}

/* Score display area */
#score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    font-size: 1.2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    /* flex-wrap: wrap; */
}

/* Game over overlay */
#game-over-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 999;
}

#game-over {
    background-color: var(--sand);
    border: 3px solid var(--yellow);
    width: 90%;
    max-width: 350px;
    text-align: center;
    padding: 20px;
    border-radius: 25px;
    display: none;
}


#game-over-new-score {
    font-size: 1.5rem;
    margin: 20px 0;
}

/* Mobile Buttons */
#mobile-buttons {
    display: none;
    justify-content: space-around;
    width: 100%;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    z-index: 998;
    opacity: 50%;
}

#mobile-buttons button {
    width: 50%;
    height: 80px;
    font-size: 2rem;
}

/* Double jump bar */
#health-bar-container {
    margin-left: 10px;
    width: 135px;
    height: 45px;
    display: flex;
    border-radius: 15px;
    background-color: var(--sand);
    border: 3px solid var(--yellow);
    img {
        width: 40px;
    }
}

.btn {
    text-decoration: none;
    color: black;
    cursor: pointer;
    padding: 5px 10px;
    background-color: var(--light-blue);
    border: 3px solid var(--blue);
    border-radius: 15px;
    font-weight: 100;
}

#restart-btn {
    background-color: var(--light-green);
    border-color: var(--green);
}

@keyframes swing-rotate {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }

    75% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

#kite-back {
    position: absolute;
    left: 35%;
    top: 15%;
    width: 40%;
    animation: swing-rotate 2s ease-in-out infinite;
    transform-origin: center;
    scale: 0;
    transition: scale 1s ease;
}

/* Media query for mobile adjustments */
@media only screen and (max-width: 768px) {

    #game-over {
        padding: 15px;
    }

    #game-over button {
        font-size: 1rem;
    }

    #double-jump {
        width: 100px;
        height: 16px;
    }

    #mobile-buttons {
        display: flex !important;
        z-index: 999;
        -webkit-user-select: none;
        user-select: none;
    }

    canvas {
        border: none;
    }
}