body {
    margin: 0;
    padding: 0;
    background-color: #151619;
    color: #f0f0f0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contain {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    margin-top: 1rem;
}

.contain h1 {
    margin-top: 2vh;
    font-size: 2rem;
    font-weight: 700;
}

.contain #title {
    margin-bottom: 2rem;
}

#input-container {
    width: 25%;
}

#input-container textarea {
    width: 100%;
    max-width: 100%;
    height: 4rem;
    background-color: #f0f0f0;
    border-radius: 10px;
    color: #202124;
    padding: 1px 5px;
    word-wrap: break-word;
    white-space: normal;
}

.contain #send-container {
    display: flex;
    justify-content: center;
    width: 15%;
}

.contain #send {
    margin-top: 1rem;
    border: 1px solid #f0f0f0;
    width: 50%;
    padding: 5px 25px;
    border-radius: 10px;
    transition: 0.2s;

}

.contain #send:hover {
    transition: 0.2s;
    transform: scale(1.05);
}

.contain #send:focus {
    background-color: #f0f0f0;
    color: #101010;
}

#main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10%, 30%));
    gap: 1.6rem; 
    width: 80%;
    margin-top: 3rem;
}

.element {
    display: inline-flex;
    flex-direction: column;
    padding: 5px 10px;
    margin: 20px 5px;
    color: #f0f0f0;
    background-color: #323339;
    /*border: 1px solid #cccccc;*/
    border-radius: 5px;
    width: 100%;
    max-width: none !important; 
    min-width: 10%;
    min-height: 60px;
    max-height: 150px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: ellipsis;
}

.element .element-date {
    width: 80%;
    font-size: 0.7rem;
    color: #cccccc;
    border-bottom: 1px solid #cccccc;
}

.element .element-main {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: space-between;
    align-items: center;
}

.element span {
    width: 80%;
    overflow: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
    height: 90%;
    max-height: 150px;
}

.element i {
    width: 10%;
    margin: 0px 5px;
    text-align: center;
    background-color: #ea613e;
    padding: 12px 0px;
    border-radius: 50px;
    cursor: pointer;
}

.element img {
    margin-top: 0.5rem;
    width: 100%;
    height: 100%;
    max-height: 100px;
    object-fit: contain;
}

@media screen and (max-width: 767px) {
    .contain h1 {
        font-size: 1.5rem;
    }
    
    #input-container {
        width: 50%;
    }

    #input-container input {
        height: 4rem;
    }

    .contain #send-container {
        width: 50%;
    }

    .contain #send {
        width: 70%;
        padding: 5px 15px;
    }
    
    #main {
        flex-direction: column;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
    }
    
    .element {
        display: flex;
        width: 90%;
        max-width: 90%;
        justify-content: space-between;
        margin-top: 10px;
    }
}

@media screen and (max-width: 479px) {
    .contain h1 {
        font-size: 1.2rem;
    }
    
    #input-container {
        width: 90%;
    }

    /*#input-container textarea {
        height: 5rem;
    }*/

    .contain #send-container {
        width: 75%;
    }

    .contain #send {
        width: 90%;
        padding: 5px 10px;
    }
}

/* WebKit-based browsers */
::-webkit-scrollbar {
    width: 8px; /* width of the scrollbar */
  }
  
  ::-webkit-scrollbar-track {
    background: transparent; /* color of the scrollbar track */
  }
  
  ::-webkit-scrollbar-thumb {
    background-color: #888; /* color of the scrollbar thumb */
    border-radius: 6px; /* roundness of the scrollbar thumb */
  }
  
  /* Mozilla Firefox */
  ::-moz-scrollbar {
    width: 12px; /* width of the scrollbar */
  }
  
  ::-moz-scrollbar-track {
    background: transparent; /* color of the scrollbar track */
  }
  
  ::-moz-scrollbar-thumb {
    background-color: #888; /* color of the scrollbar thumb */
    border-radius: 6px; /* roundness of the scrollbar thumb */
  }