body {
    background-color: #daf1d8;
    color: #222;
    font-family: sans-serif;
    font-size: 16px;
    line-height: 1.3;
    margin: 8px;
    text-align: center;

    --theme-colour: #21a815;
    --theme-colour-darker: #135f0c;
    --theme-colour-hover: #46af3c;
    --theme-colour-shadow: #25752533;
}

header {
    background-color: var(--theme-colour);
    box-shadow: rgba(0,0,0,0.1) 0 0px 10px;
    color: white;
    margin: -8px -8px 0 -8px;
}

header h1 {
    margin: 0;
    padding: 10px;
}

header small {
    color: #ffffffaa;
}

a {
    color: var(--theme-colour-darker);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 a {
    color: white;
    text-decoration: underline;
    text-decoration-color: #ffffffaa;
}

#message-banner {
    color: white;
    background-color: darkblue;
    padding: 1em 0;
    margin: 0 -8px;
}

#setup {
    margin-top: 2em;
}

.text-container {
    display: inline-block;
    max-width: 500px;
    padding: 10px;
    text-align: left;
}

hr {
    border: 1px solid #135f0c44;
    margin: 20px auto;
    width: 70%;
}

.form {
    background-color: #f5fff5;
    border-radius: 20px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    display: inline-block;
    padding: 20px;
}

.form .fields {
    text-align: right;
}

input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type=text] {
    border-radius: 5px;
    border: 1px solid var(--theme-colour-darker);
    box-shadow: 0px 2px 5px rgba(0,0,0,0.2) inset;
    color: #222;
    font-family: sans-serif;
    font-size: 16px;
    margin: 10px;
    padding: 0.5em;
    width: 6em;
}

button, input[type=submit] {
    background-color: var(--theme-colour);
    border-radius: 5px;
    border: none;
    box-shadow: 0 5px 5px var(--theme-colour-shadow);
    color: white;
    cursor: pointer;
    display: block;
    font-family: sans-serif;
    font-size: large;
    font-weight: bold;
    margin: 20px auto;
    padding: 0.5em 2em;
}

button:enabled:hover, input[type=submit]:hover {
    background-color: var(--theme-colour-hover);
}

button:disabled {
    cursor: default;
    opacity: 0.5;
}

input:focus, button:focus {
    border-color: var(--theme-colour);
    box-shadow: var(--theme-colour) 0 0 10px;
}

#player-view {
    max-width: 50vh;
    margin: auto;
}

#latency-warning {
    position: absolute;
}

#latency-warning.poor::before {
    content: '⚠';
    font-size: 2em;
}

#latency-warning.poor:hover::after {
    content: 'Poor quality connection';

    position: absolute;
    left: 2.5em;
    bottom: 0.7em;
    width: auto;
    white-space: nowrap;

    background-color: #1e1e1e;
    color: #fff;
    border-radius: 3px;
    box-shadow: 1px 1px 5px 0 rgba(0,0,0,0.4);
    font-size: 14px;
    padding: 3px 5px;
}

#buzzer-container {
    display: inline-block;
    height: 80vmin;
    max-height: 50vh;
    max-width: 50vh;
    width: 80vmin;
}

#buzzer {
    background-image: radial-gradient(#bd2222 50%,#810404 70%);
    border-radius: 80vmin;
    border: white solid 5px;
    box-shadow: rgba(0,0,0,0.5) 0 10px 20px;
    cursor: pointer;
    height: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    width: 100%;
}

#buzzer.ready:hover, #buzzer.ready:focus {
    background-image: radial-gradient(#e44640 30%, #bd2222 50%, #810404 70%);
}

#buzzer.ready.pressed {
    background-image: radial-gradient(#e44640 30%,#810404 60%);
    box-shadow: rgba(0,0,0,0.5) 0 0 20px;
    height: 96%;
    margin: 2%;
    width: 96%;
}

#buzzer.disabled {
    box-shadow: none;
    cursor: default;
    opacity: 0.5;
}

#buzzer.success {
    background-image: radial-gradient(#67d136 20%, #45bd0d 50%, #058104 70%);
    box-shadow: rgba(0,0,0,0.5) 0 10px 20px;
    opacity: 1;
}

.hidden {
    display: none;
}

.message-bar {
    background-color: #025ba3;
    border-radius: 5px;
    box-shadow: inset 0 5px 5px #00000033;
    color: white;
    margin: auto;
    max-width: 400px;
    padding: 8px;
    text-align: center;
}

#player-list {
    list-style: none;
    padding: 0;
}

#player-list li::before {
    content: '👉 ';
}

#player-list li.frozen {
    color: grey;
}

#player-list li.frozen::before {
    content: '🥶 ';
}

#player-list li.buzzed {
    font-weight: bold;
}

#player-list li.buzzed::before {
    content: '🔊 ';
}
