body{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #ffff;
}

.container{
    display: flex;
    flex-direction: column;
    max-width: 2000px;
    border: 5px solid #b8b8b8;
    background: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px 5px 50px;
}

.left-group{
    display: flex;
    align-items: center;
    gap: 10px;
}

.left-group img{
    width: 50px;
    height: 50px;
}

.left-group p{
    text-transform: uppercase;
    font-size: 24px;
}

.right-group{
    display: flex;
    align-items: center;
    gap: 10px;
}

.right-group p{
    font-size: 18px;
}

.right-group img{
    width: 50px;
    height: 50px;
}

.darker{
    width: 100%;
    border-top: 1px solid grey;
}

.email-group{
    display: flex;
    padding: 10px 30px;
}

nav ul{
    margin: 0;
    padding: 5px 20px;
}

nav ul li{
    display: flex;
    align-items: center;
    list-style-type: none;
    gap: 10px;
    padding: 15px 100px 15px 20px;
    font-size: 18px;
}

nav ul li span{
    display: inline;
}

nav ul li::before{
    content: url(./img/incom.png);
}

nav ul li:nth-child(2)::before{
    content: url(./img/outcom.png);
}

nav ul li:nth-child(3)::before{
    content: url(./img/draft.png);
}

nav ul li:nth-child(4)::before{
    content: url(./img/spam.png);
}

nav ul li:hover{
    background: #f4e4e4;
}

.message-list{
    padding-bottom: 40px;
}

.message-group{
    display: flex;  
    align-items: center;
    gap: 20px;
    padding-left: 20px;
}

.message-group:hover{
    background: #ececec;
}

.message-group img{
    width: 20px;
    height: 20px;
    padding-right: 10px;
}

.message-content{
    display: flex;
    gap: 70px;
}

.message-group .name{
    width: 150px;
    font-size: 18px;
}

.message-group .message{
    font-size: 18px;
}

.message-group .grey{
    color: grey;
}

.right-side{
    display: flex;
    align-items: center;
    gap: 25px;
    margin-left: auto;
    white-space: nowrap;
    padding-right: 50px;
}

.message-group .date{
    font-size: 18px;
}

.message-group .date-without{
    font-size: 18px;
}

.lighter{
    margin: 0 5px 0;
    color: lightgray;
}

@media (max-width: 800px) and (min-width: 550px){

    .container{
        max-width: 800px;
    }

    .message-list{
        padding-bottom: 10px;
    }

    .message-group{
        position: relative;
        align-items: start;
        padding: 10px 0;
    }

    .message-group img{
        padding-left: 10px;
        padding-right: 0;
    }

    .message-content{
        flex-direction: column;
        gap: 5px;
        flex: 1;
    }

    .message-group .name{
        margin: 0;
    }

    .message-group .message{
        margin: 0;  
    }

    .message-group .grey{
        display: block;
        width: 400px; 
    }

    .message-group .dash{
        display: none;
    }

    .right-side{
        position: absolute;
        top: 5px;
        left: 300px;
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .message-group .date{
        margin-left: 35px;
    }

    .message-group .date-without{
        margin-left: 85px;
    }

    .lighter{
        margin: 0 1px;
    }

}

@media (max-width: 550px){
    .container{
        max-width: 550px
    }

    nav ul li{
        padding: 10px 20px;
    }

    nav ul li span{
        display: none;  
    }

    .message-group{
        align-items: start;
        padding: 10px 0;
        gap: 5px;
    }

    .message-group img{
        padding-right: 0;
    }

    .message-content{
        flex-direction: column;
        gap: 5px;
    }

    .message-group .name{
        margin: 0;
    }

    .message-group .message{
        display: block;
        width: 150px;
        margin: 0; 
        white-space: nowrap;
        overflow: hidden; 
        text-overflow: ellipsis;
    }

    .message-group .grey{
        display: block;
        width: 700px; 
    }

    .message-group .dash{
        display: none;
    }

    .message-group .date{
        padding-left: 20px;
    }

    .lighter{
        margin: 0 5px 0;
    }

}
