/* GLOBAL */

html {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #dad8cd;
    background-color: #0c171f;
    padding: 16px;
}

h1, .center {
    text-align: center;
    display: block;
}

h1 {
    clear: both;
}

.subheader {
    margin-top: -20px;
    margin-bottom: 40px;
}

.max-width-800 {
    max-width: 800px;
    margin: 0 auto;
}

header .right {
    float: right;
}

a {
    color: #fcdd2d;
    font-weight: bold;
    background-color: transparent;
    text-decoration-color: rgba(255, 255, 255, 0);
    text-decoration-line: underline;
    text-decoration-thickness: 3px;
    transition: color 0.15s ease-in-out, text-decoration-color 0.15s;
}

a:hover {
    text-decoration-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 8px;
}

code {
    display: inline-block;
    background: #1a2933;
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-size: 85%;
    font-family: "Menlo", "Courier New", monospace;
    white-space: pre;
    margin: 2px;
}

code.token-comment {
    background: transparent;
    color: #bbb;
}

code.token-whitespace {
    background: transparent;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

code.token-string {
    color: #99da97;
    margin-left: 1px;
    margin-right: 1px;
    padding: 0.2em 0.2em;
}

code.token-number {
    color: #97bcda;
}

code.token-symbol {
    color: #d18b8b;
}

header {
    font-size: 20px;
}

header .header-logo {
    margin-right: 8px;
    margin-bottom: -2px;
}

header a {
    margin-left: 16px;
    margin-right: 16px;
}

.github-star-button {
    float: right;
    margin-top: 16px;
    margin-bottom: 16px;
}

.cta {
    margin-top: 24px;
    margin-bottom: 24px;
}

.profile-image {
    margin-right: 10px;
    height: 24px;
    width: 24px;
    line-height: 24px;
    font-size: 12px;
    vertical-align: middle;
    border-radius: 50%;
    background: #c0b375;
    display: inline-block;
    text-align: center;
    color: #0c171f;
    font-family: "Menlo", "Courier New", monospace;
}

.profile-image.big {
    margin-right: 16px;
    height: 42px;
    width: 42px;
    line-height: 42px;
    font-size: 21px;
    margin-top: -4px;
}

@media screen and (max-width: 600px) {
    .mobile-hidden {
        display: none;
    }

    header .right {
        float: none;
        margin: 0 auto;
        display: block;
    }
}

/* LEADERBOARD */

.leaderboard {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard tr {
    border-bottom: 1px solid #eeeeee21;
    font-size: 15px;
}

.leaderboard th, .leaderboard td {
    padding: 8px 4px;
    line-height: 1.5;
}

.leaderboard .rank {
    padding-left: 24px;
    font-weight: bold;
}

@media screen and (max-width: 600px) {
    .leaderboard .rank {
        padding-left: 4px;
    }
}

.leaderboard .username {
    max-width: 50vw;
    overflow-wrap: anywhere;
}

.left-align {
    text-align: left;
}

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

/* LEFT-RIGHT LAYOUT */

.left-right-layout {
    display: flex;
    justify-content: space-between;
    column-gap: 64px;
    row-gap: 48px;
}

.left-right-layout .left {
    width: 50%;
}

.left-right-layout .right {
    width: 50%;
}

.left-right-layout div h2:first-child {
    margin-top: 0;
}

/* mobile: stack left and right */
@media (max-width: 1000px) {
    .left-right-layout {
        flex-direction: column;
    }

    .left-right-layout .left {
        width: 100%;
    }

    .left-right-layout .right {
        width: 100%;
    }
}

/* FORM */

/* Customize the label (the container) */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-top: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}

/* Hide the browser's default checkbox */
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.checkbox-container .checkbox {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #b8bec2;
    border-radius: 2px;
}

/* On mouse-over, add a grey background color */
.checkbox-container:hover input ~ .checkbox {
    background-color: #c0b375 !important;
}

.checkbox-container:active input ~ .checkbox {
    background-color: #a2976a !important;
}

/* When the checkbox is checked, add a yellow background */
.checkbox-container input:checked ~ .checkbox {
    background-color: #fcdd2d;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkbox-container .checkbox:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.checkbox-container input:checked ~ .checkbox:after {
    display: block;
}

/* Style the checkmark/indicator */
.checkbox-container .checkbox:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid #0b171f;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

button, .button, input[type=submit] {
    background-color: #fcdd2d;
    border: none;
    padding: 12px 24px;
    margin-top: 8px;
    margin-bottom: 8px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    color: #0b171f;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
}

button:hover, .button:hover, input[type=submit]:hover {
    background-color: #c0b375;
    color: #0b171f;
}

button:active, .button:active, input[type=submit]:active {
    background-color: #a2976a;
    color: #000000;
}

button:disabled, .button:disabled, input[type=submit]:disabled {
    background-color: #c9c9b4;
    color: #434343;
    cursor: wait;
}

input[type=text] {
    line-height: 200%;
    background-color: #fcdd2d;
    border: none;
    margin: 2px;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.85em;
}

select {
    background-color: #fcdd2d;
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 16px;
    padding: 8px;
    height: 36px;
    font-weight: bold;
    border: none;
    border-radius: 2px;
    cursor: pointer;
}

textarea {
    margin-top: 8px;
    margin-bottom: 8px;
    max-width: calc(100% - 4px);
    border: none;
    border-radius: 2px;
    background-color: #2b2b2b;
    color: #eaeaea;
    padding: 0.4em 0.6em;
    line-height: 160%;
    resize: none;
    font-size: 0.85em;
    font-family: "Menlo", "Courier New", monospace;
}

textarea::placeholder {
    color: #888;
}

textarea:focus, input:focus, select:focus, button:focus, .button:focus, .checkbox-container input:focus ~ .checkbox {
    outline: none;
    box-shadow: 0 0 6px 4px #cccccc52;
}

a:focus {
    outline: none;
    box-shadow: 0 0 0 3px #cccccc52;
}

dialog:focus {
    outline: none;
}

a {
    border-radius: 2px;
    border: 1px solid transparent;
}

.text-secondary-info {
    color: #888;
}

.text-small {
    font-size: 90%;
}

.text-big {
    font-size: 120%;
}

.right-spacing {
    margin-right: 16px;
}

/* Error-Dialog */

dialog {
    background-color: #10161b;
    color: #dad8cd;
    border-radius: 8px;
    border: none;
    box-shadow: 0 0 64px 10px #111, 0 0 10px #080808;
}

dialog .header {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 16px;
}

dialog .footer {
    float: right;
}

dialog .footer button {
    margin-top: 16px;
    margin-bottom: 0;
}

dialog code {
    margin-top: 10px;
    padding: 0.4em 0.8em;
}

dialog {
    box-shadow: 0 0 0 100vw rgba(0, 0, 0, 0.7);
    animation: fadeInFromNone 0.15s ease-in-out;
}

@keyframes fadeInFromNone {
    0% {
        scale: 95%;
        opacity: 0;
    }

    1% {
        scale: 95%;
        opacity: 0;
    }

    100% {
        scale: 100%;
        opacity: 1;
    }
}