@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --main-color: #d9e3ee;
    --active-color:#a5acb2;
    --back-color: #18212b;
    --extra-color: #0d1114;  
    --focus-color: #080b0c;
    --error-color: #ccc485;
    --ready-color: green;
}

* { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

body {
    font-family: "Inter", sans-serif;
    font-size: 90%;

    color: var(--main-color);
    background-color: var(--back-color);

    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    min-height: 100vh;
  
    line-height: 1.5;
}

a,
a:hover {
    text-decoration: none;
    color: var(--main-color);
}

strong {
    font-weight: normal;
}

dialog {
    margin: auto;
    padding: 20px;
    border-radius: 10px;
}

dialog form {
    text-align: left !important;
}

dialog #players button {
    float: right;
}

dialog #team_a,
dialog #team_a_score {
    text-align: right;
}

dialog span.separator {
    width: 2em;
    display: inline-block;
    text-align: center;
}

dialog hr {
    margin-top: 1em;
    margin-bottom: 1em;
    border: none;
}

#message {
    color: var(--error-color);
    font-size: 120%;
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 1em;
    margin-bottom: 1em;
}

label {
    cursor: pointer;
    display: inline-block;
    width: 5em;
    text-align: left;
}

fieldset label {
    width: 15rem;
}

fieldset {
    border: none;
}

button {
	background-color:var(--main-color);
	border-radius:5px;
	border:1px solid var(--focus-color);
	color:var(--back-color);
	padding:5px;
	text-decoration:none;
}

button:hover,
button:active {
	background-color:var(--active-color);
}

button,
input[type=submit] {
    width: 7em;
}
input[type=checkbox],
input[type=radio] {
    margin-right: 1em;
}

input[type=datetime-local],
input[type=text],
input[type=password],
select {
    width: 20em;
}

select {
    margin-right: 0.3em;
}

ul {
    list-style-type: none;
}

ul,ol {
    margin-left: 1em;
    margin-right: 1em;
}

ul#players {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.servers,
.rules,
ul#teams {
    max-width: 600px;
    margin-left: auto !important;
    margin-right: auto !important;
    
}

.rules ol,
.rules ul {
    width: 70%;
    margin-bottom: 3ex;
}

.title,
.actions form,
.team h3,
.match,
.content h2,
.content-full h2,
.finals h2,
.finals h3 {
    text-align: center;
}

.match h3 span {
    display: inline-block;
    width: 5em;
}

.match time {
    display: block;
}

div.rules,
div.match,
li.player,
li.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 10px;
    margin: 1em;
    padding: 1em;
    background-color: var(--extra-color);
}

div.rules:hover,
div.match:hover,
li.player:hover,
li.team:hover {
    background-color: var(--focus-color);
    cursor: pointer;
}

li.player {
    flex-direction: row !important;
    width: 400px;
}

li.player img {
    margin-left: 1em;
    margin-right: 1em;    
    width: 50px;
    height: 50px;
}

li.player strong {
    flex: 1;
}

li.player span {
    margin-left: 1em;
}

li.player-ready {
    color: var(--ready-color);
}

li.total {
    width: 100%;
    text-align: center;
}

.summary,
.members {
    display: block !important;
    width: 100%;
}

.servers li,
.summary li,
.members li {
    display: flex;
    flex-direction: row;
}

.servers li strong,
.summary li strong,
.members li strong {
    flex: 1;
    text-align: left;
}

.summary li span,
.members li span {
    width: 3em;
    text-align: right;
}

.summary li span {
    border-top: 1px solid var(--main-color);
    padding-top: 0.5em;
}

.summary li button,
.members li button {
    margin-left: 1em;
}

.summary li strong {
    border-top: 1px;
    padding-top: 0.5em;
    text-align: right;
}

.finals {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.finals .stage {
    width: 100%;
}

.finals .match {
    width: 20em;
}

#sortForm {
    text-align: center;
}

table#scores {
    width: 100%;
}

td.text {
    text-align: left;
}

td.number {
    text-align: right;
}


/* layout */

header {
    width: 100%;
    min-height: 80px;
    background-color: var(--extra-color);
    padding-left: 20px;
    padding-right: 120px;
    text-align: left;
}

nav {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    padding: 2em;
    background-color: var(--extra-color);
    margin-bottom: 1em;
}

#player {
    background-color: var(--extra-color);
    text-align: center;
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
}

#player span {
    display: block;
}

main {
    width: 100%;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
    flex: 1;
}

footer {
    margin-top: 2em;
    width: 100%;
    text-align: center;
    font-size: 80%;
}

@media (min-width: 576px) { 
    body {
        font-size: 100%;
    }
    header {
        padding-right: 120px;
        padding-left: 120px;        
        text-align: center;
    }
}

@media (min-width: 768px) {
    header {
        min-height: 0;
    }
}

@media (min-width: 992px) {}

@media (min-width: 1200px) {}

@media (min-width: 1400px) {}
