@font-face {
    font-family: YurukaStd;
    src: url("./fonts/FOT-YurukaStd-UB.otf") format("opentype");
}

@font-face {
    font-family: UDMarugo;
    src: url("./fonts/FOT-UDMarugo_LargePr6N-DB.otf") format("opentype");
}

@font-face {
    font-family: Bukotsu;
    src: url("./fonts/HOT-Bukotsu Std U.otf");
}

.bukotsu {font-family: Bukotsu, YurukaStd, sans-serif; }

@media (scripting: none) {
    .noJS {display: none}
}

* {-webkit-tap-highlight-color: transparent;}

:focus-visible {
    outline: var(--focus-outline);
}

.focus-inside:has(:focus-visible) {outline: var(--focus-outline);}

html {
    min-width: 100%;
    min-height: 100lvh;
    width: 100%;
    margin: 0;
}

body {
    font-family: var(--font-standard), sans-serif;
    min-height: 100vh;
    min-width: fit-content;
    width: 100%;
    margin: 0;

    display: flex;
    flex-direction: column;


    >.bodyContents {flex: 1 0 auto;}
}

header,footer {
    flex-shrink: 0;
}

@media all and (max-width: 650px) {
    header {
        .headerNavigationTitle{font-size: 1.5em;}
        .headerNavigationPopupContainer ul>li {font-size: 1em;}
        .headerNavigationSection.wide{display: none;}
        .headerNavigationSection.small{display: block}
    }

    footer {
        .navItem {font-size: 1em};
        .footerTitle {font-size: 1.25em;}
        #background {font-size: 1em;min-height: 2em;line-height: 2em;}
    }
}

@media all and (min-width: 650px) {
    header {
        .headerNavigationTitle{font-size: 2em;}
        .headerNavigationPopupContainer ul>li {font-size: 1.5em;}
        .headerNavigationSection.small{display: none;}
        .headerNavigationSection.wide{display: block;}
    }

    footer {
        .navItem {font-size: 1.25em};
        .footerTitle {font-size: 1.5em;}
        #background {font-size: 1.5em;min-height: 2em;line-height: 2em;}
    }
}

header {
    --header-height: 100px;
    color: white;
    z-index: 2;
    margin-bottom: 20px;
    width: 100%;
    min-width: fit-content;
    height: var(--header-height);
    /*position: relative;*/

    transition: top 0.3s ease;
    position: sticky;
    &.nav-down {top: 0;}
    &.nav-up {top: -100px; }
    &:has(:focus-visible) {top:0;}

    &.stuck.nav-up {
        .headerNavigationPopupContainer {height: 0 !important; min-height: 0 !important; nav{min-height: 0 !important;}}
    }

    box-sizing: border-box;
    padding-top: 10px;
    padding-inline: 15px;
    padding-bottom: 30px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: stretch;
    column-gap: min(50px,10vw);

    &::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: linear-gradient(0deg, black 0%, black 30%, #391849 100%);
        background-size: 100% 100%;
        mask-image: url("/images/other_assets/topDecoration.svg"), linear-gradient(white, white);
        mask-repeat: repeat-x;
        mask-size: auto 50px, 100% calc(100% - 40px);
        mask-position: center bottom, top center;
    }

    .headerLogoContainer {
        position: relative;
        max-width: 50vw;
        >a {display: block; position: relative; >.headerLogo {display: block; max-height: calc(var(--header-height) - 35px); max-width: 100%;}}}

    .headerNavigationContainer {
        display: flex;
        justify-self: end;
        align-items: center;
        gap: 30px;
        margin-right: 50px;
        >.headerNavigationSection {
            position: relative;
            .headerNavigationTitle {
                font-family: var(--font-yuruka), sans-serif;
                margin-block: 0;
                cursor: pointer;
                a {color: inherit;text-decoration: none;}
                a:hover, a:active, a:focus {text-decoration: underline}
                a:active {color: cyan};
                text-wrap: nowrap;
            }

            .headerDownArrow {
                width: 2em;
                height: 3em;
                background-color: white;
                appearance: none;
                border: none;
                mask-image: url("/images/other_assets/downArrow.svg");
                mask-repeat: no-repeat;
                mask-size: contain;
                mask-position: center;
                transition: transform 0.3s ease;
            }

            .headerNavigationPopupContainer {
                height: 0;
                overflow: hidden;

                nav {
                    max-height: 100%;
                    box-sizing: content-box;
                    box-shadow: none;
                    padding: 1em;
                    border-radius: 25px;
                }

                position: absolute;
                right: -20px;
                min-width: 100%;
                padding-top: 0;
                transition: height 0.3s ease;
                ul {
                    list-style-type: none;
                    padding: 0;
                    margin: 0;
                    border: none;
                    * {border: none;}
                }
            }

            .headerNavigationPopupTrigger.headerDownArrow:has(+ .headerNavigationPopupContainer:hover, + .headerNavigationPopupContainer :focus-visible) {
                transform: rotate(180deg);
            }

            @media (scripting: enabled) {
                .headerNavigationPopupTrigger.headerDownArrow.open {
                    transform: rotate(180deg);
                }
            }
            
            @media (scripting: none) {
                .headerNavigationPopupTrigger.headerDownArrow {
                    transform: rotate(180deg);
                }
                .headerNavigationPopupTrigger:hover + .headerNavigationPopupContainer {
                    height: 200px;
                    min-height: min-content;
                    nav {height: min-content;}
                }
            }

            .headerNavigationTitle:hover + .headerNavigationPopupContainer,
            .headerNavigationPopupTrigger.open + .headerNavigationPopupContainer,
            .headerNavigationPopupContainer:has(nav:hover) {
                height: 200px;
                min-height: min-content;
                nav {height: min-content;}
            }

            .headerNavigationPopupContainer:has(:focus-visible) {
                height: 200px !important;
                min-height: min-content;
                nav {height: min-content;}
            }
        };
    }
}




footer {
    margin-top: 50px;
    width: 100%;
    max-width: 100%;

    background-color: rgba(20,35,35,0.7);
    color: white;
    border-top: 5px solid black;
    position: relative;

    display: flex;
    flex-direction: column;
    row-gap: 20px;

    padding-inline: 7.5%;
    padding-block: 30px;
    box-sizing: border-box;

    #footerContents {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-content: flex-start;
        /*display: grid;
        grid-template-columns: 1fr 2fr;
        grid-template-rows: 1fr auto;*/
        column-gap: 20px;
        row-gap: 20px;
    }

    #footerRightSide {
        min-width: 80%;
        flex-grow: 3;
        flex-shrink: 0;
        flex-basis: 0;

        .links a:active {color: cyan}

        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        grid-auto-flow: row;
        grid-auto-rows: 1fr;
        gap: 20px;

        #footerNavigation, #footerSocialsLogo {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 20px;
        }
    }

    #footerLeftSide {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-grow: 1;
        flex-basis: 0;
    }

    .footerNotice {
        font-family: var(--font-marugo), sans-serif;
        text-align: center;
        width: 100%;
        font-size: 1em;
    }

    #footerLogoContainer {
        align-self: center;
        justify-self: center;
        display: flex;
        align-items: center;
        justify-content: center;
        #footerLogo {
            height: 100%;
            max-height: 100px;
            aspect-ratio: 1/1;
        }
    }

    #backgroundSelector {
        width: min-content;
        align-self: flex-start;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-family: var(--font-marugo), sans-serif;
        #backgroundContainer {
            width: 100%;
            max-width: 100%;
        }
        #background {
            font-family: var(--font-marugo), sans-serif;
            border-radius: 3em;
            padding-inline: 1em;
            text-align: center;
            width: 100%;
            background-color: rgba(255,255,255,0.7);
            border: none;
            box-shadow: var(--standard-shadow);
            cursor: pointer;

            /*mask-image: linear-gradient(white, white),url("./images/other_assets/downArrow.svg");
            mask-size: cover, 1.5em 1em;
            mask-position: 0 0, calc(100% - 0.5em) center;
            mask-repeat: no-repeat;
            mask-composite: subtract;

            padding-right: 2em;
            box-sizing: border-box;*/

            -moz-appearance:none; /* Firefox */
            -webkit-appearance:none; /* Safari and Chrome */
            appearance: none;
        }

        .checkboxContainer {
            display: flex;
            flex-direction: row;
            align-items: center;
            text-wrap: nowrap;
            white-space: nowrap;
            position: relative;
            margin-top: 0.5em;
            padding-inline: 0.5em;
            gap: 0.5em;

            label, input {cursor: pointer};

            input[type=checkbox] {
                appearance: unset;
                height: 1.5em;
                background-color: transparent;
                border-radius: 20%;
                aspect-ratio: 1;
                border: 2px solid white;
                box-sizing: border-box;
                margin:0;

                &:focus-visible {outline: none;}
            }
            input[type=checkbox]:checked{
                background-color: white;
                mask-image: linear-gradient(white,white), url("./images/other_assets/checkmark.svg");
                mask-size: 100% 100%, contain;
                mask-origin: border-box;
                mask-position: 0 0, center;
                mask-repeat: no-repeat;
                mask-composite: subtract;
            }
            label {text-wrap: nowrap; white-space: nowrap;}
        }
    }

    .footerContainer {
        width: 100%;
        nav {margin-left: 1em};
        justify-self: center;
        margin-inline-start: 10px;

        max-width: 150px;
    }


    .footerTitle {
        font-family: var(--font-yuruka), sans-serif;
        font-weight: bold;
        text-wrap: nowrap;
    }
}

.whiteOverWindow {
    background-color: rgb(255, 255, 255, 0.85);
    color: black;
    font-family: var(--font-marugo), sans-serif;
    border: 3px solid white;
    h1,h2,h3,h4,h5,h6 {font-family: var(--font-yuruka), sans-serif;}
}

.whiteOverWindow.shadow {
    box-shadow: var(--standard-shadow);
    background-color: rgb(255, 255, 255, 0.7);
}

noscript.whiteOverWindow {
    align-self: center;
    margin-inline: auto;
    font-family: var(--font-marugo), sans-serif;
    padding: 2em;
    border-radius: 50px;
    div {
        margin-top: 1em;
        width: fit-content;
        max-width: min(1000px, 80vw);
        font-size: 2em;
        padding: 1em;
        text-align: center;
        margin-inline: auto;
    }
}

@media (max-width: 500px) {noscript>div{font-size: 1.5em}}

.links {
    font-family: var(--font-standard) sans-serif;
    a {color:inherit;text-decoration: none; text-wrap: nowrap; font-weight: 600;position: relative; display: inline flex; align-items: stretch;}
    a:active {color:blue;}
    a.icon:hover::after, a:not(.icon):hover, a.icon:focus::after, a:not(.icon):focus {text-decoration: underline;}
    a.icon:active::after, a:not(.icon):active {text-decoration: underline;}
}
.links a.icon::before {content:"i";color:transparent;display:inline-block;min-width:1em;margin-right:0.3em;background-position: center center;background-repeat: no-repeat;background-size:1em auto;}

a.youtube::before{background-image: url("./images/socialIcons/youtube.svg");}
a.youtube::after{content:"YouTube"}
a.twitter::before{background-image: url("./images/socialIcons/twitter.svg");}
a.twitter::after{content:"Twitter"}
a.instagram::before{background-image: url("./images/socialIcons/instagram.svg");}
a.instagram::after{content:"Instagram"}
a.bsky::before{background-image: url("./images/socialIcons/bsky.svg");}
a.bsky::after{content:"Bluesky"}
a.tumblr::before{background-image: url("./images/socialIcons/tumblr.svg");}
a.tumblr::after{content:"Tumblr"}
a.jbirding::before{background-image: url("./images/socialIcons/jbirding.ico");}
a.jbirding::after{content:"JBirding"}
a.gamebanana::before{background-image: url("./images/socialIcons/gamebanana.png");}
a.gamebanana::after{content:"GameBanana"}
a.fankai::before{background-image: url("./images/socialIcons/FK.png");}
a.fankai::after{content:"Fan-kai"}
a.discord::before{background-image: url("./images/socialIcons/discord.svg");}
a.discord::after{content:"Discord"}

.glade1, .glade2, .glade3 {
    position: relative;
    &::after {
        content: "";
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        box-sizing: border-box;
        background-size: auto 100%;
        background-position: center center;
        background-repeat: no-repeat;
        pointer-events: none;
    }
}
.glade1::after {
    background-image: url("/images/itemIcons/glade/item_glade01.00.png");
}
.glade2::after {
    background-image: url("/images/itemIcons/glade/item_glade02.00.png");
}
.glade3::after {
    background-image: url("/images/itemIcons/glade/item_glade03.00.png");
}

.hexagonTitle {
    color: white;
    font-family: YurukaStd, sans-serif;
    mask: url("./images/other_assets/stretchedHexagon.svg");
    mask-size: 100% 100%;
    text-align: center;
    width: auto;
    aspect-ratio: 230/70;
    &.HP{background:linear-gradient(180deg, rgb(0,100,0) 0%, rgb(22,158,0) 100%);}
    &.STR{background:linear-gradient(180deg, #6a1515 0%, #a01818 100%);}
    &.SPR{background:linear-gradient(180deg, #441b65 0%, #6d18a0 100%);}
    &.DEF{background:linear-gradient(180deg, #0d2f73 0%, #093cb3 100%);}
    &.SPD{background:linear-gradient(180deg, #1b655d 0%, #139b8a 100%);}
    &.Skill{background:linear-gradient(180deg, #6a4815 0%, #a46207 100%);}
}

:root {
    --focus-outline: auto 5px black;

    --brave-color: rgba(255,145,145,0.7);
    --mysterious-color: rgba(255,255,63,0.7);
    --tough-color: rgba(255,145,63,0.7);
    --charming-color: rgba(255,145,200,0.7);
    --heartful-color: rgba(63,255,63,0.7);
    --shady-color: rgba(145,145,255,0.7);
    --eerie-color: rgba(230,145,255,0.7);
    --slippery-color: rgba(63,255,255,0.7);
    --wicked-color: rgba(46,46,46,0.7);
    --enma-color: rgba(145,0,58,0.7);

    --font-standard: Noto Sans, system-ui, arial;
    --font-yuruka: YurukaStd, Roboto, system-ui, arial;
    --font-marugo: UDMarugo, Roboto, system-ui, arial;

    --standard-shadow: 0 0 6px rgba(0,0,0,0.8);
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        visibility: visible;
    }

    100% {
        opacity: 1;
        visibility: visible;
    }
}

@keyframes fadeOut {
    0% {
        opacity: initial;
        visibility: initial;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}