::-webkit-scrollbar {
    background: none;
}

::-webkit-scrollbar-track {
    background: none;
}

::-webkit-scrollbar-thumb {
    background-clip: padding-box;
    background: rgba(90, 90, 90);
    border-radius: 10px;
    border: 3px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(120, 120, 120);
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: rgba(60, 60, 60);
}
.full {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(75, 75, 75);
    z-index: 1;
}
.top {
    width: 100%;
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
}
.chatsearch {
    height: 70px;
    font-size: 25px;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(60, 60, 60);
    z-index: 100;
    transition: left 0.3s ease;
}
.chatsearchinput{
    background-color: rgba(60, 60, 60);
    font-size: 30px;
    height: 60px;
    padding: 5px;
    margin: 5px 0px;
    border: none;
}
.chatsearchinput:focus {
    outline: none;
}
.chatsearchblendin {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    width: 60px;
    border-radius: 50%;
    position: fixed;
    top: 5px;
    background-color: rgb(90, 90, 90);
    z-index: 110;
    cursor: pointer;
    transition: left 0.3s ease;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}
.chatsearchblendin.rotate {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}
.chatname {
    height: 30px;
    padding: 20px;
    padding-left: 70px;
    padding-right: 90px;
    font-size: 25px;
    border: none;
    position: fixed;
    top: 0;
    z-index: 90;
    transition: left 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chatimg {
    height: 50px;
    width: 50px;
    margin: 10px;
    border-radius: 50%;
    position: fixed;
    top: 0;
    background-color: rgb(177, 177, 177);
    z-index: 91;
    transition: left 0.3s ease;
}
.chatedit {
    justify-content: center;
    align-items: center;
    display: flex;
    height: 50px;
    width: 50px;
    margin: 10px;
    border-radius: 50%;
    position: fixed;
    top: 0;
    right: 10px;
    background-color: rgb(90, 90, 90);
    z-index: 91;
    transition: left 0.3s ease;
    cursor: pointer;
}
.chateditpopup {
    display: none;
    z-index: 1200;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(60, 60, 60);
    transition: left 0.3s ease;
    border-radius: 5px;
    min-width: 300px;
    min-height: 200px;
    padding: 20px;
}
.chatleave {
    justify-content: center;
    align-items: center;
    display: flex;
    height: 50px;
    width: 50px;
    margin: 10px;
    border-radius: 50%;
    position: fixed;
    top: 0;
    right: 10px;
    background-color: #4f0000;
    z-index: 91;
    transition: left 0.3s ease;
    cursor: pointer;
}
.left {
    height: 100%;
    position: fixed;
    top: 70px;
    background-color: rgba(30, 30, 30);
    z-index: 100;
    transition: left 0.3s ease;
}
.chatlist{
    font-size: 25px;
    height: calc(100% - 70px);
    overflow: auto;
}
.chatlistitem{
    display: flex;
    align-items: center;
    height: 60px;
    padding: 5px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chatlistname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chatlistitem:hover {
    background-color: rgba(60, 60, 60);
}
.chatlistimg{
    height: 50px;
    width: 50px;
    border-radius: 50%;
    margin: 5px;
    object-fit: cover;
    background-color: rgb(177, 177, 177);
}
.messages{
    height: calc(100% - 140px);
    overflow: auto;
}
@media (max-width: 1000px) {
    .left {
        left: -100%;
        width: 100%;
    }
    .showleft {
        left: 0px;
    }
    .center {
        left: 0;
        width: 100%;
    }
    .bottom {
        left: 0;
        width: 100%;
    }
    .chatname {
        left: 70px;
        width: calc(100% - 90px - 140px);
    }
    .chatimg {
        left: 70px;
    }
    .chatsearch {
        width: 100%;
        left: calc(-100% - 40px);
    }
    .chatsearchinput {
        width: calc(100% - 71px);
    }
    .showChatSearch {
        left: 70px;
    }
    .chatsearchblendin {
        left: 5px;
    }
}
@media (min-width: 1001px) {
    .left {
        left: 0px;
        width: 500px;
    }
    .showleft {
        left: 0px;
    }
    .center {
        left: 500px;
        width: calc(100% - 500px);
    }
    .bottom {
        left: 500px;
        width: calc(100% - 500px);
    }
    .chatname {
        left: 500px;
        width: calc(100% - 430px - 90px - 140px);
    }
    .chatimg {
        left: 500px;
    }
    .chatsearch {
        width: 500px;
    }
    .chatsearchinput {
        width: calc(100%);
    }
    .showChatSearch {
        left: 0px;
    }
    .chatsearchblendin {
        left: -70px;
    }
}
.center {
    height: 100%;
    position: fixed;
    top: 70px;
    background-color: rgba(21, 21, 21);
    /*background: linear-gradient(90deg, #1e3c72, #6a0572);*/
    z-index: 10;
    transition: left 0.3s ease;
    flex-direction: column-reverse;
}
.bottom {
    display: flex;
    height: 70px;
    position: fixed;
    bottom: 0;
    background-color: rgba(60, 60, 60);
    z-index: 80;
    transition: left 0.3s ease;
}
.filedisplay {
    display: none;
    position: fixed;
    bottom: 70px;
    background-color: rgba(60, 60, 60);
    height: 160px;
    padding: 5px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.filedisplay:hover .filedisplay-overlay {
    z-index: 110;
    opacity: 1;
    transition: opacity 0.2s ease-in;
}
.filedisplay-overlay {
    display: flex; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.2); 
    color: rgba(136, 0, 0, 0.8); 
    font-size: 8em; 
    justify-content: center; 
    align-items: center;
    opacity: 0;
    transition: opacity 0.1s ease-out;
}
.replydisplay {
    display: none;
    right: 10px;
    position: fixed;
    bottom: 70px;
    background-color: rgba(60, 60, 60);
    padding: 5px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.replydisplay:hover .replydisplay-overlay {
    z-index: 110;
    opacity: 1;
    transition: opacity 0.2s ease-in;
}
.replydisplay-overlay {
    display: flex; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.2); 
    color: rgba(136, 0, 0, 0.8); 
    font-size: 8em; 
    justify-content: center; 
    align-items: center;
    opacity: 0;
    transition: opacity 0.1s ease-out;
}
.removeReply {
    margin-top: -5px;
    margin-bottom: -10px;
}
.reaction-img {
    background-color: rgba(60, 60, 60);
    height: 24px;
    width: 24px;
    padding: 2px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: -20px;
    transition: transform 0.3s ease;
}
/*
.messageleft {
    font-size: 20px;
    max-width: 70%;
    max-height: 300px;
    float: left;
    background: linear-gradient(90deg, #6a0572, #442172);
    z-index: 70;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    padding: 10px;
    padding-top: 5px;
    margin: 10px;
}
.messageright {
    font-size: 20px;
    max-width: 70%;
    max-height: 300px;
    float: right;
    background: linear-gradient(90deg, #442172, #1e3c72);
    z-index: 70;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-left-radius: 15px;
    padding: 10px;
    padding-top: 5px;
    margin: 10px;
}
*/
.messageleft {
    word-break: break-word;
    font-size: 20px;
    max-width: 70%;
    float: left;
    background-color: rgba(35, 35, 35);
    z-index: 70;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    padding: 10px;
    padding-top: 5px;
    margin: 10px;
}
.messageright {
    word-break: break-word;
    font-size: 20px;
    max-width: 70%;
    float: right;
    background-color: rgba(0, 26, 79);
    z-index: 70;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-left-radius: 15px;
    padding: 10px;
    padding-top: 5px;
    margin: 10px;
}
.messageright::selection {
    background-color: gray;
}
.messageleft::selection {
    background-color: gray;
}
.messagebody {
    width: 100%;
    height: auto;
    display: block;
    overflow: auto;
}
.messagebodybutton {
    display: none;
    float: right;
    background-color: rgba(42, 42, 42);
    color: white;
    padding: 0px;
    border-radius: 2px;
    height: 24px;
    width: 24px;
    margin-left: 0px;
    margin-top: -15px;
    cursor: pointer;
    z-index: 115;
}
.messagebody:hover .messagebodybutton {
    display: block;
}
.messagebodybutton:hover {
    background-color: rgba(60, 60, 60);
    z-index: 120;
}
.messagebodybutton:active {
    background-color: rgba(50, 50, 50);
    z-index: 120;
}
.flex {
    display: flex;
}
.messagecontainer {
    align-items: center;
    justify-content: center;
    border: none;
    resize: none;
    font-size: 20px;
    display: flex;
    width: calc(100% - 140px);
    height: 100%;
    background-color: rgba(60, 60, 60);
    overflow-y: auto;
    padding-top: 21px;
    box-sizing: border-box;
}

.messagecontainer:empty:before {
    padding-top: 0px;
}
.messagecontainer:focus {
    outline: none;
}
.replyto{
    cursor: pointer;
    font-size: 12px;
    color: #999;
}
.chatsendimg {
    height: 200px;
    max-width: 250px;
    border-radius: 5px;
    background-color: rgb(21, 21, 21);
    object-fit: contain;
    cursor: pointer;
}
.popupimg {
    display: none; 
    z-index: 1000000;
    position: absolute;
    height: 100svh;
    width: 100svw;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    object-fit: contain;
    overflow: hidden;
}
.chatsendvid {
    max-height: 200px;
    max-width: 300px;
    border-radius: 5px;
    background-color: rgb(177, 177, 177);
}
.chatsendaud {
    max-height: 200px;
    max-width: 300px;
    border-radius: 5px;
    background-color: rgb(177, 177, 177);
}
.filecontainer {
    justify-content: center;
    align-items: center;
    display: flex;
    border-radius: 50%;
    margin: 10px;
    width: 50px;
    height: 50px;
    background-color: rgb(90, 90, 90);
    cursor: pointer;
}
.send {
    justify-content: center;
    align-items: center;
    display: flex;
    border-radius: 50%;
    margin: 10px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 26, 79);
    cursor: pointer;
}
.highlight {
    border: lightblue 2px solid;
    margin: -2px;
    border-radius: 5px;
}


/* Login Screen */
.allcenter {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100svh;
}
.loginpopup {
    width: 300px;
    height: 250px;
    background-color: rgba(116, 116, 116, 0.5);
    z-index: 1000;
    border-radius: 5px;
    padding: 10px;
    margin: 10px;
}
.loginheader {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    color: #ddd;
}
.loginbody {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.5);
    z-index: 1000;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}
.usernameInput {
    width: 100%;
    height: 30px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid black;
    margin-bottom: 5px;
}
.passwordInput {
    width: 100%;
    height: 30px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid black;
    margin-bottom: 5px;
}
.loginButton {
    width: 100%;
    height: 30px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid black;
    margin-bottom: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
}
.loginError {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    background-color: rgba(255, 0, 0, 0.5);
    border-radius: 5px;
    margin-top: 20px;
    padding: 5px;
}


/* Loading Screen */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}