html {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

html, body, #user-signed-in {
    /* width: 100dvw; */
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
}

/* Header */

#header {
    min-height: 80px;
    flex-shrink: 0;
    background-color: black;

    display: flex;
    align-items: center;
    justify-content: center;
}

.joinMessage {
    font-size: 32px;
    color: white;
    margin-left: auto;
}

#joinURL {
    background-color: white;
    color: blue;
    border: medium solid blue;
    font-weight: bold;
    padding: 10px 20px;
}

#logoutButton {
    margin-left: auto;
}

#logoutButton a {
    color: rgb(150, 0, 0);
    margin-right: 10px;
}

/* Pages */

.user-signed-in {
    /* flex-grow: 1; */
    display: flex;
    flex-direction: column;
    /* min-height: 0;
    max-height: 100vh; */
}

.page#resultsPage {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    margin: 100px;
    margin-top: 20px;
}

#resultsPage #averageEfficiency {
    font-size: 64px;
    margin-left: 10px;
    color: green;
}

/* Screens */

#screenContainer {
    flex: 1;
    min-height: 0;
}

.screen {
    display: flex;
    flex-grow: 1;
    min-height: 0;
    height: 100%;

    border: 1px solid;
}

.screen .waitingRoom {
    display: flex;
}

#sidebar {
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 40px;
    padding-right: 40px;

    border: 1px solid;
}

#sidebar #playerListBox {
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.playerListView {
    flex-grow: 1;
    min-height: 0;
}

.playerList {
    display: flex;
    flex-wrap: wrap;
    max-height: 100%;
    overflow-y: auto;
}

#sidebar .playerList {
    width: 256px;
    max-width: 256px;
}

.playerName {
    padding: 4px 10px;
    margin: 2px;
    background-color: #ddd;
    border-radius: 8px;
}

#qrcodeContainer {
    margin-bottom: 20px;
}

#qrcode {
    padding-top: 20px;
    padding-bottom: 20px;
}

#smallJoinMessage {
    font-size: 24px;
    color: red;
}

/* Main Game Screen */

#canvasContainer {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 80px); /* HACKY */
}

/* Utility classes */

.panelBackground {
    border: 30px solid transparent;
    border-image: url(../assets/PanelPlate_4x4.png) 30 fill;
    border-image-repeat: round;
}

.panelBackground h1 {
    margin: 1em auto; 
    text-align: center;
}

.centredOnPage {
    position: absolute;
    top: 40%;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%)
}
.centredOnPage p {
    text-align: center;
}
.centredOnPage input {
    font-size: 32px;
    width: 200px;
}

.welcomeMessage {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 32px;
}

.mainMessage {
    font-size: 32px;
}

.errorMessage {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 32px;
    color: red;
}

#overlay {
    position: absolute;
    top: 110px;
    left: 30px;
}

#countdownTimer {
    color: white;
    font-size: 2em;
    font-weight: bold;
}

#countdownTimer.timerWarning {
    color: orange;
    font-size: 3em;
    font-weight: bold;
}

#leaderboard {
    color: white;
}

#leaderboard ul {
    list-style-type: none;
    padding: 0;
}

#debugInfo {
    color: white;
}

.hidden {
    display: none !important;
}
