:root {
    --background-color: #090a2e;
}

h1 {
    text-align: center;
    font-size: 1.4em;
    margin: 0;
}

table {
    border-spacing: 1em 0;
}

#container {
    display: grid;
    grid-template-columns: 5fr 4fr;
    min-height: calc(100vh - 5em - 4em);
}

ul li {
    list-style-type: none;
}

#qr {
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 40%;
    margin-top: 2em;
}

#current_votes {
    text-align: right;
    padding: 0 1.5em 0 0;
    margin: 0.4em 0 0.4em 2em;
}
#cur_table, #top_table {
    font-size: 0.85em;
}
#cur_table .vote {
    display: flex;
    gap: 0.4em;
    padding: 0;
    align-items: center;
}
.vote :first-child {
    flex: 1 1;
}
.vote .points {
    border-radius: 0.3em;
    padding: 0.2em 0.4em 0.3em;
    width: 1.2em;
    text-align: center;
    font-size: 0.8em;
}


#container h2 {
    font-size: 1.3em;
    text-align: unset;
}

#cur_h2 {
    margin: 0 0 0.2em;
}
#cur_h2_span {
    font-size: 0.5em;
}

#top_songs {
    padding: 0 1em 1.5em 1.5em;
    border-left: 1px solid white;
    margin: 0.4em 0 0 0;
    width: max-content;
    min-width: 13em;
}
#top_songs h2 {
    margin: 0 0 0.1em;
}

.bottomRight {
    position: fixed;
    bottom: 1em;
    right: 1em;
    font-size: 0.3em;
}
#groupIdDiv {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid white;
    border-bottom-width: 0;
    border-radius: 0.6em 0.6em 0 0;
    font-size: 0.6em;
    background-color: var(--background-color);
    padding: 0.6em 1em;
    display: block;
    text-decoration: none;
}
#groupIdDiv:hover {
    background-color: #23243b;
}

.changeIcon {
    width: 0.8em;
    cursor: pointer;
}

.settingsForm {
    font-size: 0.8em;
    border: 1px solid #ffffffb0;
    margin: 1em auto;
    padding: 1em 2em;
    border-radius: 1em;
    max-width: 18em;
}
.settingsForm input[type="text"], .settingsForm input[type="number"] {
    display: inline-block;
    padding: 0.4em 0.5em 0.4em 0.8em;
    width: 7em;
    margin: 1em;
    border-radius: 0.4em;
    font-family: monospace;
    text-transform: uppercase;
}
.settingsForm input[type="number"] {
    width: 4em;
}


.gridDouble {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.gridTriple {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}
.rowDouble {
    display: flex;
    gap: 0.4em;
    padding: 0;
    align-items: center;
}

.goodPoints {
    background-color: #98E2C6;
    color: #1e1e1e;
}
.mediumPoints {
    background-color: #FFD275;
    color: #1e1e1e;
}
.lowPoints {
    background-color: #FFA4A4;
    color: #1e1e1e;
}

.rowTriple {
    display: grid;
    grid-template-columns: 3em auto 0.2em 3.5em;
    column-gap: 0.4em;
    margin: 0.2em 0;
    overflow: hidden;
    border: 1px solid #767676e5;
    background-color: white;
    border-radius: 0.4em;
    color: black;
    padding: 0;
}

#resultDiv .rowTriple {
    border: 10px solid transparent;
}
#resultDiv .rowTriple div {
    padding: 0.4em;
}

.place, .points {
    text-align: right;
    font-family: "Roboto Mono", "Proxima Nova", sans-serif;
    line-height: 1.1;
}
.place {
    padding: 0.5em 0.5em 0.5em 0.5em;
    text-align: right;
}
.rowTriple div.points {
    padding-right: 1em !important;
}
.rowTriple div:not(.place) {
    padding: 0.5em 0.2em;
}

@keyframes fadein {
     from {
         opacity: 0;
         transform: translateY(-1em);
     }
     to {
         opacity: 1;
         transform: translateY(0);
     }
 }
#resultDiv {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: 1fr 1fr;
    column-gap: 1em;
    width: max-content;
    margin: 1em auto 2em;
    opacity: 0;
    animation: fadein 1s 5s forwards;
}
#resultDiv .rowTriple:first-child {
    border-color: #ffbf00;
}
#resultDiv .rowTriple:nth-child(2) {
    border-color: #939393;
}
#resultDiv .rowTriple:nth-child(3) {
    border-color: #cd7f32;
}

#commentContainer {
    position: fixed;
    bottom: 3em;
    left: 2em;
    font-size: 0.8em;
}
#commentContainer > div:not(.showComment) {
    opacity: 0;
    transform: translateY(100%);
}
#commentContainer > div {
    transition: opacity 200ms, transform 200ms, scale 200ms;
    border: 1px solid white;
    padding: 1em 3em 1em 2em;
    border-radius: 2.5em 2.5em 2.5em 0;
    background-color: white;
    color: black;
    width: max-content;
    max-width: 30em;
    position: fixed;
    bottom: 3em;
}
#commentContainer > div.minimizedComment {
    scale: 0.8;
    transform-origin: left top;
}
#commentContainer p {
    margin: 0.1em;
}

@media only screen and (max-width: 980px){
    #container {
        font-size: 0.8em;
    }
}
@media only screen and (max-width: 900px){
    body {
        font-size: 1.8em;
    }
}
@media only screen and (max-width: 760px){
    body {
        font-size: 1.5em;
    }
}
@media only screen and (max-width: 600px){
    body {
        font-size: 1em;
    }
}
@media only screen and (max-width: 480px){
    body {
        font-size: 0.8em;
    }
}