@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fredoka', sans-serif;
}

body {
    width: 100%;
    height: 100vh;
    height: 100dvh;
}

:root {
    --main-color: #4f75ff;
}

::selection {
    background: var(--main-color);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: color-mix(in srgb, gray, var(--main-color));
}

::-webkit-scrollbar-thumb {
    background: #111;
}

.main-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--main-color);
    border: none;
    outline: none;
    color: white;
    fill: white;
    border-radius: 5px;
    text-decoration: none;
    transition: .2s;
    cursor: pointer;
}

.main-btn:hover,
.main-btn:focus-visible {
    color: white;
    background: color-mix(in srgb, var(--main-color), gray);
}

.main-btn svg {
    width: 15px;
}

a {
    color: white;
    background: var(--main-color);
    outline: none;
    padding-inline: 5px;
}

a:hover,
a:focus-visible {
    color: var(--main-color);
    background: white;
}

#loading {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    place-items: center;
    z-index: 100;
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.3);
    transition: .2s;
    display: none;
}
#loading[data-loading] {
    display: grid;
}

#loading span {
    width: 50px;
    height: 50px;
    aspect-ratio: 1/1;
    border: 5px solid var(--main-color);
    border-top: 5px solid transparent;
    border-radius: 100%;
    animation: rotate 1s infinite ease;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.container {
    animation: slideIn 1s ease-in-out;
}

@keyframes slideIn {
    from {
        transform: translate(0, -3%);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

#messages {
    position: fixed;
    padding: 10px;
    padding-bottom: 110px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 1;
    pointer-events: none;
}
#messages .msg {
    min-width: 300px;
    height: fit-content;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    padding: 10px;
    color: var(--main-color);
    fill: var(--main-color);
    background: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    border-radius: 10px;
    animation: fadeInOut var(--timeout, 10s) forwards;
}
#messages svg {
    width: 35px;
    height: 35px;
    aspect-ratio: 1/1;
}

@keyframes fadeInOut {
    0% {opacity: 0;}
    20% {opacity: 1;}
    80% {opacity: 1;}
    100% {opacity: 0;}
}