@font-face {
    font-family: "ComicNeue";
    font-weight: 400;
    font-style: normal;
    src: url("../fonts/comicneue-regular.ttf");
}

@font-face {
    font-family: "ComicNeue";
    font-weight: bold;
    font-style: normal;
    src: url("../fonts/comicneue-bold.ttf");
}

:root {
    --primary: #006b1b;
    --light-primary: #00ff44;
    --blue: #4C6AFF;
    --purple: #8948FF;
    --pink: #D42DE6;
    --red: #EB4C4C;
    --gold: #D0AE00;
    --dark-blue: hsl(230, 100%, 30%);
    --dark-purple: hsl(261, 100%, 30%);
    --dark-pink: hsl(294, 79%, 30%);
    --dark-red: hsl(0, 80%, 25%);
    --dark-gold: hsl(50, 100%, 30%);
    --font: "ComicNeue";
}

::selection {
    background-color: var(--primary);
    color: white;
}

html,
body {
    scroll-behavior: smooth;
    color: white;
    font-family: var(--font);
    background-color: #000000;
    margin: 0;
    position: relative;
}

img {
    border: none;
}

button {
    cursor: pointer;
    font-family: var(--font);
}

input {
    background-color: #111;
    color: white;
    padding: 10px;
    font-size: 1.2em;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid var(--primary);
    font-family: var(--font);
    outline: none;
}

h1 {
    font-size: 2.2em;
    margin: 0;
    transition: all 0.2s ease 0s;
}

h2 {
    font-size: 2em;
    margin: 0;
    transition: all 0.2s ease 0s;
}

h3 {
    font-size: 1.8em;
    margin: 0;
    transition: all 0.2s ease 0s;
}

h4 {
    font-size: 1.6em;
    margin: 0;
    transition: all 0.2s ease 0s;
}

h5 {
    font-size: 1.4em;
    margin: 0;
    transition: all 0.2s ease 0s;
}

p,
a {
    font-size: 1em;
    margin: 0;
    transition: all 0.2s ease 0s;
}

a:visited,
a:link {
    text-decoration: none;
    color: white;
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    pointer-events: none;
    user-select: none;
}

.inventory-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    box-sizing: border-box;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-container .search-input {
    position: relative;
}

.search-container .search-input svg {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--primary);
    pointer-events: none;
}

.search-container .search-input input {
    font-size: 1em;
    border: 1px solid var(--primary);
    padding: 10px 10px 10px 35px;
    caret-color: var(--light-primary);
}

.search-container button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    fill: white;
    background-color: rgba(0, 255, 0, 0.1);
    font-size: 1em;
    color: white;
    cursor: pointer;
    font-family: var(--font);
    border-radius: 10px;
    border: 1px solid var(--primary);
    padding: 10px 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-container button:hover {
    background-color: rgba(0, 255, 0, 0.2);
}

main {
    width: 100%;
    min-height: 100vh;
}

main .view {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    box-sizing: border-box;
}

main .view#leaderboard {
    width: 100%;
}

main .glorps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    width: 1200px;
    gap: 16px;
    padding: 20px;
    box-sizing: border-box;
    align-items: start;
    align-content: start;
}

.glorps .glorp {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #1a1a1a;
    border-radius: 10px;
    color: white;
    transition: all 0.5s ease;
}

.glorps .glorp:hover {
    transform: translateY(-6px) scale(1.02);
    filter: brightness(1.3);
}

.glorps .glorp .top {
    display: flex;
    justify-content: space-between;
}

.glorps .glorp .bottom {
    display: flex;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 0 0 10px 10px;
}

.glorps .glorp p {
    font-size: 1em !important;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.glorps .glorp img {
    width: 128px;
    aspect-ratio: 1/1;
    object-fit: contain;
}

.glorps .glorp>div {
    width: 100%;
    padding: 5px 5px 5px 10px;
    box-sizing: border-box;
}

.glorps .glorp.blue {
    background: linear-gradient(135deg,
            hsl(230, 100%, 38%) 0%,
            hsl(230, 100%, 14%) 50%,
            hsl(230, 100%, 30%) 100%);
    border: 2px solid var(--blue);
}

.glorps .glorp.blue .top {
    border-bottom: 1px solid var(--blue);
}

.glorps .glorp.purple {
    background: linear-gradient(135deg,
            hsl(261, 100%, 40%) 0%,
            hsl(261, 100%, 15%) 50%,
            hsl(261, 100%, 32%) 100%);
    border: 2px solid var(--purple);
}

.glorps .glorp.purple .top {
    border-bottom: 1px solid var(--purple);
}

.glorps .glorp.pink {
    background: linear-gradient(135deg,
            hsl(294, 85%, 42%) 0%,
            hsl(294, 65%, 18%) 50%,
            hsl(294, 80%, 34%) 100%);
    border: 2px solid var(--pink);
}

.glorps .glorp.pink .top {
    border-bottom: 1px solid var(--pink);
}

.glorps .glorp.red {
    background: linear-gradient(135deg,
            hsl(0, 85%, 38%) 0%,
            hsl(0, 70%, 14%) 50%,
            hsl(0, 80%, 30%) 100%);
    border: 2px solid var(--red);
}

.glorps .glorp.red .top {
    border-bottom: 1px solid var(--red);
}

.glorps .glorp.gold {
    background: linear-gradient(135deg,
            hsl(50, 100%, 40%) 0%,
            hsl(50, 100%, 16%) 50%,
            hsl(50, 100%, 32%) 100%);
    border: 2px solid var(--gold);
}

.glorps .glorp.gold .top {
    border-bottom: 1px solid var(--gold);
}

.glorps .glorp.locked {
    filter: grayscale(100%) brightness(60%);
    opacity: 0.6;
    position: relative;
}

.glorps .glorp.locked:hover {
    filter: grayscale(0) brightness(100%);
    opacity: 1;
}

#loading {
    position: fixed;
    top: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    background-image: url('../images/pattern.png');
    background-size: 50px;
    z-index: 4000;
}

#loading #glorp {
    height: 128px;
}

@media (max-width: 1200px) {
    main .view {
        width: 100%;
    }

    main .glorps {
        width: 100%;
    }
}

@media (max-width: 1050px) {
    .inventory-header {
        flex-direction: column;
    }
}

@media (max-width: 950px) {
    main .view {
        padding: 0;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.5em !important;
    }

    .glorps .glorp img {
        width: 90px;
    }
}