html {
    box-sizing: border-box;
    -webkit-user-select: none;
  }
*, *:before, *:after {
    box-sizing: inherit;
}
html {
    width: 100%;
    height: 100%;
}
body {
    width: 100%;
    height: 100%;
    margin: 0;
    background: #212629;
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
}
::-webkit-scrollbar {
    background: #212529;
    width: 5px;
}
::-webkit-scrollbar-thumb {
    background: #fff;
}
main {
    display: grid;
    margin-left: 60px;
    min-height: 100vh;
    overflow-y: scroll;

    & aside {
        background: rgba(255,255,255,0.1);
        display: grid;
        position: fixed;
        top: 0px;
        left: 0px;
        bottom: 0px;
        grid-template-rows: 1fr auto;

        & .item {
            width: 60px;
            height: 60px;
            opacity: 0.4;
            display: flex;
            justify-content: center;
            align-items: center;
            background: transparent;
            transition: 0.2s ease opacity, 0.2s ease background;

            &:hover {
                opacity: 1;
                cursor: pointer;
            }
            &.active {
                opacity: 1;
                background: linear-gradient(135deg, #fd2f85, #7a34ec);
            }

            & .mdi {
                font-size: 22px;
            }
        }
    }
}
section {
    display: none;

    &.active {
        display: block;
    }

    &.section-startup {
        padding: 50px;

        &.active {
            display: grid;
            grid-template-rows: auto;
            grid-gap: 25px;
        }
    }

    &.section-library {
        padding: 50px;
    }
}
button, .button {
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    color: #fff;
    background: rgba(255,255,255,0.2);
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 4px;
    padding: 7px 14px;
    border: 0px;
    transition: 0.2s ease-in-out all;

    &:hover {
        background: #fff;
        color: #222;
        cursor: pointer;
    }
    &:focus {
        outline: 0;
    }
}
.song-row {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-gap: 5px;

    & .song-header {
        display: grid;
        grid-template-columns: 1fr auto;

        & .row-title {
            letter-spacing: 0.25em;
            font-size: 14px;
            font-weight: bold;
            text-transform: uppercase;

            &.row-title-noactions {
                margin: 10px 0px;
            }
        }
        & .row-controls {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-gap: 15px;

            & .item {
                width: 28px;
                height: 28px;
                font-size: 22px;
                border-radius: 50%;
                display: flex;
                justify-content: center;
                align-items: center;

                &.disabled {
                    opacity: 0.4;
                }

                &:not(.disabled):hover {
                    background: rgba(255,255,255,0.2);
                    cursor: pointer;
                }
            }
        }
    }
    & .song-list {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
        grid-gap: 15px;

        & .song-item {
            background: rgba(255,255,255,0.1);
            transition: 0.2s ease-in-out transform, 0.2s ease-in-out box-shadow;
            overflow: hidden;
            border-radius: 6px;

            & .song-cover {
                background: rgba(255,255,255,0.1);
                background-size: cover;
                width: 100%;
                padding-top: 100%;
                position: relative;

                & .song-charter {
                    position: absolute;
                    top: 0px;
                    left: 0px;
                    right: 0px;
                    bottom: 0px;
                    background: linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.8));
                    opacity: 0;
                    padding: 15px;
                    overflow: hidden;
                    display: grid;
                    transition: 0.2s ease-in-out opacity;
                    grid-template-columns: auto 1fr;
                    grid-gap: 10px;
                    align-items: flex-end;

                    & .song-charter-info {
                        display: grid;
                        align-items: center;

                        & .mdi {
                            font-size: 18px;
                        }
                        & span {
                            font-size: 12px;
                            color: transparent;
                            transition: 0.2s ease-in-out color;
                            overflow: hidden;
                            white-space: nowrap;
                        }
                    }
                }
            }

            & .song-metadata {
                padding: 15px;

                & .song-title {
                    font-weight: bold;
                    overflow: hidden;
                    white-space: nowrap;
                }
                & .song-artist {
                    margin-top: 5px;
                    opacity: 0.6;
                    overflow: hidden;
                    white-space: nowrap;
                }
            }

            &:not(.song-item-loading):not(.song-item-local):hover {
                transform: scale(1.1);
                cursor: pointer;
                box-shadow: 0px 4px 20px 5px rgba(0, 0, 0, 0.4);

                & .song-cover {
                    & .song-charter {
                        opacity: 1;
                    }
                }
            }
            &.song-item-loading {
                background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.2), rgba(255,255,255,0.1));
                animation-name: songLoadingShimmer;
                animation-fill-mode: forwards;
                animation-timing-function: linear;
                animation-iteration-count: infinite;
                animation-duration: 2s;

                & .song-cover {
                    opacity: 0;
                }
            }
            &.song-item-local {
                opacity: 0.6;

                &:hover {
                    & .song-cover {
                        & .song-charter {
                            opacity: 1;
                        }
                    }
                }
            }
        }
    }
    & .song-list-noresults {
        display: none;
        background: rgba(255,255,255,0.1);
        border-radius: 6px;
        padding: 25px;
        opacity: 0.6;
        text-align: center;

        &.active {
            display: block;
        }
    }
}
.user-row {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-gap: 5px;

    & .user-header {
        display: grid;
        grid-template-columns: 1fr auto;

        & .row-title {
            letter-spacing: 0.25em;
            font-size: 14px;
            font-weight: bold;
            text-transform: uppercase;

            &.row-title-noactions {
                margin: 10px 0px;
            }
        }
    }
    & .user-list {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-gap: 15px;
    }
}
.user-item {
    background: rgba(255,255,255,0.1);
    transition: 0.2s ease-in-out transform, 0.2s ease-in-out box-shadow;
    overflow: hidden;
    border-radius: 6px;
    display: grid;
    padding: 10px;
    grid-gap: 15px;
    grid-template-columns: 32px 1fr;

    & .user-avatar {
        background: rgba(255,255,255,0.1);
        background-size: cover;
        width: 32px;
        height: 32px;
        border-radius: 32px;
    }

    & .user-metadata {
        align-self: center;

        & .user-name {
            font-weight: bold;
            overflow: hidden;
            white-space: nowrap;
        }
    }

    &:hover {
        transform: scale(1.1);
        cursor: pointer;
        box-shadow: 0px 4px 20px 5px rgba(0, 0, 0, 0.4);
    }
}

@keyframes songLoadingShimmer {
    from {
        background-position: 0px 0px;
    }
    to {
        background-position: 173px 0px;
    }
}