@import url("https://fonts.googleapis.com/css2?family=Heebo:wght@100;200;300;400;500;600;700;800;900&display=swap");

:root {
	--clr-bg: hsl(0, 0%, 7%);
	--clr-fg: #fff;
	--clr-transparent: hsla(0, 0%, 7%, 60%);
	--clr-primary: #00844d;
	--clr-secondary: #76b900;
	--clr-gray: #dadcdc;
	--clr-anthrazit: #7d7173;
	--clr-black: #000000;
	--clr-tertiary: #373b69;
	--clr-tertiary-dark: #282c34;
	--clr-accent-1: #2683ed;
	--clr-accent-2: #9026ed;
    --clr-full: rgba(240, 71, 71, 0.15);
	--clr-00dp: hsl(0, 0%, 7%);
	--clr-01dp: hsl(0, 0%, 11%);
	--clr-02dp: hsl(0, 0%, 13%);
	--clr-03dp: hsl(0, 0%, 14%);
	--clr-04dp: hsl(0, 0%, 15%);
	--clr-06dp: hsl(0, 0%, 17%);
	--clr-08dp: hsl(0, 0%, 18%);
	--clr-12dp: hsl(0, 0%, 20%);
	--clr-16dp: hsl(0, 0%, 21%);
	--clr-24dp: hsl(0, 0%, 22%);
}

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html, body {
    height: 100%;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

*::selection {
    background: var(--clr-fg);
    color: var(--clr-bg);
}

a {
    text-decoration: none;
    color: var(--clr-fg);
}

body {
    color: var(--clr-fg);
    background-color: var(--clr-bg);
    font-family: 'Heebo', sans-serif;
    text-align: center;
    overflow-x: hidden;
}

header {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

main {
    max-width: 1280px;
    margin: 0 auto;
}

h2 {
    line-height: 1.2;
    margin: .25rem 0 .5rem;
}

.intro {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin: 2rem auto;
    gap: .5rem;
}

.box {
    box-shadow: 0 0 6px #0000003b, 0 0 #0000002e;
    border-radius: 3px;
    padding: 1.25rem;
    background-color: var(--clr-01dp);
    margin-bottom: 10px;
}

.filter {
    display: grid;
    grid-template-columns: 330px 2px 1fr;
    gap: 1rem;
}

.filter .filters {
    display: flex;
    flex-direction: column;
}

.filter div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    white-space: nowrap;
}

.filter .filters > div {
    justify-content: space-between;
    width: 100%;
}

.filter select, .filter input {
    background-color: var(--clr-04dp);
    color: var(--clr-fg);
    border: none;
    outline: none;
}

.filter select {
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
}

.filter .line {
    background-color: var(--clr-fg);
    height: 100%;
    width: 100%;
}

.filter input {
    padding: 10px;
    width: 100%;
}

.filter .search {
    background-color: var(--clr-04dp);
    border-radius: 3px;
    padding: 0 1rem;
    height: fit-content;
    margin: auto 0;
}

.filter .search :last-child {
    font-size: 1.35em;
    opacity: 1;
    transition: opacity 250ms ease;
    cursor: pointer;
}

.filter .search :last-child:hover {
    opacity: .3;
}

.selection {
    display: flex;
    flex-direction: column;
}

.selection button {
    all: unset;
    padding: 5px 10px;
    border-radius: 5px;
    color: var(--clr-fg);
    background: var(--clr-04dp);
    cursor: pointer;
}

.selection button:hover {
    background: var(--clr-12dp);
}

.selection button.active {
    background: var(--clr-primary);
}

.selection button:disabled,
.selection button[disabled] {
    color: #666666;
    cursor: default;
    background: var(--clr-04dp);
}

.leaderboard {
    --grid-template: .2fr 1.1fr .2fr .8fr .2fr .4fr .1fr .2fr .3fr;
}

.table-head {
    display: grid;
    grid-template-columns: var(--grid-template);
    font-weight: bold;
    padding: 4px 8px;
    margin: 2.5px 2px;
}

.table-body {
    display: grid;
    gap: 8px;
}

.item {
    display: grid;
    grid-template-columns: var(--grid-template);
    align-items: center;
    border-radius: 5px;
    background-color: var(--clr-03dp);
    transition: all 250ms ease;
    padding: 8px;
}

.item.full {
    background-color: var(--clr-full);
}

.item.wpv :nth-child(3)  {
    opacity: .5;
}

.item:hover {
    background-color: var(--clr-12dp);
}

.item :nth-child(1),
.item :nth-child(2),
.item :nth-child(4) {
    text-align: left;
}

.item :nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item :nth-child(2),
.item :nth-child(4),
.item :nth-child(9) {
    font-weight: bold;
}

.info {
    padding: 1rem 0 2rem 0;
}

.infos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: left;
    gap: 1rem;
}

.reversebtn {
    background-color: var(--clr-04dp);
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 3px;
    cursor: pointer;
}

.reversebtn:hover {
    background-color: var(--clr-gray-light);
}

.invisible {
    display: none;
}

.item i {
    font-style: normal;
    font-weight: bold;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
    }
    
    .leaderboard {
        --grid-template: 1fr 1fr .6fr;
    }

    .leaderboard, .filter {
        font-size: .8em;
    }

    .item :nth-child(1),
    .item :nth-child(2),
    .item :nth-child(4) {
        text-align: center;
    }

    .intro-container {
        display: flex;
        flex-direction: column;
    }

    .intro, .info {
        margin: 0 1rem;
    }

    .infos {
        grid-template-columns: repeat(1, 1fr);
    }

    .filter {
        grid-template-columns: 1fr;
    }

    .filter .line {
        display: none;
    }
}
