.sidebar {
    display: flex;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    flex: 0 0 232px;
    flex-direction: column;
    width: 232px;
    height: auto;
    padding: 64px 0 20px;
    background: var(--sidebar-bg-color);
    color: var(--text-white);
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 120px;
    padding: 0;
}

.logo img {
    display: block;
    width: 100px;
    height: 121px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 28px;
    font-family: Inter, sans-serif;
    font-weight: 400;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 40px;
    color: var(--text-tertiary);
    font-size: 1.25rem;
}

.menu a:hover {
    background: var(--ui-dark-hover);
}

.active {
    background-color: var(--ui-dark-active);
}

.legal-links {
    display: flex;
    flex-direction: column;
    margin-top: auto;
    font-family: Inter, sans-serif;
    font-weight: 400;
}

.legal-links a {
    padding: 12px 40px;
    color: var(--text-link);
    font-size: 1rem;
}

.legal-links a:hover {
    color: var(--text-link-hover);
}

.icons-sidebar {
    width: 30px;
    height: 30px;
    font-size: 1.25rem;
    object-fit: contain;
}

.menu a img {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.not-logged-in-menu {
    gap: 0;
}

.not-logged-in-menu .login-link {
    gap: 12px;
}

.login-icon {
    width: 30px;
    color: var(--text-tertiary);
    font-size: 1.25rem;
    text-align: center;
}

.mobile-nav {
    display: none;
}

@media (width <= 1024px) and (hover: none) and (pointer: coarse),
    (orientation: landscape) and (width >= 900px) and (height >= 600px) and (hover: none) and (pointer: coarse) {
    .sidebar {
        display: none;
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 20;
        align-items: center;
        height: 80px;
        padding: 0 16px;
        background: var(--sidebar-bg-color);
        box-shadow: 0 -2px 8px var(--shadow-black-12);
    }

    .mobile-nav a {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        min-width: 0;
        height: 64px;
        border-radius: 8px;
        color: var(--text-tertiary);
        font-size: 1rem;
        text-align: center;
    }

    .mobile-nav a:hover {
        background: var(--ui-dark-hover);
    }

    .mobile-nav img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .mobile-nav span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .not-logged-in-mobile-nav a {
        font-size: 1rem;
    }

    .not-logged-in-mobile-nav img {
        width: 24px;
        height: 24px;
    }
}

/* very small mobile */

@media (width <=360px) {
    .mobile-nav {
        height: 76px;
        padding: 0 4px;
    }

    .mobile-nav a {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        max-width: none;
        height: 60px;
        padding-right: 2px;
        padding-left: 2px;
        overflow: visible;
        font-size: 1rem;
        text-overflow: clip;
        white-space: nowrap;
    }

    .mobile-nav a:first-child {
        flex: 0 0 76px;
    }

    .mobile-nav a span {
        width: auto;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }

    .mobile-nav img {
        width: 22px;
        height: 22px;
    }
}
