@font-face {
    font-family: "League Spartan";
    src: url("/static/main/fonts/LeagueSpartan.ttf");
}
@font-face {
    font-family: "Spectral";
    src: url("/static/main/fonts/Spectral.ttf");
}
@font-face {
    font-family: "Google Sans Flex";
    src: url("/static/main/fonts/GoogleSansFlex.ttf");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

:root {
    --head-font: "League Spartan", sans-serif;
    --text-font: "Spectral", sans-serif;
    --alternate-font: "Google Sans Flex", sans-serif;

    --bg: white;
    --bg-dull: rgb(220, 220, 220);
    --text: black;
    --text-dull: rgb(70, 70, 70);
    --border: rgb(150, 150, 150);
    --accent: rgb(70, 70, 255);
}

[data-theme="dark"] {
    --bg: rgb(20, 20, 20);
    --bg-dull: rgb(40, 40, 40);
    --text: white;
    --text-dull: rgb(200, 200, 200);
    --border: rgb(110, 110, 110);
    --accent: rgb(126, 126, 255);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--text-font);
}

hr {
    border-color: rgb(255, 255, 255);
    width: 100%;
}

/* Customized Scrollbar */

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dull);
}

::-webkit-scrollbar-thumb {
    background: black;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: crimson;
}

/* remove number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* for firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Gloabl Notifications */

.global-notifications {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, 0);
    padding: 10px 20px;
    text-align: center;
    font-family: var(--alternate-font);
    font-size: 14px;
    border-radius: 50px;
    width: 90vw;
    max-width: 500px;
    animation: notification-animation 0.5s ease-in-out;
    z-index: 30000;
}

.global-notifications.error {
    background: crimson;
    color: white;
    display: none;
}

.global-notifications.success {
    background: green;
    color: white;
    display: none;
}

@keyframes notification-animation {
    0% {
        transform: translateX(-50%) translateY(-100%);
    }
    100% {
        transform: translateX(-50%) translateY(0);
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100svh;
    background: rgb(255, 255, 255);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;

    /* fade settings */
    opacity: 1;
    transition: opacity 2s ease;
}

/* fade-out state */
.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
    /* background: black; */
}

/* loader image */
.preloader img {
    width: 250px;
    animation: preloader-animation 50s linear infinite;
    user-select: none;
    -webkit-user-drag: none;
}

.preloader.fade-out img {
    width: 400px;
}

/* rotation */
@keyframes preloader-animation {
    from {
        transform: rotate(0);
    }
    to {
        transform: rotate(360deg);
    }
}
