/* Motion Card Match — viewport-adaptive canvas playfield */

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

#mcmPlayShell.game-worlds-play-shell {
    min-height: 0;
    box-sizing: border-box;
    background:
        radial-gradient(ellipse 130% 90% at 50% 45%, rgba(0, 242, 255, 0.045) 0%, transparent 52%),
        radial-gradient(ellipse 85% 100% at 0% 50%, rgba(8, 12, 20, 0.92) 0%, transparent 58%),
        radial-gradient(ellipse 85% 100% at 100% 50%, rgba(8, 12, 20, 0.92) 0%, transparent 58%),
        linear-gradient(165deg, #05070c 0%, #0c1118 42%, #080b10 100%);
}

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

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

.game-worlds-body #mcmPlayShell #gamebox.mcm-gamebox,
#mcmPlayShell #gamebox.mcm-gamebox,
#mcmPlayShell .mcm-gamebox#gamebox {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #161c1c;
    border: 1px solid #313131;
}

#mcmPlayShell #header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 40px;
    padding: 8px 16px;
    box-sizing: border-box;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 20px;
}

#mcmPlayShell #score,
#mcmPlayShell #time,
#mcmPlayShell #timer {
    position: static;
    float: none;
    left: auto;
    right: auto;
    top: auto;
    width: auto;
    text-align: left;
}

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

#mcmPlayShell .mcm-playfield {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

#mcmPlayShell #gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #161c1c;
    border: 0;
}

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

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

#mcmPlayShell #restart {
    display: block;
    margin: 30px auto;
    width: 140px;
    padding: 6px;
    background-color: #00BB00;
    font-family: Arial, sans-serif;
    font-size: 30px;
    color: red;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}

#mcmPlayShell #restart:hover {
    background-color: #9f8b77;
}
