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

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

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

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

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

.game-worlds-body #crsPlayShell #gamebox.crs-gamebox,
#crsPlayShell #gamebox.crs-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;
    font-size: 18px;
    color: #fff;
    background-color: #161c1c;
}

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

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

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

#crsPlayShell #gameover {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    text-align: center;
    background-color: rgba(22, 28, 28, 0.95);
    z-index: 2;
}

#crsPlayShell #gameover #msg {
    font-family: Arial, sans-serif;
    font-size: 24px;
    color: #ccc;
    margin: min(150px, 22vh) auto 0;
    font-weight: bold;
}

#crsPlayShell #gameover #scoreGameOver {
    font-family: Arial, sans-serif;
    font-size: 24px;
    color: red;
    margin: 20px 0 40px;
}

#crsPlayShell #restartbtn {
    display: block;
    margin: 16px auto;
    width: 100px;
    padding: 10px 20px;
    background-color: #fff;
    font-family: Arial, sans-serif;
    font-size: 20px;
    color: black;
    text-decoration: none;
    cursor: pointer;
}
