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

html, body, #user-signed-in {
    height: 100vh;
    min-height: 0;
    max-height: 100vh;
}

/* Header */

#header {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: black;
}

#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 */

.page#user-signed-in {
    display: flex;
    flex-direction: column;
}

.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-grow: 1;
    max-height: calc(100% - 80px); /* HACKY */
}

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

.screen#waitingRoom {
    display: flex;
}

#sidebar {
    display: flex;
    flex-direction: column;
}

#sidebar #playerListBox {
    padding-left: 40px;
    padding-right: 40px;
    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;
    margin: 2px;
    background-color: #ddd;
}

#qrcode {
    padding: 20px 40px 40px;
}

#smallJoinMessage {
    padding-top: 20px;
    padding-left: 40px;
    font-size: 24px;
    color: red;
}

/* Waiting Room game */

#waitingRoomPanel {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

#panelContents {
    flex-grow: 1;
    padding: 40px;
}

#panelContents #grid {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
}

#panelContents #grid .cell {
    /* border: 1px solid green; */
    background-color: black;    
}

.cell  {
    font-size: 5vh;
    text-align: center;
}

/* Team List */

#teamListPanel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#teamListContainer {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
    gap: 20px;
    justify-content: center;
}

.teamListBox {
    flex-grow: 1;
    max-width: 30vw;
    border: 5px groove lightgray;
    display: flex;
    flex-direction: column;
}

.teamListBox h2 {
    text-align: center;
}

.teamListBox .playerList {
    justify-content: center;
}

/* 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;
}

.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;
}