/* Color Ring Defender — viewport-adaptive canvas */

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

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

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

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

.game-worlds-body #crdPlayShell #gamebox.crd-gamebox,
#crdPlayShell #gamebox.crd-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;
}

#crdPlayShell #score {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 2;
    font-size: 20px;
    color: #fff;
}

#crdPlayShell .crd-playfield {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

#crdPlayShell #gameCanvas {
    display: block;
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    background-color: #161c1c;
    border: none;
    box-sizing: border-box;
}

#crdPlayShell #overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 28, 28, 0.95);
    color: white;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 3;
}

#crdPlayShell #overlay button {
    padding: 10px 20px;
    font-size: 20px;
    margin-top: 20px;
    border-radius: 10px;
}

#crdPlayShell .gameover {
    font-size: 22px;
}

#crdPlayShell .yscore {
    font-size: 20px;
    color: red;
    margin: 20px 0 10px;
}

#crdPlayShell #finalScore {
    font-weight: bold;
}
