.top-bar {
    position: fixed;
    top: 0px;
    left: 0;
    width: 100%;
    height: 74px;
    z-index: 1000;
    font-family: 'Playfair Display', serif;

    background-color: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    & .app-name-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    & .logo circle {
        fill: var(--md-sys-color-on-surface);
    }

    & .app-name {
        font-family: "Playfair Display", serif;
        font-size: 1.6rem;
        color: var(--md-sys-color-on-surface);
        margin-left: 10px;
    }

    & .menu-btn {
        background-color: transparent;
        border: none;
        cursor: pointer;
        color: var(--md-sys-color-on-surface);
        font-size: 24px;

        display: flex;
        justify-content: center;
        align-items: center;
    }
}

nav {
    width: 100%;
    position: fixed;
    bottom: 30px;
    left: 0;
    z-index: 10000;

    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--motion-expressive-default-effects);

    & .link-text {
        display: none;
    }
}

.fab {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;

    border: none;
    border-radius: 16px;
    box-shadow:
        0px 2px 4px 0px rgb(0 0 0 / 20%),
        0px 6px 10px -1px rgb(0 0 0 / 10%),
        0px 12px 20px -2px rgb(0 0 0 / 5%);
    transition: all var(--motion-expressive-default-effects);

    &:hover {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    }

    &:active {
        transform: scale(1.02);
    }

    &.add-task-btn {
        background-color: var(--md-sys-color-primary-container);
        color: var(--md-sys-color-on-primary-container);
        width: 64px;
        height: 64px;
        transition: all var(--motion-expressive-default-effects);

        & .material-symbols-rounded {
            font-size: 2.6rem;
            transition: all var(--motion-expressive-default-effects);
        }
    }
}

.actions {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 30px;

    & .material-symbols-rounded {
        font-size: 2rem;
        cursor: pointer;
    }

    & .menu {
        display: none;
    }
}

.links {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);

    width: 156px;
    height: 76px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    list-style: none;
    margin: 0;
    padding: 8px;
    border-radius: 2000px;
    box-shadow:
        0px 2px 4px 0px rgb(0 0 0 / 20%),
        0px 6px 10px -1px rgb(0 0 0 / 10%),
        0px 12px 20px -2px rgb(0 0 0 / 5%);
    transition: all var(--motion-expressive-default-effects);
    pointer-events: auto;
}

.links li {
    margin: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all var(--motion-expressive-default-effects);
    pointer-events: auto;
    cursor: pointer;

    & .material-symbols-rounded {
        font-size: 2.2rem;
        color: var(--md-sys-color-on-secondary-container);
    }

    &.active {
        background-color: var(--md-sys-color-primary);
        animation: iconPop var(--motion-expressive-fast-effects);

        & .material-symbols-rounded {
            color: var(--md-sys-color-on-primary);
            font-variation-settings: 'FILL' 1;
            animation: iconFill var(--motion-expressive-fast-effects);
        }

        & .link-text {
            color: var(--md-sys-color-on-primary);
            font-weight: 600;
        }
    }
}

.user-info {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    border-radius: 2000px;
    padding: 8px 10px;
    cursor: pointer;

    & .material-symbols-rounded {
        font-size: 2.6rem;
    }

    & .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--md-sys-color-outline-variant);
    }

    & .user-info-text {
        display: flex;
        gap: 4px;
        flex-direction: column;

        & .user-name {
            font-family: 'Playfair Display', serif;
            font-size: 1.1rem;
        }

        & .sync-status {
            font-size: 0.8rem;
            opacity: 0.5
        }
    }
}

@media (min-width: 768px) {
    .top-bar {
        background-color: var(--md-sys-color-surface);
        left: 250px;
        width: calc(100% - 250px);
    }

    #settings.active~.top-bar {
        display: none;
    }

    nav {
        width: 250px;
        height: 100%;
        left: 0;
        top: 0;
        display: flex;
        flex-direction: column;
        align-items: start;
        justify-content: space-between;
        padding-inline: 20px;
        padding-block-start: 44px;
        padding-block-end: 20px;

        background-color: var(--md-sys-color-surface-container-high);
        border-inline-end: 1px solid var(--md-sys-color-outline-variant);

        & .link-text {
            display: flex;
        }
    }

    .actions {
        & .menu {
            display: flex;
        }
    }

    .links {
        background-color: transparent;
        box-shadow: none;
        flex-direction: column;
        width: 100%;
        height: fit-content;
        border-radius: 0;
        gap: 8px;

        & li {
            width: 100%;
            height: 50px;
            border-radius: 2000px;
            justify-content: flex-start;
            gap: 10px;
            padding: 8px;

            & .material-symbols-rounded {
                font-size: 2rem;
            }

            &.active {
                background-color: var(--md-sys-color-secondary-container);

                & .link-text {
                    color: var(--md-sys-color-secondary);
                }

                & .material-symbols-rounded {
                    color: var(--md-sys-color-on-secondary-container);
                }
            }

            &:not(.active):hover {
                background-color: var(--md-sys-color-outline-variant);
            }
        }
    }

    .fab {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        box-shadow: none;

        &.add-task-btn {
            width: 168px;
            height: 66px;
            font-size: 1.2rem;

            & .material-symbols-rounded {
                font-size: 2.4rem;
            }
        }
    }

    .user-info {
        display: flex;
    }

    nav.collapsed {
        width: 100px;
        padding-inline: 12px;
        align-items: center;

        & .actions {
            align-items: center;
        }

        & .link-text {
            display: none;
        }

        & .user-info-text {
            display: none;
        }

        & .add-task-btn {
            width: 70px;
            height: 70px;
        }

        & .links li {
            width: 50px;
            height: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        &~.content {
            margin-inline-start: 100px;

            & .top-bar {
                left: 100px;
                width: calc(100% - 100px);
            }

            & .empty-state {
                left: 100px;
                width: calc(100% - 100px);
            }
        }
    }
}

.gradient-blur {
    position: fixed;
    z-index: 5;
    bottom: 0;
    left: 0;
    right: 0;
    height: 140px;
    pointer-events: none;
    touch-action: none;
}

.gradient-blur>div,
.gradient-blur::before,
.gradient-blur::after {
    position: absolute;
    inset: 0;
}

.gradient-blur::before {
    content: "";
    z-index: 1;
    -webkit-backdrop-filter: blur(0.5px);
    backdrop-filter: blur(0.5px);
    mask: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 1) 12.5%,
            rgba(0, 0, 0, 1) 25%,
            rgba(0, 0, 0, 0) 37.5%);
}

.gradient-blur>div:nth-of-type(1) {
    z-index: 2;
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    mask: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 12.5%,
            rgba(0, 0, 0, 1) 25%,
            rgba(0, 0, 0, 1) 37.5%,
            rgba(0, 0, 0, 0) 50%);
}

.gradient-blur>div:nth-of-type(2) {
    z-index: 3;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    mask: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 25%,
            rgba(0, 0, 0, 1) 37.5%,
            rgba(0, 0, 0, 1) 50%,
            rgba(0, 0, 0, 0) 62.5%);
}

.gradient-blur>div:nth-of-type(3) {
    z-index: 4;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    mask: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 37.5%,
            rgba(0, 0, 0, 1) 50%,
            rgba(0, 0, 0, 1) 62.5%,
            rgba(0, 0, 0, 0) 75%);
}

.gradient-blur>div:nth-of-type(4) {
    z-index: 5;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    mask: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 50%,
            rgba(0, 0, 0, 1) 62.5%,
            rgba(0, 0, 0, 1) 75%,
            rgba(0, 0, 0, 0) 87.5%);
}

.gradient-blur>div:nth-of-type(5) {
    z-index: 6;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    mask: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 62.5%,
            rgba(0, 0, 0, 1) 75%,
            rgba(0, 0, 0, 1) 87.5%,
            rgba(0, 0, 0, 0) 100%);
}

.gradient-blur>div:nth-of-type(6) {
    z-index: 7;
    -webkit-backdrop-filter: blur(32px);
    backdrop-filter: blur(32px);
    mask: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 75%,
            rgba(0, 0, 0, 1) 87.5%,
            rgba(0, 0, 0, 1) 100%);
}

.gradient-blur::after {
    content: "";
    z-index: 8;
    -webkit-backdrop-filter: blur(64px);
    backdrop-filter: blur(64px);
    mask: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 87.5%,
            rgba(0, 0, 0, 1) 100%);
}