body.light {
    & nav {
        color: white;
    }
    & .achivements {
        color: white;
    }
}

nav {
    background-color: #00000080;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;

    ul {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        list-style: none;

        li {
            font-weight: bold;
            font-size: 24px;

            &:not(.money-label) svg {
                cursor: pointer;
                transition: all 0.3s ease-in-out;

                &:hover {
                    fill: teal !important;
                    transform: scale(1.05);
                }
                &:active {
                    fill: teal !important;
                    transform: scale(0.95);
                    opacity: 0.8;
                }
            }
        }
    }
}
div.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -5;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
    
    &.shown {
        z-index: 999;
        opacity: 1;
        pointer-events: all;
        
        & .menu {
            transform: translateX(0);
        }
        & .achivements {
            transform: translateY(0) !important;
        }
    }

    & .menu {
        transform: translateX(-150%);
        width: 300px;
        height: calc(100% - 60px);
        margin-top: 60px;
        padding: 20px 10px;
        background-color: #141415dd;
        transition: all 0.5s ease-in-out;

        display: flex;
        flex-direction: column;
        list-style: none;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: teal transparent;

        & a {
            color: #c4c7c5;
            margin-left: 20px;
            font-size: 18px;
            font-weight: bold;
            transition: all 0.3s ease-in-out;
            display: inline-block;
            margin: 7.5px 20px;

            &:hover {
                color: teal;
            }
            &:active {
                opacity: 0.8;
                scale: 0.95;
            }
        }
        & .hidden {
            display: none;
        }
        & .gamemode-select {
            padding: 16px;
            margin-bottom: 15px;

            & abbr {
                text-decoration: none;

                & svg {
                    transition: all 0.3s ease-in-out;
                    cursor: pointer;

                    &:hover {
                        fill: teal !important;
                        transform: scale(1.05);
                    }
                    &:active {
                        fill: teal !important;
                        transform: scale(0.95);
                        opacity: 0.8;
                    }
                    &.selected {
                        fill: teal !important;
                    }
                    &.disabled {
                        pointer-events: none;
                        opacity: 0.5;
                    }
                }
            }
        }
    }
    &.achievements-background {
        display: flex;
        justify-content: center;
        align-items: center;

        & .achivements {
            transform: translateY(-150%);
            width: max(300px, 90vw);
            height: calc(max(400px, 80vh) - 60px);
            border: 4px solid teal;
            border-radius: 24px;
            margin-top: 30px;
            padding: 20px;
            background-color: #141415dd;
            transition: all 0.5s ease-in-out;
            overflow: hidden;

            & .close-achievements {
                position: absolute;
                top: 20px;
                left: 30px;
                font-size: 24px;
                cursor: pointer;
                transition: all 0.3s ease-in-out;

                &:hover {
                    color: crimson;
                    transform: scale(1.2);
                }
                &:active {
                    color: crimson;
                    transform: scale(0.95);
                    opacity: 0.75;
                }
            }
            & .achievements-grid {
                height: calc(100% - 60px);
                padding: 20px 0;
                list-style: none;
                justify-content: space-evenly;
                overflow-y: auto;
                scrollbar-width: thin;
                scrollbar-color: teal transparent;
                overflow-y: auto;
                overflow-x: hidden;
                
                & h2 {
                    width: calc(100% - 40px);
                    border-bottom: 4px solid teal;
                    padding-bottom: 16px;
                    margin: 16px 20px;
                    
                    &.big-head {
                        margin-top: 40px;
                    }
                }
                & h3.total-achievements {
                    font-size: 16px;
                }
                & li {
                    background-color: #00000080;
                    border-radius: 12px;
                    width: 400px;
                    display: flex;
                    align-items: center;
                    padding: 12px;
                    opacity: 0.5;

                    & h1 {
                        margin: 10px;
                        height: 54px;
                        width: 54px;
                    }
                    & div {
                        width: 100%;
                        & h3 {
                            text-align: left;
                            margin-top: 0;
                        }
                        p {
                            font-size: 16px;
                            opacity: 0.9;
                        }
                    }
                    &.unlocked {
                        opacity: 1;
                    }
                }
            }
        }
    }
}

@media (max-width: 480px) {
    .achievements-grid li {
        min-width: 240px !important;
        width: 240px !important;
        padding: 12px !important;

        & h1 {
            height: 36px !important;
            width: 36px !important;
            line-height: 36px !important;
            font-size: 30px !important;
            margin: 0 10px 0 0 !important;
        }
        & div {
            & h3 {
                font-size: 16px;
            }
            & p {
                font-size: 12px !important;
            }
        }
    }
}