canvas {
    border: none;
    margin: none;
    padding: none;
    height: 100%;
    width: 100%;
    max-height: 50vh;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
}

.menu {
    display: flex;
    align-items: center;
}

#gb-root {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#gb-main {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#gb-menu {
    
}

.gb-game {
    padding: 1rem;
    border-bottom: thin solid darkgray;
    cursor: pointer;
    background-color: lightgrey;
}

.gb-game:active {
    background-color: lightgrey
}

#control {
    display: flex;
    flex-direction: column;
    flex: 1;
}

#screen {
    max-height: 50vh;
}

* {
    box-sizing: border-box;
}

button {
    outline: none;
    border: none;
    color: white;
    background-color: #424242;
    border-radius: 3px;
}

button.pressed {
    opacity: 50%;
}


body {
    margin: 0;
    overscroll-behavior: contain;
    background-color: black;
}

html, body {
    height: 100vh;
}

select {
    width: 100%;
    height: 30px;
}

#button-up:before {
    content: "U"
}
#button-right:before {
    content: "R"
}
#button-down:before {
    content: "D"
}
#button-left:before {
    content: "L"
}
#button-start:before {
    content: "Start"
}
#button-select:before {
    content: "Select"
}
#button-a:before {
    content: "A";
}
#button-b:before {
    content: "B";
}

.dpad {
    grid-area: dpad;
    width: 10rem;
}

.dpad button {
    width: 100%;
    height: 100%;
}

.start-select {
    grid-area: start-select;
    justify-self: center;
    align-self: center;
}

.start-select button {
    width: 5rem;
    height: 2rem;
}

.a-b button {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
}

.a-b {
    grid-area: ab;
    justify-self: center;
    align-self: center;
}

.dpad {
    display: grid;
    grid-template-areas: "a b c"
                         "d e f"
                         "g h i";
    justify-self: center;
    max-height: 10rem;
}

.dpad #button-up {
    grid-area: b;
}

.dpad #button-right {
    grid-area: f;
}

.dpad #button-down {
    grid-area: h;
}

.dpad #button-left {
    grid-area: d;
}

#actions {
    background-color: lightgrey;
    display: grid;
    flex: 1;
    grid-template-areas: "screen screen"
                         "dpad a-b"
                         "start-select start-select";
}

.dpad {
    grid-area: dpad;
}

.a-b {
    grid-area: a-b;
}