body {
    margin: 0;
}
html {
    font-family: Quicksand;
    font-size: 18px;
    background-color: #f4f4f4;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: scroll;
    position: relative;
    overflow-x: hidden;
}
.page {
    gap: 20px;
    margin-top: 40px;
}
html.index {
    padding: 0;
}
.navbar {
    position: fixed;
    width: 100%;
    background-color: #3174d7;
    padding: 0 20px;
    box-shadow: 0 1px 10px 0 rgb(0 0 0 / 18%);
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    z-index: 9;
}
.navbar .navbar-content {
    display: flex;
    text-align: right;
}
.block-preview .block-preview-body {
    min-height: 200px;
    height: 100%;
}
.navbar a {
    color: white;
    font-weight: 500;
    padding: 10px 15px;
    display: block;
    display: flex;
    align-items: center;
}
code {
    background-color: #f4f4f4;
    padding: 0 5px;
}
h2 {
    margin-top: 0;
    font-size: 25px;
}
.sidebar {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.sidebar .sidebar-task, .sidebar .sidebar-editor {
    background-color: white;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%);
    padding: 15px;
    height: 50%;
}
.block {
    background-color: white;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%);
    padding: 15px;
}
.block.block-preview {
    
display: flex;
    
flex-direction: column;
}
.block-list .block {
    display: flex;
    align-items: center;
    gap: 20px;
}
.block .block-icon i {
    font-size: 55px;
    color: gold;
}
.block .block-icon i.fa-meda-silver {
    color: silver;
}
.block .block-icon i.fa-meda-bronze {
    color: #df9000;
}
.navbar h2 {
    margin: 0;
    color: white;
    line-height: 43px;
    margin-right: 40px;
}
.page.page-level {
    grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
    grid-template-areas:
        "level level"
        "task preview"
        "css html";
    display: grid;
}
.block.block-level {
    grid-area: level;
    background-color: #3174d7;
    color: white;
    text-align: center;
}
.code {
    display: flex;
    font-size: 18px;
    background-color: #f4f4f4;
    width: 100%;
    font-weight: 600;
    overflow: hidden;
}
.code + .button {
    margin-top: 20px;
}
.code .code-lines {
    text-align: center;
    padding: 0 5px;
    background-color: #e2e2e2;
    padding: 15px 10px 15px 15px;
    height: 100%;
}
.code-css .css-selector:-internal-autofill-selected {
    color: #4472C4 !important;
}
.code-css .css-selector, .css-selector:-webkit-autofill {
    color: #4472C4 !important;
}
.code-css .css-command:-internal-autofill-selected {
    color: #ED7D31 !important;
    -webkit-text-fill-color: #ED7D31 !important;
}
.css-command, .code-html .html-attribute, .code-css .css-command:-webkit-autofill {
    color: #ED7D31 !important;
    -webkit-text-fill-color: #ED7D31 !important;
}
.css-value-number {
    color: #4472C4 !important;
    -webkit-text-fill-color: #4472C4 !important;
}
.css-value {
    color: #70AD47;
    -webkit-text-fill-color: #70AD47 !important;
}
.code .code-body .start ~ div:not(.start, .end, .css-selector){
    padding-left: 20px;
}
.code .code-body div > div {
    display: none;
}
.code input {
    background-color: #e0e0e0;
    font-size: 18px;
    color: #ED7D31;
    font-weight: 600;
    font-family: 'Quicksand';
    border-width: 0 !important;
    outline: none !important;
    padding: 0;
}
.code input:hover, .code input:target, .code input:focus, .code input:active {
    border-color: #888888 !important;
}
h1 {
    margin: 0;
}
.reach span, .code span, .code-html .html-tag, .code-html .html-value, .code-css .css-value, .code-css .css-value-number, .code-css .css-command, .code-html .html-attribute, .code-css .css-selector {
    font-style: normal;
    font-size: 18px;
    opacity: 1;
    font-weight: 600;
    text-decoration: none;
    text-transform: none;
}
.code-html .html-tag {
    color: #7030A0;
}
.code-html .html-value {
    color: #4472C4;
}
.code-html .code-body, .code-css .code-body {
    color: #767171;
    padding: 15px 15px 15px 10px;
    outline: none;
}
.page .code.code-css .code-body br + input, .window .code.code-css .code-body br + input, .page .code.code-css .code-body br + .css-command, .window .code.code-css .code-body br + .css-command {
    margin-left: 25px;
}
.window .window-close {
    position: absolute;
    right: 20px;
    top: 18px;
}
.button {
    background-color: #3174d7;
    font-family: 'Quicksand';
    font-size: 18px;
    padding: 8px 15px;
    color: white;
    font-weight: 600;
    border-width: 0;
    transition: background-color 0.3s ease-in-out;
    cursor: pointer;
    display: inline-block;
}
.button:hover, .navbar a:hover {
    background-color: #4e4e4e;
}
form {
    margin: 0;
}






.window.window-alert.window-alert-show{
    animation: notice 6s ease-in-out;
}
.window.window-alert {
    position: fixed;
    margin: 0 auto;
    height: max-content;
    z-index: 999999;
    max-width: 450px;
    background-color: #fff;
    box-shadow: 0 5px 10px 0 rgb(0 0 0 / 35%);
    overflow: hidden;
    margin-top: 50px;
    bottom: 25px;
    right: 25px;
    top: initial;
    left: initial;
    width: initial;
    transform: translateY(100px);
    opacity: 0;
}
.window.window-alert .window-content {
    background-color: #de4b4b;
    color: #fff;
    flex-direction: row;
    justify-content: normal;
    position: relative;
    width: 100%;
    display: flex;
}
.window .window-icon {
    background-color: #0000001a;
    padding: 0 15px;
    display: flex;
    align-items: center;
}
.window.window-alert .window-icon i {
    width: 15px;
    text-align: center;
}
.window.window-alert .window-content .window-body {
    word-break: break-word;
    padding: 15px 19px;
    font-weight: 600;
    max-height: 500px;
    overflow-y: auto;
}

@keyframes notice {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    20% {
        transform: translateY(0px);
        opacity: 1;
    }
    50% {
        transform: translateY(0px);
        opacity: 1;
    }
    70% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}

.correct, .wrong {
    display: none;
    font-size: 150px;
    position: fixed;
    color: #4caf50;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto auto;
    width: fit-content;
    height: fit-content;
    border-radius: 100%;
    margin-top: 20%;
    background-color: white;
}
.wrong {
    color: #de4b4b;

}
.correct.correct-show {
    display: block;
    animation: score 2s ease-in-out;
    animation-fill-mode: forwards;
    
}
.wrong.wrong-show {
    display: block;
    animation: score 2s ease-in-out;
    animation-fill-mode: forwards;
}

@keyframes score {
    0% {
        opacity: 0;
        transform: scale(0) rotate(45deg);
    }
    20% {
        opacity: 0.5;
        transform:  scale(1.4) rotate(-20deg);
    }
    40% {
        opacity: 1;
        transform:  scale(1);
    }
    80% {
        opacity: 1;
        transform:  scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(45deg);
    }
}

html.index body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 0.25fr 1fr;
    grid-template-areas: "logo logo" "register login";
    gap: 20px;
    align-items: center;
}
.column.column-register {
    grid-area: register;
    text-align: center;
}
.column.column-login {
    grid-area: login;
    text-align: center;
}
.logo {
    grid-area: logo;
}
.logo img {
    width: 450px;
    display: block;
    margin: 0 auto;
}
.column i {
    font-size: 85px;
    color: #3174d7;
}
.column input[type="text"] {
    padding: 7px 10px;
    background-color: #fff;
    padding: 15px 15px;
    border-width: 0 !important;
    color: #8a8a8a !important;
    font-weight: 700;
    font-size: 16px;
    min-width: 300px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%);
    font-family: 'Quicksand';
    outline: none !important;
    transition: color 0.3s ease, background 0.3s ease, border 0.3s ease;
}
.column input[type="submit"] {
    font-family: 'Quicksand';
    background-color: #3174d7;
    color: #fff !important;
    width: 200px;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0 auto;
    text-align: center;
    min-width: auto;
    padding: 12px 15px;
    height: auto;
    line-height: normal;
    outline: none;
    font-size: 18px;
    border-width: 0;
}
.column form {
    display: grid;
    justify-content: center;
    gap: 20px;
}
.column input::placeholder {
    color: #8a8a8a;
    font-family: Quicksand;
}
.column input[type="submit"]:focus, .column input[type="submit"]:hover {
    background-color: #4e4e4e;
    color: #fff !important;
}
.column input:-webkit-autofill, .column input:-webkit-autofill:focus, .column input:-webkit-autofill:hover {
    -webkit-text-fill-color: #3174d7;
    color: #3174d7 !important;
}
.column input:focus, .column input:focus::placeholder, .column input:hover, .column input:hover::placeholder {
    color: #3174d7 !important;
}
a {
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease-in-out;
}
.block-list {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}
span.nickname, span.level {
    font-weight: 600;
}
.reach {
    display: flex;
    position: fixed;
    align-items: center;
    gap: 20px;
    top: 350px;
    right: 0;
    background-color: #3174d7;
    box-shadow: 0 5px 10px 0 rgb(0 0 0 / 35%);
    border-top-left-radius: 60px;
    border-bottom-left-radius: 60px;
    transform: translateX(360px);
    padding-right: 20px;
    z-index: 999;
}
.board {
    position: fixed;
    align-items: center;
    gap: 20px;
    top: 100px;
    right: 0;
    background-color: white;
    box-shadow: 0 5px 10px 0 rgb(0 0 0 / 35%);
    transform: translateX(395px);
    transition: 0.5s ease transform;
}
.board .board-head {
    background-color: #3174d7;
    display: flex;
    align-items: center;
    gap: 40px;
    box-shadow: 0 5px 10px 0 rgb(0 0 0 / 12%);
}
.board .code {max-height: 594px;overflow-y: auto;overflow-x: auto;white-space: nowrap;}
.board .board-body {
    padding: 15px 20px;
    max-width: 350px;
}
.code .css-field {
    display: none;
}
.code input {
    display: inline-block;
}
.board .board-title {
    font-size: 30px;
    color: white;
    font-weight: 600;
}
.board .board-icon {
    color: #ffffff;
    font-size: 70px;
    padding: 25px 25px 25px 25px;
    border-top-left-radius: 100%;
    border-bottom-left-radius: 100%;
    z-index: 9;
    background-color: #3174d7;
    width: max-content;
    margin-left: -100px;
}
.reach.reach-show {
    display: flex;
    animation: reach 4s ease-in-out;
    animation-fill-mode: forwards;
}
.reach.reach-show .reach-icon i {
    animation: shake 1s ease-in-out;
    animation-delay: 1.3s;
}
@keyframes shake {
    0% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-90deg) scale(1.1);
    }
    50% {
        transform: rotate(0deg) scale(1.1);
    }
    75% {
        transform: rotate(-90deg) scale(1.1);
    }
    100% {
        transform: rotate(0deg) scale(1);
    }
}
@keyframes reach {
    0% {
        transform: translateX(360px);
    }
    15% {
        transform: translateX(0px);
    }
    85% {
        transform: translateX(0px);
    }
    100% {
        transform: translateX(360px);
    }
}
.reach .reach-icon {
    color: #ffffff;
    font-size: 70px;
    padding: 25px 20px 25px 25px;
    border-top-left-radius: 100%;
    border-bottom-left-radius: 100%;
    z-index: 9;
    background-color: #3174d7;
}
.reach .reach-body {
    color: white;
    max-width: 200px;
}
.reach .reach-nickname, .reach .reach-level {
    font-weight: 600;
}
.window h2 {
    padding: 15px;
    background-color: #3174d7;
    color: white;
    margin: 0;
}
.window {
    background-color: white;
    position: fixed;
    margin: 0 auto;
    top: 50px;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 1200px;
    height: max-content;
    box-shadow: 0 5px 10px 0 rgb(0 0 0 / 35%);
    z-index: 99;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 999;
}
.window.window-show, .window.window-show ~ .window-opacity {
    opacity: 1;
    visibility: visible;
}
.window .window-body {
    padding: 20px;
    display: grid;
    gap: 20px;
    max-height: 700px;
    overflow-y: auto;
}
p {
    margin: 0;
}
.window .window-content {
    gap: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.window .window-code {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: flex-start;
}
.window .window-result {
    display: grid;
    align-content: space-between;
    gap: 20px;
}
.window-opacity {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000070;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    z-index: 99;
}

@media (max-width: 1000px) {
    .page.page-level {
        grid-template-columns: 1fr;
        grid-template-areas:"level""task""preview""html""css";
    }
}

@media (max-width: 850px) {
    html.index body {
        grid-template-columns: 1fr;
        grid-template-rows:initial;
        grid-template-areas: "logo" "register" "login";
    }
}

@media (max-width: 600px)
{
    .page {
        margin-top: 80px;
    }
    .navbar {
        flex-direction: column;
    }
}
body div {
    font-style: normal;
    font-size: inherit;
    opacity: 1;
    font-weight: inherit;
    text-decoration: none;
    text-transform: none;
    display: block;
    border-radius: 0;
    background-color: transparent;
    color: inherit;
    width: auto;
    height: auto;
    opacity: 1;
    padding: 0;
    margin: 0;
    border: none;
}