/* Balloon Defense — viewport-adaptive canvas */

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

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

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

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

.game-worlds-body #bldPlayShell #gamebox.bld-gamebox,
#bldPlayShell #gamebox.bld-gamebox {
    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;
}

#bldPlayShell #game-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: auto;
    min-height: 40px;
    margin: 0;
    padding: 6px 12px;
    box-sizing: border-box;
    font-size: clamp(18px, 2.2vw, 24px);
    font-family: Arial, sans-serif;
    color: #fff;
    position: relative;
}

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

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

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

#bldPlayShell #game-board,
#bldPlayShell .bld-playfield {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: auto;
    background-color: #111;
}

#bldPlayShell #gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
}

#bldPlayShell #gameover {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2;
}

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

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

#bldPlayShell #tryagainbtn,
#bldPlayShell #nextlevelbtn,
#bldPlayShell #resetbtn {
    margin: 16px auto;
}

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