@font-face {
    font-family: "NK57 Monospace";
    src: url("../fonts/nk57-monospace-no-bk.otf");
}
@font-face {
    font-family: "NK57 Monospace SC";
    src: url("../fonts/nk57-monospace-sc-bd.otf");
}
:root {
    --pink: #c44b7d;
    --dark-pink: #c93874;

    --dark-banner-color: #0e131a;
    --dark-banner-color-rgb: 14, 19, 26;
    --dark-bg-color: #3a3b3d;
    --dark-text-color: #e1e1e1;
    --dark-code-color: #27272b;

    --light-banner-color: #d1dde9;
    --light-banner-color-rgb: 209, 221, 233;
    --light-bg-color: #f5f5f4;
    --light-text-color: #181b1d;
    --light-code-color: #e0e0e0;

    --tip-bg: #00d55240;
    --tip-border: #4ed281;
    --dyk-bg: #ff9f0040;
    --dyk-border: #ff9f00;
    --note-bg: #4d9aff40;
    --note-border: #4d9aff;
}
* {
    -webkit-tap-highlight-color: var(--dyk-bg);
}

*::selection{
    background-color: var(--dark-pink);
    color: var(--dark-text-color);
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}
 
.spinner {
    border: 20px solid rgba(0, 0, 0, 0.1);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border-left-color: var(--pink);
    animation: spin 1s ease infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* The switch - the box around the slider */
.switch {
    display: inline-block;
    --width-of-switch: 3.5em;
    --height-of-switch: 2em;
    /* size of sliding icon -- sun and moon `/
    --size-of-icon: 1.4em;
    /* it is like an inline-padding of switch */
    --slider-offset: 0.3em;
    width: var(--width-of-switch);
    height: var(--height-of-switch);
    position: absolute;
    top: 20px;
    right: 20px;
    transform: scale(0.8);
}
/* Hide default HTML checkbox */
.switch input.theme-switcher {
    opacity: 0;
    width: 0;
    height: 0;
}
/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f4f4f5;
    transition: .4s;
    border-radius: 30px;
    transition: 0.4s;
    box-shadow: 0 0 0.2rem var(--light-text-color);
}
.slider:before {
    position: absolute;
    content: "";
    height: var(--size-of-icon, 1.4em);
    width: var(--size-of-icon, 1.4em);
    border-radius: 20px;
    left: var(--slider-offset, 0.3em);
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(40deg, var(--dark-pink), var(--pink) 70%);
    transition: 0.4s;
}
input.theme-switcher:checked+.slider {
    background-color: #303136;
    box-shadow: 0 0 0.3rem var(--dark-text-color);
}
input.theme-switcher:checked+.slider:before {
    left: calc(100% - (var(--size-of-icon, 1.4em) + var(--slider-offset, 0.3em)));
    background: #303136;
    /* change the value of second inset in box-shadow to change the angle and direction of the moon  */
    box-shadow: inset -3px -2px 5px -2px #8983f7, inset -10px -4px 0 0 #a3dafb;
}
body {
    margin: 0;
    background-color: var(--light-bg-color);
    color: var(--light-text-color);
    transition: all 0.2s ease;
}
.dark {
    color: var(--dark-text-color);
    background-color: var(--dark-bg-color);
}

footer {
    font-family: "Roboto", "Segoe UI Symbol";
    background-color: var(--light-banner-color);
    color: var(--light-text-color);
    font-size: 15px;
    position: relative;
    bottom: 0;
    transition: all 0.2s ease;
    text-align: center;
    padding: 10px 0 30px 0;
    line-height: 30px;
    opacity: 1;
    box-shadow: 0 0 0.2em var(--light-text-color);
    width: 100%;
    height: -moz-fit-content;
    height: fit-content;
}
.dark footer {
    background-color: var(--dark-banner-color);
    color: var(--dark-text-color);
    box-shadow: 0 0 0.2em var(--dark-text-color);
}
footer.hide {
    opacity: 1;
    bottom: -100px;
}
footer a {
    color: var(--light-text-color);
    -webkit-text-decoration-line: underline;
    -webkit-text-decoration-thickness: 2px;
    -webkit-text-decoration-color: var(--dark-pink);
    -webkit-text-decoration-style: solid;
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--dark-pink);
    text-decoration-style: solid;
    font-weight: 600;
    text-underline-offset: 5px;
    transition: all 0.25s ease, color 0.2s ease;
    position: relative;
    top: 0;
    font-size: 18px;
}
footer .footer-text {
    padding: 0 10px 0 10px;
}
footer .footer-links {
    margin-top: 20px;
}
footer .footer-links a {
    margin: 0 10px;
    font-size: 20px;
}
.dark footer a {
    color: var(--dark-text-color);
}
footer a:hover {
    top: -3px;
}

.hidden {
    display: none !important;
}

.faded-out {
    opacity: 0;
}
.faded-in {
    opacity: 1;
}

.link-btn {
    display: inline-block;
    padding: 10px 12px;
    font-size: 20px;
    color: var(--light-text-color);
    background-color: var(--light-bg-color);
    transition: all 0.2s ease;
    border-radius: 10px;
    text-decoration: none !important;
    font-family: "NK57 Monospace SC";
}

.link-btn span {
    position: relative;
    top:0px;
    -webkit-text-decoration-line: underline;
    -webkit-text-decoration-color: var(--dark-pink);
    -webkit-text-decoration-thickness: 1px;
    -webkit-text-decoration-style: solid;
    text-decoration-line: underline;
    text-decoration-color: var(--dark-pink);
    text-decoration-thickness: 1px;
    text-decoration-style: solid;
    text-underline-offset: 5px;
    transition: all 0.2s ease;
}

.dark .link-btn {
    color: var(--dark-text-color);
    background-color: var(--dark-bg-color);
}

.link-btn:hover {
    background-color: var(--light-banner-color);
}

.dark .link-btn:hover {
    background-color: var(--dark-banner-color);
}

.link-btn:hover > span {
    -webkit-text-decoration-thickness: 2px;
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
    top: -2px;
}

.dark .link-btn span {
    -webkit-text-decoration-color: var(--pink);
    text-decoration-color: var(--pink);
}

.logo {
    position: absolute;
    top: 0px;
    left: 20px;
    max-width: 50%;
    max-height: 70px;
    transition: all 0.2s ease-in-out;
}

.logo.faded-out {
    opacity: 0;
}

.dark .logo {
    opacity: 1;
}

@media screen and (max-width: 768px) {
    .switch {
            transform: scale(0.7);
    }
}
