@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;
}

html {
    height: 100%;
}

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

: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;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    pointer-events: none;
    width: 100%;
    max-width: 500px;
}
#messages .msg {
    width: fit-content;
    min-width: 320px;
    padding: 18px 28px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    animation: popup var(--timeout, 3s) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
#messages .msg svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
#messages p {
    font-weight: 500;
    font-size: 17px;
    line-height: 1.4;
    margin: 0;
}

@keyframes popup {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    15% { opacity: 1; transform: scale(1) translateY(0); }
    85% { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(1.05) translateY(-20px); }
}

.input {
    display: grid;
    width: 100%;
}
.input label {
    color: white;
}
.input select,
.input input {
    font-size: 25px;
    background: none;
    border: none;
    border-bottom: 2px solid var(--main-color);
    outline: none;
    color: white;
    outline: 2px dashed transparent;
    outline-offset: 5px;
    padding: 5px 10px;
    transition: .2s;
    width: 100%;
}
.input select {
    cursor: pointer;
}
.input input:hover,
.input input:focus-visible,
.input select:hover,
.input select:focus-visible {
    outline: 2px dashed var(--main-color);
}
.input input:disabled {
    opacity: .3;
    user-select: none;
    cursor: not-allowed;
}
.input input:disabled:hover,
.input input:disabled:focus-visible {
    outline: 2px dashed transparent;
}
.input option {
    background: #111;
    color: var(--main-color);
    border: none;
    outline: none;
}
.input input::-webkit-outer-spin-button,
.input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
}
.input input::placeholder {
    color: color-mix(in srgb, var(--main-color), transparent);
}
.input input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: grid;
    place-items: center;
    width: 50px;
    cursor: pointer;
}
.input input[type="checkbox"]::before {
    content: '✔';
    opacity: .1;
}
.input input[type="checkbox"]:checked:before {
    opacity: 1;
}