@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;
    --dark: #182518;
    --font: "ComicNeue";
}

::selection {
    background-color: var(--primary);
    color: white;
}

html,
body {
    color: white;
    font-family: var(--font);
    scroll-behavior: smooth;
    background: radial-gradient(ellipse at center, #0a001f 0%, #000000 100%);
    margin: 0;
    min-height: 100vh;
    width: 100%;
}

a {
    color: var(--primary);
    text-decoration: none;
}

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: 3em;
    text-shadow: 2px 2px #0f0, 0 0 10px #0f0;
    margin: 20px 0 10px;
}

h2 {
    font-size: 2em;
    margin: 0;
}

h3 {
    font-size: 1.8em;
    margin: 0;
}

h4 {
    font-size: 1.6em;
    margin: 0;
}

h5 {
    font-size: 1.4em;
    margin: 0;
}

.neon {
    color: var(--light-primary);
    text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary), 0 0 20px var(--primary);
}

main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.search {
    position: relative;
}

.search-input {
    position: relative;
}

.search-input svg {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--primary);
    pointer-events: none;
}

.search-input input {
    width: 100%;
    font-size: 1em;
    border: none;
    outline: none;
    backdrop-filter: blur(8px);
    transition: box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 10px 10px 35px;
    border: 1px solid var(--primary);
    caret-color: var(--light-primary);
}

.leaderboard {
    width: 100%;
    max-width: 750px;
    padding: 0 20px;
    box-sizing: border-box;
}

.leaderboard .table {
    width: 100%;
    background-color: rgb(14, 17, 14);
    border: 1px solid var(--dark);
    border-radius: 10px;
    box-sizing: border-box;
}

.leaderboard .table a,
.leaderboard .table a:link,
.leaderboard .table a:visited {
    text-decoration: none;
    color: white;
}

.leaderboard .head {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 80px 1fr 140px 140px;
    border: 1px solid var(--dark);
    border-radius: 10px 10px 0 0;
}

.leaderboard .head span {
    color: var(--light-primary);
    font-weight: bold;
    font-size: 18px;
}

.leaderboard .head span:nth-child(n+3):nth-child(-n+4),
.leaderboard .player-row span:nth-child(n+3):nth-child(-n+4) {
    text-align: right;
}

.leaderboard .head span {
    text-align: left;
    font-size: 16px;
    text-transform: uppercase;
}

.leaderboard .player-row {
    display: grid;
    grid-template-columns: 80px 1fr 140px 140px;
    border-bottom: 1px solid var(--dark);
    padding: 12px 16px;
    box-sizing: border-box;
    align-items: center;
}

.leaderboard .player-row:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}


.leaderboard .player-row:hover {
    background-color: rgba(28, 54, 27, 0.5);
}

.leaderboard .player-row .player {
    height: 32px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.leaderboard .player-row img {
    height: 100%;
    border-radius: 50%;
}

.leaderboard .unique-glorps {
    font-weight: bold;
}

.footer {
    font-size: 0.9em;
    color: #99ff99;
    text-align: center;
    margin-top: 30px;
    padding: 10px;
    width: 100%;
}

.alien-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

.alien-bg img {
    position: absolute;
    font-size: 2em;
    color: var(--primary);
    opacity: 0.2;
    animation: floatAlien 10s linear infinite;
    animation-fill-mode: both;
}

@keyframes floatAlien {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }

    10%,
    90% {
        opacity: 0.3;
    }

    50% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0.4;
    }

    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

.alien-bg img:nth-child(1) {
    left: 10%;
    animation-duration: 12s;
    animation-delay: 0s;
}

.alien-bg img:nth-child(2) {
    left: 30%;
    animation-duration: 15s;
    animation-delay: 3s;
}

.alien-bg img:nth-child(3) {
    left: 50%;
    animation-duration: 10s;
    animation-delay: 5s;
}

.alien-bg img:nth-child(4) {
    left: 70%;
    animation-duration: 14s;
    animation-delay: 2s;
}

.alien-bg img:nth-child(5) {
    left: 90%;
    animation-duration: 11s;
    animation-delay: 4s;
}

.top3-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin: 20px 0;
    transition: gap 0.3s ease;
}

.podium {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    position: relative;
    border-radius: 10px;
    width: 120px;
}

.podium img.podium-avatar {
    width: 65px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.podium-1 img.podium-avatar {
    width: 90px;
}

.podium-name {
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.podium-name,
.podium-name:link,
.podium-name:visited {
    text-decoration: none;
    color: inherit;
}

.podium-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    border-radius: 10px;
}

.podium-points {
    font-size: 14px;
}

.podium-points.points {
    font-size: 12px;
    opacity: 0.7;
}

.podium-1 {
    color: gold !important;
    order: 1;
}

.podium-1 .podium-stats {
    border: gold solid 1px;
    background-color: rgba(255, 215, 0, 0.1);
}

.podium-2 {
    color: silver !important;
    order: 0;
}

.podium-2 .podium-stats {
    border: silver solid 1px;
    background-color: rgba(192, 192, 192, 0.1);
}

.podium-3 {
    color: #cd7f32 !important;
    order: 2;
}

.podium-3 .podium-stats {
    border: #cd7f32 solid 1px;
    background-color: rgba(205, 127, 50, 0.1);
}

.podium-rank {
    font-size: 18px;
    font-weight: bold;
}

.disclaimer {
    font-size: 1em;
    color: #999999;
    text-align: center;
    margin: 10px 0 0 0;
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
    padding: 20px;
    border-top: 1px solid var(--primary);
    text-align: center;
}

footer .social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
    margin-top: 10px;
}

footer .social-links .social-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.social-icon svg,
.social-icon img {
    width: 100%;
    height: 100%;
}

#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: 600px) {
    .top3-podium {
        gap: 0;
    }

    .podium-1 img.podium-avatar {
        width: 65px !important;
    }

    .podium img.podium-avatar {
        width: 55px;
    }

    .leaderboard .head,
    .leaderboard .player-row {
        grid-template-columns: 60px 1fr 120px 80px;
    }

    .leaderboard .player-row img {
        display: none;
    }
}

@media (max-width: 450px) {
    .leaderboard {
        padding: 0;
    }
}