@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Patrick+Hand&display=swap');

*, *::before, *::after{
    box-sizing: border-box;
}

:root{
    --background: #212738;
    --green: #6CA965;
    --light-blue: #C0D8E0;
    --dark-blue: #233e56;
    --darker-blue: #051b34;
    --black-blue: #010C1B;
    --gold: #C8B653;
    --main-text-color: whitesmoke;
    --second-text-color: lightgray;
    --main-font: 'Patrick Hand', cursive;
    --bold-font: 'Fredoka One', cursive;
    --content-size: 1000px;
}

body{
    margin: 0;
    background: var(--background);
    color: var(--main-text-color);
    font-family: var(--main-font);
}

.bold{
    font-family: var(--bold-font);
    font-weight: normal;
}

.green{
    color: var(--green);
}

.gold{
    color: var(--gold);
}

.lblue{
    color: var(--light-blue);
}

.dblue{
    color: var(--dark-blue);
}

#content{
    width: var(--content-size);
    margin: auto;
    padding: 24px;
}

#intro{
    text-align: center;
}
#intro h1{
    font-size: 48px;
}

#intro p{
    font-size: 24px;
    font-weight: bold;
}

#navbar{
    width: 100%;
    padding: 10px calc(50vw - var(--content-size) / 2 + 20px);
    display: flex;
    flex-direction: row;
    justify-content: right;
    row-gap: 20px;
    column-gap: 20px;
    background: var(--black-blue);
    align-items: center;
}

#navbar a{
    color: whitesmoke;
    font-family: var(--bold-font);
    font-size: 18px;
}

a, a button{
    text-decoration: none;
}
a:hover, a:hover button{
    text-decoration: underline;
}

.modal{
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    width: 100%;
    height: 100%;
}

.modal-content{
    margin: 100px auto;
    background: white;
    color: black;
    padding: 20px;
    width: var(--content-size);
}

:is(#signup, #login) input{
    display: block;
    outline: none;
    background: #e5e5e5;
    border: none;
    padding: 10px;
    font-size: 14px;
    width: 100%;
    margin-bottom: 10px;
}

:is(#signup, #login) input[type=checkbox]{
    margin: 0;
    display: inline;
    width: auto;
}

.normalbtn{
    display: block;
    margin: 10px 0;
    border: none;
    background: var(--green);
    color: white;
    padding: 10px;
    font-size: 18px;
    border-radius: 8px;
    outline: none;
    transition: 0.2s;
    cursor: pointer;
}

.opbtn{
    cursor: pointer;
    transition: 0.2s;
}

:is(.normalbtn, .close, .snackbar, .opbtn):hover{
    opacity: 0.8;
}

:is(.normalbtn, .close, .snackbar, .opbtn):active, .normalbtn:disabled{
    opacity: 0.5;
}

.err{
    background: lightcoral;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 18px;
    margin: 20px 0;
}

.notice{
    background: var(--gold);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 18px;
    margin: 20px 0;
}

.success{
    background: lightgreen;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 18px;
    margin: 20px 0;
}


.hide{
    display: none;
}

.close{
    text-align: right;
    color: red;
    font-size: inherit;
    display: inline;
    cursor: pointer;
    transition: 0.2s;
}

#footer{
    width: var(--content-size);
    margin: auto;
}

.select-head{
    background: var(--background);
    color: var(--main-text-color);
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-radius: 4px 4px 0 0;
    font-size: 18px;
    cursor: pointer;
    width: min(400px, 100%);
    border: 3px solid transparent;
}

.select-body{
    display: none;
    flex-direction: column;
    background: var(--darker-blue);
    color: var(--second-text-color);
    cursor: pointer;
    width: min(400px, 100%);
    position: absolute;
    max-height: 300px;
    overflow: auto;
    padding-bottom: 10px;
}

.select-option {
    padding: 5px 15px;
    border-radius: 0 0 4px 4px;
    font-size: 18px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    align-content: center;
    column-gap: 5px;
}

.select-head .select-option{
    background: var(--dark-blue);
    padding: 5px 10px;
}

.select-head .select-option:hover{
    background: var(--dark-blue);
}

.select-option img{
    height: 24px;
    width: 24px;
}

.select-option:hover{
    background: var(--dark-blue);
}

.select-search{
    margin: 10px;
    outline: none;
    background: var(--dark-blue);
    padding: 10px;
    font-size: 15px;
    color: var(--second-text-color);
    border: none;
    border-radius: 4px;
}

.select-option[selected]::after{
    font-family:"Font Awesome 6 Free";
    content:"\f058";
    font-weight: 900;
    color: var(--green);
}

.flex{
    display: flex;
}

#new_score_text{
    margin: 2px;
    padding: 20px;
    width: min(400px, 100%);
    font-family: var(--main-font);
    font-size: 16px;
    height: 250px;
    outline: none;
    resize: vertical;
    border:1px solid black;
}

@keyframes error{
    0%{
        border: 3px solid red;
    }
    20%{
        border: 3px solid transparent;
    }
    40%{
        border: 3px solid red;
    }
    60%{
        border: 3px solid transparent;
    }
    80%{
        border: 3px solid red;
    }
    100%{
        border: 3px solid transparent;
    }
}

.errborder{
    animation: 1s error ease;
}

section{
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    background: var(--light-blue);
    color: black;
    border-radius: 8px;
}

section .header{
    font-size: 28px;
}

#log{
    font-size: 18px;
    max-height: 700px;
    overflow: auto;
}

#log header{
    display: flex;
    flex-direction: row;
    justify-content: center;
    column-gap: 20px;
}

input{
    font-family: var(--main-font);
}

.score{
    font-size: 16px;
    background: whitesmoke;
    padding: 20px;
    cursor: pointer;
    transition: 0.2s;
    opacity: 0.9;
}

.score:hover{
    box-shadow: 0 0 8px yellow;
}

.score-container {
    background-image: var(--image);
    background-size: contain;
    margin: 10px;
    background-color: whitesmoke;
    border-radius: 4px;
    background-position: right;
    background-repeat: no-repeat;
}

.snackbar{
    display: flex;
    align-items: center;
    position: fixed;
    z-index: 3;
    background: #383838;
    padding: 15px;
    border-radius: 8px;
    max-width: var(--content-size);
    font-size: 20px;
    top: 30px;
    right: calc(50vw - var(--content-size) / 2);
    cursor: pointer;
    transition: 0.2s;
    animation: snackbar_in 1s;
    overflow: clip;
}

.snackbar_out{
    animation: snackbar_out 0.5s;
}

.score-context{
    background: var(--black-blue);
    border: 1px solid #363636;
    box-shadow: 0 0 8px black;
    width: fit-content;
    width: -moz-fit-content;
    padding: 5px;
    position: fixed;
    right: 50px;
    top: 50px;
    border-radius: 4px;
    z-index: 4;
    min-width: 250px;
}

.score-context button{
    color: white;
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    text-align: left;
    font-weight: bolder;
}

.score-context button:hover{
    background: var(--dark-blue);
}

.score-context button.delete{
    color: red;
}

.score-context button.delete:hover{
    background: red;
    color: white;
}

@keyframes snackbar_in{
    from{
        top: 50px;
        opacity: 0;
    }
    to{
        top: 30px;
        opacity: 1;
    }
}

#confirm button{
    display: inline;
}

#confirm h1{
    margin-bottom: 0;
}

#confirm p{
    margin: 0;
}

.red{
    background: red;
}

#my_dropdown{
    display: none;
    position: fixed;
    right: calc(50vw - var(--content-size) / 2 + 10px);
    top: 40px;
    background:var(--black-blue);
    padding: 16px 0 0 0;
    text-align: center;
}

#my_dropdown button{
    background: none;
    color: var(--main-text-color);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--bold-font);
    display: block;
    margin: 10px;
}

#nav__me:hover + #my_dropdown, #my_dropdown:hover{
    display: block;
}

#nav__me::after{
    content: " ▾";
}

#error{
    width: calc(var(--content-size) - 40px);
    margin: 24px auto auto;
}

.score .emoji{
    height: 24px;
}

.noclick{
    pointer-events: none;
}

a{
    color: #679fff;
}

@keyframes snackbar_out{
    from{
        height: 57px;
        padding: 0 15px;
    }
    to{
        height: 0;
        padding: 0 15px;
        top: calc(30px + 57px / 2);
    }
}

@media (max-width: 1040px){
    :root{
        --content-size: calc(100vw - 40px);
    }
}

@media (max-width: 800px){
    #user_content{
        grid-template-columns: none !important;
        row-gap: 5px;
    }
}