*{
    margin: 0;
    box-sizing: border-box;
    font-family: "Lexend Deca";
}

.bg{
    background-image: url("../files/dm_bg4k.png");
    background-size: cover;
    z-index: -1;
    position: fixed;
    transform: scale(1.25);
    top: -20px; left: -20px; 
    height: calc(100% + 20px);
    width: calc(100% + 20px);
    filter: blur(20px);
    animation-name: bgDmMove;
    animation-iteration-count: infinite;
    animation-duration: 228s;
    animation-timing-function: ease-in-out;
}
@keyframes bgDmMove {
    0% {transform: scale(1.25) translate(3%, 3%);}
    33% {transform: scale(1.33) translate(-5%, 5%)}
    66% {transform: scale(1.45) translate(10%, 10%)}
    100% {transform: scale(1.25) translate(3%, 3%);}
}
main{
    display: grid;
    grid-template-columns: 21.5% 1fr;
}

.message_space{
    display: flex;
    border-left: 3px solid rgb(138 161 183 / 0.35);
    height: 100vh;
    overflow-y: auto;
}
.user_list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100vh;
    /*border: 1px solid black;*/
}
.user_dm .pfp{
    display: flex;
    max-height: 50px;
    width: 50px;
    object-fit: cover;
    border: 2px solid rgb(255 255 255 / 0.62);
    border-radius: 50%;
    margin-left: 10px;
    margin-top: 5px;
}
.user_dm{
    display: flex;
    align-items: center;
    font-size: 1.2em;
    height: 60px;
    background-color: rgb(60 62 77 / 0.55);
    color: rgb(196 170 196);
    padding: 10px 3px;
}
.user_dm:hover{
    background-color: rgb(85 87 101);
    color: rgb(236 217 236);
}
.chat_info{
    display: flex;
    flex-direction: column;
    min-height: 60px;
    padding-left: 10px;
    padding-top: 8px;
    font-weight: 500;
    
}
.time{
    margin-left: auto;
    padding-top: 24px;
    padding-right: 10px;
    justify-content: space-between;
    font-weight: 500;
    font-size: 0.8em;
    opacity: 67%;
    
}
.chat_info span a{
    display: flex;
    justify-content: flex-start;
    color: rgb(229 201 229);
    text-decoration: none;
}
.chat_info p{
    display: block;
    margin-top: 1px;
    padding-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    opacity: 70%;
    text-overflow: ellipsis;
    max-width: 140px;
}
.username_plank{
    position: sticky;
    top: 0;
}
.plank_info{
    display: flex;
    box-shadow: 0 1px 14px rgb(255 255 255 / 0.59);
    height: 80px;
    justify-content: center;
    width: 100%;
    align-items: center;
    position: relative;
    background-color: rgb(74 75 89 / 0.55);
    overflow: hidden;
    z-index: 5;
}
.username_plank img{
    display: flex;
    width: 50px;
    max-height: 50px;
    border: 2px solid rgb(255 255 255 / 0.62);
    border-radius: 100%;
    object-fit: cover;
}
.username_plank a{
    display: flex;
    text-decoration: none;
    color: #e5c9e5;
    padding-left: 20px;
    font-size: 2em;
}
.username_plank a:hover{
    text-shadow: 0 0 40px ghostwhite;
}
.username_plank img:hover{
    box-shadow: 0 0 20px ghostwhite;
}
#back-arrow{
    padding-top: 2.6%;
}
#back-arrow:hover{
    background: none;
}
.back_button {
    display: flex;
    position: absolute;
    left: 10px;
    border: none;
    margin-right: auto;
    padding-left: 10px;
    width: 240px;
    background: none;
    align-items: center;
}
.message_space{
    display: block;
    overflow: scroll;
}
.dialog_space{
    padding-top: 10px;
    overflow-y: scroll;
    overflow-x: hidden;
    height: 85vh;
}
.friend_message{
    position: relative;
    margin: 5px 5px;
    display: flex;
    border: 1px solid;
    background-color: rgb(131 133 173);
    color: #d0d0ee;
    border-radius: 10px;
    flex-direction: column;
    justify-content: left;
    max-width: 39.5vw;
    width: fit-content;
    height: fit-content;
    padding: 6px;
}
.friend_message span{
    display: flex;
    font-size: 0.9em;
    position: absolute;
    opacity: 0;
    right: 0;
    bottom: -35px;
    
    transform: translateY(-14px);
    transition: opacity 0.2s, transform 0.2s;
    padding: 5px;
}
.friend_message:hover span{
    opacity: 1;
    transform: translateY(-10px);
}
.user_message{
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid;
    background-color: rgb(131 133 173 / 0.55);
    color: #d0d0ee;
    border-radius: 10px;
    justify-content: right;
    max-width: 40vw;
    width: fit-content;
    height: fit-content;
    padding: 6px;
    margin: 0 5px 5px auto;
}
.user_message span{
    display: flex;
    font-size: 0.9em;
    position: absolute;
    opacity: 0;
    left: 0;
    bottom: -35px;
    transform: translateY(-14px);
    transition: opacity 0.2s, transform 0.2s;
    padding: 5px;
}
.user_message img, .friend_message img{
    object-fit: cover;
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    display: block;
    margin-top: 5px;

}
.user_message:hover{
    margin-bottom: 22px;
    transition: 0.2s;
}
.friend_message:hover{
    margin-bottom: 22px;
    transition: 0.2s;
}
.user_message:hover span{
    opacity: 1;
    transform: translateY(-10px);
}
.input_bar{
    position: fixed;
    overflow: visible;
    bottom: 14px;
    display: grid;
    grid-template-columns: 90% 5% 5%;
    border-radius: 15px;
    margin-left: 1vw;
    justify-content: center;
    align-content: center;
    align-items: center;
    margin-top: auto;
    border: 1px solid white;
    width: 76vw;
    height: 50px;
    z-index: 2;
}
.input_bar input{
    width: 100%;
    height: 48px;
    border-radius: 15px 0 0 15px;
    outline: none;
    font-size: 1.5em;
    border: white;
    padding: 10px;
    background-color: rgb(135 109 168 / 0.47);
    color: white;
}
.input_bar input::placeholder{
    color: #d0d0ee;
}
.input_button{
    height: 48px;
    width: 100%;
    text-decoration: none;
    border: none;
    background-color: rgb(135 109 168 / 0.47);
    color: white;
}
#send_button:hover{
    background-color: #5b5d80;
    transition: background-color 0.4s;
}
#attachment_button:hover {
    background-color: #5b5d80;
    transition: background-color 0.4s;
}
#send_button{
    border-radius: 0px 15px 15px 0;
}
.search_bar{
    display: flex;
    width: 100%;
    justify-content: space-between;
    height: 30px;
}
.search_bar input{
    width: 90%;
    outline: none;
    border: white;
    background-color: rgb(135 109 168 / 0.47);
    color: white;
    padding-left: 10px;
}
#search_bar_button{
    display: flex;
    flex-direction: column;
    width: 10%;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: rgb(135 109 168);
    color: white;
}
#search_bar_input:hover{
    cursor: text;
}
#search_bar_button:hover{
    cursor: pointer;
}
.delete_dm_button{
    display: none;
    position: absolute;
}
.delete_dm_button button{
    width: 30px;
    height: 30px;
    color: white;
    background-color: red;
    box-shadow: none;
    border: 1px solid white;
    position: relative;
    right: 10px;
    bottom: 5px;
    border-radius: 2px;
}
.delete_dm_button button:hover{
    background-color: white;
    color: red;
    transition: 0.25s;
    cursor: pointer;
}
@keyframes button_pop_up {
    0%{opacity: 0}
    100%{opacity: 100%}
}
.user_message:hover .delete_dm_button{
    display: block;
    animation-name: button_pop_up;
    animation-iteration-count: 1;
    animation-duration: 0.4s;
}
.move_a_bit{
    position: relative;
    right: 30px;
}
.attachment_menu{
    display: none;
    height: 100px;
    width: 76vw;
    border-radius: 10px;
    margin-left: calc(1vw + 5px);
    position: fixed;
    bottom: 69px;
}
.attachment_menu img{
    max-height: 100px;
    padding: 1px;
    border-radius: 10px;
    border: 1px solid white;
}
.attachment_menu button{
    height: 50px;
    justify-content: center;
    align-items: center;
    position: relative;
    bottom: 45px;
    border: 1px solid rgb(255 255 255 / 0.45);
    background-color: #e5c9e5;
    color: #ec6666;
}
.attachment_menu button:hover{
    background-color: red;
    color: #e5c9e5;
    transition: 0.1s;
    cursor: pointer;
}