/* Balloon Pop — viewport-adaptive playfield */

@media screen and (max-height: 640px) {
    #blpPlayShell .container.container-single {
        padding-top: 3px !important;
    }
}

#blpPlayShell.game-worlds-play-shell {
    min-height: 0;
    box-sizing: border-box;
}

#blpPlayShell.game-worlds-play-shell:not([data-casual-sized]) {
    height: 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}

#blpPlayShell .casual-outer-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.game-worlds-body #blpPlayShell #gamebox.blp-gamebox,
#blpPlayShell #gamebox.blp-gamebox {
    --bp-float: 360px;
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #161c1c;
}

#blpPlayShell #game-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
}

#blpPlayShell #game-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    box-sizing: border-box;
    font-size: clamp(16px, 2vw, 20px);
    font-family: Arial, sans-serif;
    z-index: 2;
    background: #333;
    color: #fff;
    text-align: center;
    position: relative;
    top: auto;
}

#blpPlayShell #score,
#blpPlayShell #time {
    float: none;
    width: auto;
    text-align: left;
    padding: 0;
    position: static;
}

#blpPlayShell #timer {
    position: static;
    left: auto;
}

#blpPlayShell #scorev,
#blpPlayShell #timer {
    color: red;
    font-weight: bold;
}

#blpPlayShell #balloons {
    position: relative;
    flex: 1 1 auto;
    display: block;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

#blpPlayShell .balloon {
    position: absolute;
    width: 40px;
    height: 60px;
    background-color: red;
    border-radius: 50%;
    cursor: pointer;
    animation: blp-float 4s linear infinite;
    align-content: center;
    text-align: center;
}

#blpPlayShell .points {
    font-size: 16px;
    font-weight: bold;
    color: white;
}

@keyframes blp-float {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(calc(var(--bp-float, 360px) * -1));
    }
}

#blpPlayShell #gameover {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 28, 28, 0.95);
    z-index: 3;
}

#blpPlayShell #gameover p.msg {
    font-family: Arial, sans-serif;
    font-size: 36px;
    color: grey;
    margin: min(120px, 18vh) auto 0;
    text-align: center;
}

#blpPlayShell #tryagainbtn,
#blpPlayShell #nextlevelbtn,
#blpPlayShell #resetbtn {
    display: block;
    width: 160px;
    padding: 6px;
    margin: 16px auto;
    background-color: #00BB00;
    font-family: Arial, sans-serif;
    font-size: 24px;
    color: red;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}

#blpPlayShell #tryagainbtn:hover,
#blpPlayShell #nextlevelbtn:hover,
#blpPlayShell #resetbtn:hover {
    background-color: #9f8b77;
}
