@import url('https://fonts.googleapis.com/css2?family=Pirata+One&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

* {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
    color: inherit;
    text-decoration: inherit;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}

:root{
    scroll-behavior: smooth;
    interpolate-size: allow-keywords;
}

@media screen and (prefers-reduced-motion: reduce) {
    :root{
        scroll-behavior: auto;
    }
}

/* ! GENERIC CLASSES */
.bold{
    font-weight: bolder;
}

.hidden{
    display: none !important;
}

.hover{
    transition: transform 0.2s ease-in-out;
    will-change: transform;
    &:hover{
        transform: scale(1.06);
    }
}

.blur-icons{
    filter: blur(5px);
}

.blur{
    filter: blur(1px);
}

/*!------------------*/

html{
    height: 100%;
}
body{
    height: 100%;
    line-height: 1;
    --primary-bg: #131313;
    --secondary: #dba94c;
    font-family: "JetBrains Mono", monospace;
    font-optical-sizing: auto;
    background-color: var(--primary-bg);
}

.title{
    font-size: 3rem;
    margin-left: 40px;
}

.header{
    color: var(--secondary);
    height: clamp(4rem,25vh,6rem);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #121212;
    position: sticky;
    top: 0;
    z-index: 100;
    &::after{
        content: '';
        width: 100%;
        height: 150px;
        position: absolute;
        top: clamp(4rem,25vh,6rem);
        background: linear-gradient(180deg, rgba(197, 160, 89,0.04) 0%, rgba(255, 255, 255, 0) 100%);
        pointer-events: none;
    }
    overflow: hidden;
}

.tool-link{
    text-decoration: inherit;
    color:inherit;
    font-size: 1.7rem;
    color: #5F5E5E;
    font-weight: bold;

}

.tool-link-active{
    color: rgba(229, 226, 225,0.6);

}

.link-tools{
    margin-right: 40px;
    display: flex;
    gap: 3rem;
}

.title-underscore{
    display: inline;
}

.category-nav::-webkit-scrollbar-button:start:decrement,
.category-nav::-webkit-scrollbar-button:end:increment {
    display: none;
    height: 0;
}

.category-nav{
    display: flex;
    flex-flow: column;
    padding-top: 20px;
    gap: 10px;
    align-items: start;
    padding-left: 20px;
    background-color: #1C1B1B;
    border-end-end-radius: 40px;
    corner-shape: squircle;
    padding-right: 15px;
    overflow: scroll;
    height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-color: #3a3939 transparent;
}


.category-nav-wrapper{
    display: flex;
    align-items: center;
    gap: 2rem;
}

.equipment-button{
    background-color: rgba(1,1,1,0);
    border: none;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #E5E2E1;
    transition: transform 0.2s ease-in-out;
    &:hover{
        transform: translateX(10px);
    }
    width: 100%;
    margin-right: 20px;
    *{
        pointer-events: none;
    }
}


.category-span{
    font-size: 1.8rem;
    font-family: "JetBrains Mono", monospace;
    text-wrap-mode: nowrap;
}


.flex-wrapper{
    display: flex;
    align-items: start;
}


.main{
    width: 100%;
    min-height: 150vh;
    display: flex;
    flex-flow: row wrap;
    margin-top: 50px;
    margin-left: 30px;
    gap: 30px;
}

.item-result{
    width: 25rem;
    height: 300px;
    display: flex;
    border-radius: 20px;
    background: #1C1B1B;
    flex-flow: column;
    &:hover{
        transform: translateY(-4px);
    }
    transition: all 0.2s ease-in-out;
}


.item-result-top{
    width: 100%;
    height: clamp(85px,25%,200px);
    display: flex;
    margin: 15px;
    gap: 15px;
}

.item-result-img{
    width: 100px;
    height: 100px;
    display: grid;
    place-content: center;
}

.item-result-title{
    color: white;
    font-weight: bold;
    font-size: 1.5em;
}

.item-result-title-div{
    display: flex;
    flex-flow: column;
    justify-content: space-around;
    height: 100px;
}

.item-result-tier{
    display: block;

    font-weight: bold;
    font-size: 20px;
}

.item-result-bottom{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    max-height: 9rem;
    grid-template-areas:
    "price craft"
    "profit quantity"
    "pq pq"
    ;
    height: 100%;
}
.label-value{
    margin-left: 1em;
    display: flex;
    flex-flow: column;
    justify-content: center;
}

.item-result-label{
    color: #aaa;
    font-size: 1.1em;
}
.item-result-value{
    color: #E5E2E1;
    font-weight: bolder;
    font-size: 1.25em;
}

.item-title-div{
    display: flex;
    flex-flow: column;
    height: 90px;
    font-weight: bold;
}

.item-title{
    font-size: 1.5em;
    color: #ddd;
}

.item-desc{
    font-size: 0.9em;
    color: #aaa;
}

.price-div{
    grid-area: price;

}
.craft-div{
    grid-area: craft;

}
.profit-div{
    grid-area:  profit;

}
.quantity-div{
    grid-area: quantity;

}

.pq-div{
    margin-top: 10px;
    margin-left: 15px;
    grid-area: pq;
    color: white;
    display: grid;
    align-content: center;
}


.stats{
    flex-grow: 2;
}
.peritem{
    display: flex;
    flex-flow: column;
    color: #ddd;
    height: 115px;
    width: 50%;
    font-size: 1.1rem;
    gap: 5px;
}

.line{
    width: 3px;
    height: 150px;
    background-color:  var(--primary-bg);
    margin-left: 10px;
    margin-right: 10px;
}

@keyframes appear {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}



.selected{
    background-color: var(--secondary) ;
    color: var(--primary-bg);
    border-radius: 10px;
    transition: all 0.1s ease-in-out;
    box-shadow: 1px 3px 10px rgba(197, 160, 89,0.4);

}

.loading-screen{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.6);
    color: white;
    display: flex;
    flex-flow: column;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease-in-out;
    backdrop-filter: blur(2px);
    z-index: 120;
}

.loader {
  color: #ffffff;
  font-size: 45px;
  text-indent: -9999em;
  overflow: hidden;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  position: relative;
  transform: translateZ(0);
  animation: mltShdSpin 2s infinite ease, round 2s infinite ease;
  transition: all 0.2s ease-in-out;
}

@keyframes mltShdSpin {
  0% {
    box-shadow: 0 -0.83em 0 -0.4em,
    0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
    0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
  }
  5%,
  95% {
    box-shadow: 0 -0.83em 0 -0.4em,
    0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
    0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
  }
  10%,
  59% {
    box-shadow: 0 -0.83em 0 -0.4em,
    -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em,
    -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em;
  }
  20% {
    box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em,
     -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em,
     -0.749em -0.34em 0 -0.477em;
  }
  38% {
    box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em,
     -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em,
     -0.82em -0.09em 0 -0.477em;
  }
  100% {
    box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em,
    0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
  }
}

@keyframes round {
  0% { transform: rotate(0deg) }
  100% { transform: rotate(360deg) }
}


/*! TIER COLORS*/
.t4-glow{
    filter: drop-shadow(0 0 1rem rgba(19, 98, 187,0.9));
}

.t5-glow{
    filter: drop-shadow(0 0 1rem rgba(230, 24, 24, 0.9));
}

.t6-glow{
    filter: drop-shadow(0 0 1rem rgba(228, 118, 16, 0.9));
}

.t7-glow{
    filter: drop-shadow(0 0 1rem rgba(229, 218, 12, 0.9));
}

.t8-glow{
    filter: drop-shadow(0 0 1rem rgba(155, 172, 192, 0.9));
}

.t4-text{
    color: rgb(25, 115, 218);
}

.t5-text{
    color: rgb(234, 38, 38);
}

.t6-text{
    color: rgb(242, 127, 19);
}

.t7-text{
    color: rgb(254, 242, 13);
}

.t8-text{
    color: rgb(175, 193, 215);
}

/*! TIER COLOR END */


.settings-btn{
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 90px;
    height: 90px;
    background-color:var(--secondary);
    border-radius: 30px;
    corner-shape: squircle;
    box-shadow: 0 0 20px var(--secondary);

    transition: all 0.1s;
    &:hover{
        cursor: pointer;
        transform: scale(1.03);
    }
}

.settings{
    width: clamp(30rem,30%,100rem);
    height: clamp(580px,85vh,700px);
    background-color:#1C1B1B;
    border-radius: 15px;
    display: flex;
    flex-flow: column;
}

.settings-wrapper *{
    animation: appear 0.2s;
}
.help-pq-wrapper *{
    animation: appear 0.2s;
}

.settings-wrapper{
    width: 100%;
    height: 100%;
    animation: appear 0.2s;
}

.settings-header{
    height: 3rem;
    display: flex;
    justify-content: space-between;
    margin-left: 1rem;
    margin-right: 1rem;
    margin-top: 1rem;
    align-items: center;
    span{
        font-weight: bolder;
        font-size: 1.5rem;
    }
    button{
        width: 3rem;
        height: 3rem;
        border-radius: 100px;
        background-color: var(--secondary);
        box-shadow: 0 0 4px var(--secondary);
        color: black;
        transition: all 0.1s;
        &:hover{
            cursor: pointer;
            transform: scale(1.03);
        }
        display: grid;
        place-content: center;
        img{
            width: 1.5rem;
        }
    }
}

.settings-city{
    margin: clamp(10px,10%,30px);
    display: flex;
    justify-content: space-around;
}

.city-label{
    color: #aaa;
    font-size: 0.9rem;
    margin: 5px;
}

.btn-dropdown{

    width: 100%;
    border-radius: 10px;
    height: 40px;
    background-color: #2a2929;
    border: 1px solid #3a3939;
    box-shadow: 0 0 10px rgb(30, 30, 30);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px;
    img{
        height: 20px;
        opacity: 0.5;
    }
    transition: all 0.1s;
    &:hover{
        cursor: pointer;
        transform: scale(1.03);
    }
}

.city-wrapper{
    position: relative;
    width: clamp(50px,40%,500px);
    display: flex;
    flex-flow: column;
    justify-content: end;
}

.city-dropdown{
    position:absolute;
    top: 90px;
    display: flex;
    flex-flow: column;
    align-items: start;
    padding: 10px;
    background-color: #2a2929;
    border: 1px solid #3a3939;
    border-radius: 5px;
    box-shadow: 0 0 10px rgb(39, 39, 39);
    left: 2px;
}

.city-dropdown-select-btn{
    text-align: left;
    width: 100%;
    text-wrap: nowrap;
    background-color: rgba(1,1,1,0);
    padding: 2px;
    cursor: pointer;
    transition: all 0.2s;
    &:hover{
        background-color: rgba(1,1,1,0.2);
    }
}

.settings-checkbox-div{
    background-color:#151515;
    height: 200px;
    margin: 70px;
    margin-top: 0px;
    margin-bottom: 20px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 4fr 1fr;
}

.settings-footer{
    background-color: #191919;
    flex-grow: 1;
    display: flex;
    justify-content: end;
    border-radius: 15px;
}

.btn-save{
    margin: 15px;
    border-radius: 10px;
    color: #111;
    font-weight: bold;
    padding: 10px;

    background-color: var(--secondary);
    transition: all 0.1s;
    &:hover{
        cursor: pointer;
        transform: scale(1.03);
    }
    box-shadow: 0 0 10px var(--secondary);
}

.settings-bonus-div{
    margin: 10px;
    flex-grow: 1;
    margin-left: 10%;
}
.settings-bonus-label{
    color: #aaa;
    margin: 5px;
}

.settings-bonus{
    border: none;
    background-color: #2a2929;
    border: 1px solid #3a3939;
    margin: 5px;
    width: 40%;
    display: block;
    height: 2rem;
    border-radius: 3px;

}

.checkbox-label{
    display: grid;
    align-items: center;
    margin-left: 10px;
    width: 80%;
}


.settings-checkbox{
    margin: 20%;
    margin-right: 30%;
    border-radius: 6px;
    border: 10px solid #3a3939;
}

.settings-btn{
    transform: translate3d(0,0,0);
    will-change: transform;
    backface-visibility: hidden;
}

.help-pq{
    width: 1.5em;
    height: 1.5em;
    border-radius: 5em;
    display: inline-block;
    background-color: rgba(1,1,1,0);
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    &:hover{
        transform: scale(1.06);
    }
}

.pq-label-div{
    display: flex;
    align-items: center;
    gap: 0.3em;

}


.help-pq-content{
    width: 25vw;
    height: 30vh;
    background-color: wheat;
    border-radius: 5px;
    padding: 20px;
    background-color: #191919;
    color: #ddd;
    font-weight: bold;
}
.help-pq-top{
    width: 100%;
    position: relative;
    display: flex;
    flex-flow: row-reverse;

    align-items: center;
    margin-bottom: 0.9em;
}
.settings-close-pq-help{
    border-radius: 0.5em;
    padding: 0.5em;
    color: #131313;
    background-color:#ddd;
    cursor: pointer;
    &:hover{
        transform: scale(1.1);

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

/* TABLET */
@media (max-width: 1024px) {

    .header {
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 10px;
    }

    .title {
        font-size: 2rem;
        margin-left: 0;
        text-align: center;
    }

    .link-tools {
        margin-right: 0;
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .flex-wrapper {
        flex-direction: column;
    }

    .category-nav-wrapper {
        width: 100%;
        justify-content: center;
    }

    .category-nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        height: auto;
        width: 100%;
        padding: 10px;
        border-radius: 0;
    }

    .equipment-button {
        flex-direction: column;
        min-width: 90px;
        &:hover{
            transform: translateX(0px);
        }
    }

    .category-span {
        font-size: 0.85rem;
        text-align: center !important;
    }

    .main {
        margin-left: 0;
        justify-content: center;
    }

    .item-result {
        width: 45%;
        font-size: 0.7rem;
    }

    .settings {
        width: 90%;
    }
    .help-pq-content{
        padding: 10px;
        width: 70vw;
        height: 30vh;
    }
}


/* PHONE */
@media (max-width: 600px) {
    .title {
        font-size: 1.5rem;
    }
    .tool-link {
        font-size: 1rem;
        text-align: center;
    }
    .link-tools {
        flex-direction: column;
        gap: 10px;
    }
    .category-nav {
        gap: 5px;
    }
    .equipment-button img {
        width: 60px;
    }
    .category-span {
        font-size: 0.7rem;
    }
    .main {
        gap: 15px;
        margin-top: 20px;
    }
    .item-result {
        width: 90%;
        height: auto;
    }
    .item-result-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .item-result-title-div {
        align-items: center;
        height: auto;
    }
    .item-result-bottom {
        grid-template-columns: 1fr;
        grid-template-areas:
        "price"
        "craft"
        "profit"
        "quantity"
        "pq";
    }
    .settings-btn {
        width: 60px;
        height: 60px;
    }
    .settings {
        width: 95%;
        height: auto;
        padding-bottom: 10px;
    }
    .settings-header span {
        font-size: 1.2rem;
    }
    .settings-header button {
        width: 2.5rem;
        height: 2.5rem;
    }
    .settings-city {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin: 15px;
    }
    .city-wrapper {
        width: 100%;
    }
    .btn-dropdown {
        height: 38px;
        font-size: 0.9rem;
        padding: 5px;
    }
    .city-dropdown {
        width: 100%;
        top: 65px;
        left: 0;
        z-index: 10;
    }
    .settings-checkbox-div {
        margin: 15px;
        padding: 10px;
        height: auto;
        grid-template-columns: 2fr 1fr;
        row-gap: 10px;
    }
    .checkbox-label {
        font-size: 0.85rem;
        width: 100%;
    }
    .settings-checkbox {
        margin: 10px;
        margin-right: 10px;
    }
    .settings-bonus-div {
        margin: 15px;
    }
    .settings-bonus {
        width: 100%;
        height: 36px;
        font-size: 0.9rem;
    }
    .settings-footer {
        justify-content: center;
    }
    .btn-save {
        width: 90%;
        text-align: center;
        font-size: 0.95rem;
    }
}
