/* latin */
@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/barlow/v12/7cHpv4kjgoGqM7E_DMs5.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin */
@font-face {
    font-family: 'Barlow500';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/barlow/v12/7cHqv4kjgoGqM7E3_-gs51os.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }

:root {
    --background-color: hsl(3, 100%, 90%);
    --text-color: hsl(0, 0%, 100%);
    --large-text-color:hsl(0, 98%, 35%);
    --help-text-color: hsl(0, 0%, 0%);
    --header-button-text-color:hsl(341, 66%, 51%);
    --header-button-color: hsl(0, 92%, 95%);
    --header-background-color: 	hsl(341, 66%, 51%);
    --randomize-button-background-color: hsl(0,0%, 100%);
    --randomize-button-text-color: hsl(0, 0%, 0%);
    --text-on-background: hsl(0, 0%, 0%);
    --slider-color: hsl(0, 0%, 100%);

    --loader-color: hsl(210, 33%, 98%);
    --loader-circle-color: hsl(0, 0%, 89%);
}

.dark-mode {
    --background-color: hsl(0, 0%, 12%);
    --text-color: hsl(0, 0%, 89%);
    --large-text-color: hsl(0, 0%, 89%);
    --help-text-color: hsl(300, 100%, 79%);
    --header-button-text-color: hsl(0, 0%, 89%);
    --header-button-color: hsl(0, 0%, 45%);
    --header-background-color: 	hsl(0, 0%, 12%);
    --randomize-button-background-color: hsl(0, 0%, 88%);
    --randomize-button-text-color: hsl(0, 0%, 0%);
    --text-on-background: hsl(0, 0%, 88%);
    --slider-color: hsl(0, 0%, 100%);

    --loader-color: hsl(0, 0%, 12%);
    --loader-circle-color: hsl(0, 0%, 38%);
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Barlow500';
}

html {
    width: 100vw;
    overflow-x: hidden; /* to stop side scrolling */ 
}

body {
    background-color: var(--background-color);
    overflow-x: hidden; /* to stop side scrolling */ 

    height: 100vh;
    width: 100%;
}




h1 {
    text-align: center;
    margin-top: 1rem;
    color: var(--large-text-color);
}

.container{
    height: 80vh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#champion_name {
    font-size: 2rem;
    color: var(--text-on-background);
}

#random_button {
    height: 4rem;
    width: 6rem;
    background-color: var(--randomize-button-background-color);
    color: var(--randomize-button-text-color);
    border: none;
    border-radius: 9%;

    font-family: 'Barlow500';
}


header {
    top: 0;
    opacity: 1;
    width: 100%;
    margin: auto;

    background-color: var(--header-background-color);
}

body.dark-mode header {
    border-width: 2px;
    border-bottom-style: solid;
    border-image: repeating-linear-gradient(to right, white 0%, white 10px, transparent 10px, transparent 20px) 1;
}

header > ul {
    list-style-type: none;
    padding: 0;
    height: 48px;
    margin: 0;
    width: 100%;

    font-size: 1rem;

    position: relative;

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

header button {
    height: 1.5rem;
    min-width: 4rem;
    max-width: fit-content;

    color: var(--header-button-text-color);
    background-color: var(--header-button-color);
    border: none;
    border-radius: 6.5%;
    padding: 0.1rem;

    font-size: 1rem;
    margin: 16px;
}

.example {
    height: 1.5rem;
    min-width: 4rem;
    max-width: fit-content;

    color: var(--header-button-text-color) !important; /* to not get overwritten */
    background-color: var(--header-button-color) !important; /* to not get overwritten */ 
    border: none;
    border-radius: 6.5%;
    padding: 0.1rem;

    font-size: 1rem;
    margin-bottom: 16px;
    margin-left: 4px;
    margin-right: 4px;
}

.holder {
    top: 5px;
 
    width: 100vw;
    height: 40px;

    position: absolute;
    pointer-events: none;
}

.holder > .slider {
    background: linear-gradient(
        0.25turn,
        transparent,
        var(--slider-color),
        transparent
    );
    width: 50px;
    height: 3px;
    z-index: 100;
    position: absolute;
    left: 70px;
    opacity: 1;
}

li{
    margin: 8px;
    float: left;
    text-align: center;
    

    z-index: 10;
}

li a{
    display: block;
    margin: 6px;

    color: #fefefe;
    z-index: 10;

    transition: all 0.5s ease-in-out;
}

li a:hover {
    color: rgb(210, 210, 210);
    opacity: 1;
}

#darkModeSwitch {
    margin-left: auto;
    background: none;
    height: auto;
}

#darkModeImage {
    width: 3rem;
    height: 3rem;
}

.grid {
    width: 98%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* justify-content: left; */
    justify-content: space-between;

    margin: 1rem;
    margin-right: 2rem;
}

.grid p {
    max-width: 128px;
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: center;

    transition: opacity 0.15s;
    color: var(--text-on-background);

}

.grid button {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;

}

.grid img {
    border-radius: 3px;

    /* height: auto;
    width: 7vw; */

    transition: all 0.15s;
}

.grid .customChar {
    border: 3px solid black;
}


#champion_image {
    /* display: none; */
    margin: 1rem;
    height: 140px;
    width: 140px;
    border-radius: 5%;
}

.roleButtons {
    min-width: 55px;
}

#allRole {
    display: none;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;

    background-color: var(--loader-color);
    transition: opacity 0.75s, visibility 0.75s;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader::after {
    content: "";
    width: 75px;
    height: 75px;
    border: 15px solid var(--loader-circle-color);
    border-top-color: #7449f5;
    border-radius: 50%;
    animation: loading 0.75s ease infinite;
}


@keyframes loading {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999; /* Ensure it appears above other elements */
    pointer-events: none; /* Allow clicks to pass through */
}


canvas {
    pointer-events: none;
}

.helpContainer {
    display: flex;
    flex-direction: column;
    flex-grow: 0;
    align-items: center;
}
.helpContainer button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: fit-content
}
/* .helpContainer div{
    width: 80vw;
    display: none;
    color: var(--help-text-color);
} */


.helpContainer div {
    width: 80vw;
    display: none;
    color: var(--help-text-color);
    text-align: center;
}

.helpContainer div div {
    display: inline-table;
    width: fit-content;
    margin: 1rem;
}

.helpContainer h1 {
    color: var(--large-text-color);
    margin-top: 1rem;
}




@media screen and (width <= 600px) {
    header > ul {
        flex-wrap: wrap;
        align-items: start;
    }

    input {
        margin: 16px auto;
    }
    .grid {
        margin: 0.3rem;
        margin-top: 4rem;
    }
  }





/* Mobile */

@media (max-width: 700px) {
    header #supportRole, header #midRole, header #bottomRole, header #jungleRole, header #topRole {
        display: none;
    }

    #allRole {
        display: block;
        max-width: none;
        margin: auto;
        width: 10rem;
        font-size: 1.2rem;
    }

    body.home-page header button {
        margin: 0;
    }

    body.filter-page li, body.filter-page header button {
        margin: 0;
        margin-top: auto;
        margin-bottom: auto;
    }
    header input {
        width: 20vw;
    }


    @media (max-width: 420px) {
        #allRole {
            width: fit-content;
        }
    }
}


