@font-face {
    font-family: roboto;
    src: url("fonts/roboto.ttf");
}

@font-face {
    font-family: montserrat;
    src: url("fonts/montserrat.ttf");
}

@keyframes revolve {
    0% {
        transform: translate(var(--dx), var(--dy)) rotate(0);
    }

    100% {
        transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
    }
}

/* general */

body, html {
    margin: 0;
    padding: 0;

    font-family: roboto, sans-serif;

    color: #fff;
}

#main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10% 5%;

    text-align: center;
}

#fast {
    transition: .1s linear background-color;
    cursor: pointer;

    z-index: 1;
    position: fixed;
    top: 20px;
    right: 20px;

    display: flex;
    justify-content: center;
    align-items: center;

    width: 50px;
    height: 50px;

    border: 1px solid transparent;
    border-radius: 25px;
    background-color: #FFF8;
}

#fast:hover {
    background-color: #FFFC;
}

#fast:active {
    border: 1px solid #0008;
}

#fast::before {
    content: "Eco mode";

    position: absolute;
    top: 50%;
    transform: translate(-100%, -50%);

    width: max-content;

    font-size: 16px;
    color: #FFFC;
}

#fast img {
    width: 80%;
    height: 80%;

    filter: opacity(0.5);
}

#shapes {
    z-index: -1;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* bg color here to avoid hiding the shapes because of the z-index */
    background: radial-gradient(#355070, #203145);
}

#shapes>div {
    position: absolute;
}

#shapes.fast>div {
    display: none;
}

#shapes:not(.fast)>div {
    animation: var(--dt) revolve linear infinite;
    box-shadow: 0 0 50px #0003;
}

h1 {
    position: relative;
    margin: 20px 0;

    font-size: 64px;
    font-family: montserrat, sans-serif;

    color: #EA8689;
}

h1, body:not(.mobile) :is(h1::before, h1::after) {
    filter: drop-shadow(0 0 10px #B5657680);
}

body:not(.mobile) h1::before, body:not(.mobile) h1::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;

    transform: translate(-50%, -50%);

    width: 80px;
    height: 6px;

    background-color: #EA8689;
    border-radius: 3px;
}

body:not(.mobile) h1::before {
    left: -10%;
}

body:not(.mobile) h1::after {
    left: 110%;
}

h2 {
    margin: 20px 0;

    font-size: 22px;
    font-weight: normal;
    color: #FFFC;
}

#title {
    position: relative;
}

#title::before {
    content: "D_00's";

    position: absolute;
    top: 0;

    font-size: 20px;
    font-weight: bold;
    color: #FFFC;
}

body:not(.mobile) #title::before {
    left: 6px;
}

body.mobile #title::before {
    left: 50%;
    transform: translateX(-50%);
}

/* slider */

label {
    cursor: pointer;

    display: flex;
    gap: 10px;

    margin: 20px 0;
    padding: 10px 20px 10px 10px;

    border: 2px solid transparent;
    border-radius: 30px;
    background-color: #6D597A;
    color: #FFFCFA;

    font-weight: bold;
    font-size: 24px;
}

label:hover {
    border: 2px solid #FFF1;
}

#show {
    display: none;
}

.slider, .slider:before {
    transition: .3s;
}

.slider {
    position: relative;

    width: 60px;
    height: 30px;
    box-sizing: border-box;

    border: 3px solid #FFF;
    border-radius: 15px;
}

#show:checked + .slider {
    background-color: #EA8689;
}

.slider:before {
    content: "";

    position: absolute;
    top: 2px;
    left: 2px;

    width: 20px;
    height: 20px;

    border-radius: 50%;
    background-color: #FFF;
}

#show:checked + .slider:before {
    left: 32px;
}

/* password */

body:not(.mobile) #pass-container {
    --w: 500px;
}

body.mobile #pass-container {
    --w: 80%;
}

#pass-container {
    margin-bottom: 30px;
    padding: 10px;

    width: var(--w);

    border-radius: 14px;
    background-color: #F1EDEB;
    box-shadow: 0 0 20px #FFF3;
}

#passwd {
    padding: 3px;

    box-sizing: border-box;
    width: 100%;

    border: 2px solid #0002;
    border-radius: 10px;
    background-color: #FFF;
    color: #000;

    font-size: 32px;
    font-family: "consolas";
    text-align: center;
}

#passwd::placeholder {
    color: #C3C3C3;
}

#bar {
    position: relative;
    margin: 10px 0;

    width: 100%;
    height: 10px;

    border-radius: 5px;
    background-color: #C3C3C3;
}

#bar:after {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: var(--percent);
    height: 100%;

    border-radius: 5px;
    background-color: var(--col);
}

#feedback {
    color: var(--col);

    font-size: 16px;
    font-weight: bold;
}

/* underlines and tips */

#underlines .bar-container {
    display: flex;
    justify-content: center;

    margin: 3px;

    color: transparent;
}

#underlines .bar-container div {
    height: 6px;

    font-family: "consolas";
    font-size: 32px;
}

#underlines .bar {
    cursor: pointer;

    --col: #B56576;
    border-radius: 3px;
    background-color: var(--col);
}

#underlines .hover .bar {
    --col: #EA8689;
}

#tips:has(*) {
    margin-top: 20px;

    border-top: 1px solid #0003;
}

#tips p {
    cursor: pointer;

    margin: 10px 0;

    --col: #B56576;
    color: var(--col);
    font-size: 14px;
    font-weight: bold;
}

#tips p.hover {
    --col: #EA8689;
}

/* popup */

#popup {
    z-index: 2;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: #0007;
}

#shapes:not(.fast) ~ #popup:not(.hidden) {
    backdrop-filter: blur(5px);
}

#popup.hidden {
    display: none;
}

#popup>div {
    padding: 40px 60px;

    outline: 3px solid #E3706E;
    outline-offset: 5px;
    box-shadow: 0 0 50px #E3706E;

    border-radius: 30px;
    background-color: #F1EDEB;
}

#popup h3 {
    margin: 20px 0;

    font-size: 64px;
    font-weight: bold;
    color: #E3706E;
}

#popup p {
    margin: 30px 0;

    line-height: 1.5em;
    font-size: 18px;
    font-weight: bold;
    color: #222;
}

#popup a {
    cursor: pointer;

    display: block;
    margin-top: 50px;
    padding: 10px 20px;

    border: 2px solid transparent;
    border-radius: 30px;
    background-color: #6D597A;
    color: #FFFCFA;

    font-size: 24px;
}

#popup a:hover {
    border: 2px solid #FFF5;
}

/* bottom */

.notice {
    margin: 1em 0;

    font-size: 16px;
    color: #FFF7;
}

:is(.notice, #more-container) a {
    color: #EAAC8B;

    font-weight: bold;
    text-decoration: none;
}

:is(.notice, #more-container) a:hover {
    color: #F1C1A7;
}

#more {
    cursor: pointer;
    transition: .3s transform;

    position: absolute;
    bottom: 80px;
    left: 50%;

    margin: 0;

    transform: translateX(-50%);
}

#more::after {
    content: "";

    transition: .3s transform;
    transform: translateX(-50%);

    position: absolute;
    bottom: -50px;
    left: 50%;

    width: 40px;
    height: 40px;

    /* extend cursor region */
    padding-top: 20px;

    background-image: url("images/down.png");
    background-size: contain;
    background-position: center;
    filter: invert(1) opacity(0.8);
}

#more:hover {
    transform: translate(-50%, 10px);
}

#more:hover::after {
    transform: translate(-50%, 10px);
}

/* more tips */

#more-container {
    margin-top: 300px;
    padding: 50px 10%;

    width: 80%;

    background-color: #0008;

    text-align: left;
}

#more-container::before {
    z-index: -1;
    content: "";
    transform: translate(-10%, calc(-100% - 50px));
    position: absolute;

    width: 100%;
    height: 200px;

    background: linear-gradient(0, #0008, transparent);
}

#more-container section {
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
}

#more-container header {
    transition: .3s;
    cursor: pointer;

    position: relative;
    padding: 20px;

    width: calc(100% - 40px);
    max-width: 700px;

    box-sizing: border-box;
    border: 2px solid #B56576;
    border-radius: 14px;
    color: #FFE0D0;

    text-shadow: 0 0 10px #FFE0D050;

    font-size: 24px;
}

#more-container header:hover {
    color: #FFFCFA;
}

#more-container section:has(p.show) header {
    background-color: #3A2A4580;
}

#more-container header::after {
    transition: .3s;

    content: "";

    position: absolute;
    top: 21px;
    right: 21px;

    width: 30px;
    height: 30px;

    background-image: url("images/down.png");
    background-size: contain;
    background-position: center;

    transform: rotate(-90deg);
    filter: invert(1) opacity(0.8);
}

#more-container :is(header:hover, section:has(p.show) header)::after {
    transform: rotate(0);
}

#more-container section:has(p.show) header::after {
    filter: invert(1) opacity(0);
}

#more-container p {
    transition: .3s;

    box-sizing: content-box;
    margin: 0;
    padding: 10px 10px 50px 10px;

    width: 80%;
    max-width: 600px;

    border: 2px solid #B56576;
    border-top: none;
    border-bottom: none;

    color: #FFFC;
    font-size: 16px;
    text-align: justify;
}

#more-container p:not(.show) {
    /* collapsed by default */
    max-height: 0;
    overflow: hidden;

    padding: 0 10px;
}

#more-container p.show {
    background-color: #3A2A4550;
}

#more-container p>br {
    content: "";
    display: block;
    margin: .5em;
}

#more-container p>code {
    font-family: consolas, monospace;

    color: #B56576;
}

#more-container p>strong {
    font-weight: strong;
    font-style: italic;
    color: #FFFCFA;
}
