.emulator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

body.wrapper {
    background-color: #000;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-callout: none;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-callout: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
    -webkit-highlight: none;
    -webkit-text-size-adjust: none;
}

body.wrapper > * {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-select: none;
    -webkit-user-callout: none;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-callout: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
    -webkit-highlight: none;
    -webkit-text-size-adjust: none;
}

body.wrapper main {
    display: flex;
}

#clickMe {
    background-color: #000;
    color: #fff;
}

#registrationKeyOverlay.embed {
    position: absolute;
    left: 0;
    top: 0;
	/* Place above controls if they're not embedded in the emu div */
	z-index: 1;
}

#registrationKeyOverlay {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer; 
    background-color: #000; 
    color: #fff; 
    text-align:center; 
    margin: auto;
    position: relative;
    font-family: Tahoma;
    line-height: 1.5;
}

#registrationKeyOverlay .inner {
    position: absolute;
    top: 50%;
    left: 50%;
	transform: translate(-50%, -50%);
    width: 100vw;
}

#registrationKeyOverlay p, #registrationKeyOverlay input {
    margin: 16px 0 8px;
}

#registrationKeyOverlay p {
    margin-top: 32px;
}

#registrationKeyOverlay input {
    padding: 6px 12px;
    background: #111;
    color: #eee;
    border: 1px solid #222;
    border-radius: 4px;
    box-shadow: none;
    box-sizing: border-box;
    text-align: center;
    font-size: 5vw;
    font-size: 5svw;
}

#registrationKeyOverlay button {
    background: #0070f3;
    font-size: 4vw;
    font-size: 4svw;
    display: inline-block;
    padding: 6px 12px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    border: 0;
    border-radius: 4px;
    box-sizing: border-box;
    cursor: pointer;
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

#registrationKeyOverlay fieldset {
    padding: 32 0 16px;
    margin: 0;
    margin-top: 0;
}

#registrationKeyOverlay h1 {
	font-family: serif;
    font-weight: normal;
    font-size: 10vw;
    font-size: 10svw;
	margin: 0;
}

#registrationKeyOverlay label {
    font-size: 3.5vw;
    font-size: 3.5svw;
}

#registrationKeyOverlay fieldset {
    border: none;
}

#registrationKeyOverlay .error {
    margin-top: 32px; 
    background-color: darkred;
    border-radius: 5px;
    padding: 8px;
    line-height: 2;
    font-size: 3vw;
    font-size: 3svw;
}


@media (min-width: 0) {
    .emu-frame {
        width: 100vw;
        width: 100svw;
        height: 100vh;
        height: 100svh;
        border: none;
        outline: none;
    }
}


@media (orientation: landscape) {
    .gb-top {
        display: none;
    }

    .emu-frame, .gb-left, .gb-right {
        margin-top: 1vh;
    }

    .emu-frame {
        width: 60vw;
        width: 60svw;
        height: 96vh;
        height: 96svh;
        border: none;
        outline: none;
    }

    .gb-left {
        width: 20vw;
        height: 96vh;
        height: 96svh;
        background-color: #988993;
        border-radius: 15px 0 0 15px;
        position: relative;
    }

    .gb-right {
        width: 20vw;
        height: 96vh;
        height: 96svh;
        background-color: #988993;
        border-radius: 0 15px 15px 0;
        position: relative;
    }


    .ctrl-pad {
        position: absolute;
        display: flex;
        flex-direction: column;
        top: 20%;
        left: 0.5vw;
    }

    .ctrl-pad > div {
        text-align: center;
        display: flex;
        flex-direction: row;
    }

    .ctrl-pad .up, .ctrl-pad .down, .ctrl-pad .left, .ctrl-pad .right, .ctrl-pad .center {
        width: 6vw;
        height: 6vw; /* Equal sizing */
        background-color: #ddd;
        cursor: pointer;
        line-height: 6vw;
        font-size: 6vw;
        color: #fff;
    }

    .ctrl-pad .up, .ctrl-pad .down {
        margin-left: 6vw;
    }

    .ctrl-pad .center {
        color: #ccc;
    }

    .start-select {
        position: absolute;
        bottom: 4vh;
        bottom: 4svh;
        right: 2vh;
        right: 2svh;
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    .start-select > div {
        border-radius: 999px;
        width: 6vw;
        height: 4vh;
        height: 4svh;
        background-color: #ddd;
        margin-top: 1vh;
        margin-top: 1svh;
        line-height: 4vh;
        line-height: 4svh;
        cursor: pointer;
        color: #fff;
    }

    .green-dot {
        background-color: greenyellow;
        width: 1vw;
        height: 1vh;
        height: 1svh;
        border-radius: 50%;
        position: absolute;
        top: 8vh;
        top: 8svh;
        left: 2vw;
    }

    .gb-right .buttons {
        display: flex;
        flex-direction: row;
        position: absolute;
        left: 0;
        bottom: 40vh;
        bottom: 40svh;
        text-align: center;
    }

    .gb-right .buttons > div {
        border-radius: 50%;
        color: #fff;
        width: 7vw;
        height: 7vw; /* Yes, really vw. I want them round! */
        line-height: 7vw;
        margin-left: 2vw;
        font-size: 4vw;
        
        background-color: #ddd;
    }

    .gb-right .buttons .b {
        margin-top: 2vh;
        margin-top: 2svh;
    }

    .gb-right .grille {
        position: absolute;
        color: #ddd;
        opacity: 0.8;
        bottom: 10vh;
        right: 4vw;
        width: 12vw;
        height: 20vh;
        bottom: 10svh;
        height: 20svh;
        background-color: #988993;
        background-image: linear-gradient(0deg, #988993 50%, #afb0bc 50%);
        background-size: 8px 8px;
    }
    .ctrl-pad .up {
        transform: rotate(180deg);
    }
}

@media (orientation: portrait) {
    .green-dot {
        display: none;
    }

    .emu-frame, .gb-left, .gb-right {
        margin-top: 1vh;
    }

    .emu-frame {
        top: 5vh;
        top: 5svh;
        width: 98vw;
        width: 98svw;
        height: 55vh;
        height: 55svh;
        border: none;
        outline: none;
        position: absolute;
        left: 1vw;
        left: 1svw;
    }

    .gb-top {
        height: 5vh;
        width: 98vw;
        width: 98svw;
        background-color: #988993;
        border-radius: 15px 15px 0 0;
        position: absolute;
        left: 1swv;
        left: 1vw;
    }


    .gb-left {
        width: 60vw;
        width: 60svw;
        height: 38vh;
        height: 38svh;
        background-color: #988993;
        border-radius: 0 0 0 15px;
        position: absolute;
        top: 60vh;
        top: 60svh;
        left: 1vw;
        left: 1svw;
    }

    .gb-right {
        width: 40vw;
        width: 40svw;
        height: 38vh;
        height: 38svh;
        background-color: #988993;
        border-radius: 0 0 15px 0;
        position: absolute;
        top: 60vh;
        top: 60svh;
        right: 1vw;
        right: 1swv;
    }

    .ctrl-pad {
        position: absolute;
        display: flex;
        flex-direction: column;
        top: 20%;
        left: 5vw;
    }

    .ctrl-pad > div {
        text-align: center;
        display: flex;
        flex-direction: row;
    }

    .ctrl-pad .up, .ctrl-pad .down, .ctrl-pad .left, .ctrl-pad .right, .ctrl-pad .center {
        width: 10vw;
        height: 10vw; /* Equal sizing */
        background-color: #ddd;
        cursor: pointer;
        line-height: 10vw;
        font-size: 10vw;
        color: #fff;
    }

    .ctrl-pad .up, .ctrl-pad .down {
        margin-left: 10vw;
    }

    .ctrl-pad .center {
        color: #ccc;
    }

    .start-select {
        position: absolute;
        bottom: 8vh;
        bottom: 8svh;
        right: 0vh;
        right: 0svh;
        display: flex;
        flex-direction: row-reverse;
        text-align: center;
        z-index: 1;
    }

    .start-select > div {
        border-radius: 999px;
        width: 14vw;
        height: 3vh;
        height: 3svh;
        background-color: #ddd;
        margin-right: 3vw;
        margin-right: 1svw;
        line-height: 9vh;
        line-height: 9svh;
        cursor: pointer;
        color: #fff;
        display: inline-block;
        font-size: 2vh;
        font-size: 2svh;
    }


    .green-dot {
        background-color: greenyellow;
        width: 1vw;
        height: 1vh;
        height: 1svh;
        border-radius: 50%;
        position: absolute;
        top: 8vh;
        top: 8svh;
        left: 2vw;
    }

    .gb-right .buttons {
        display: flex;
        flex-direction: row;
        position: absolute;
        right: 8svw;
        right: 8vw;
        bottom: 20vh;
        bottom: 20svh;
        text-align: center;
    }

    .gb-right .buttons > div {
        border-radius: 50%;
        color: #fff;
        width: 12vw;
        height: 12vw; /* Yes, really vw. I want them round! */
        line-height: 12vw;
        margin-left: 5vw;
        font-size: 4vw;
        
        background-color: #ddd;
    }

    .gb-right .buttons .b {
        margin-top: 4vh;
        margin-top: 4svh;
    }

    .gb-right .grille {
        position: absolute;
        color: #ddd;
        opacity: 0.8;
        bottom: 10vh;
        right: 4vw;
        width: 12vw;
        height: 12vh;
        bottom: 4svh;
        height: 12svh;
        background-color: #988993;
        background-image: radial-gradient(circle at center, #afb0bc 50%, #988993 50%);
        background-size: 8px 8px;
    }
    .ctrl-pad .up {
        transform: rotate(180deg);
    }
}