html {
    height: 100%;
}

body {
    background: rgb(37,0,43);
    background: -moz-linear-gradient(0deg, rgba(37,0,43,1) 0%, rgba(0,0,0,1) 100%);
    background: -webkit-linear-gradient(0deg, rgba(37,0,43,1) 0%, rgba(0,0,0,1) 100%);
    background: linear-gradient(0deg, rgba(37,0,43,1) 0%, rgba(0,0,0,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#25002b",endColorstr="#000000",GradientType=1);

    font-family: 'JetBrains Mono', monospace;
    color:white;
    top:0;
    margin:0;
    padding:0;
    background-attachment: fixed;
    background-size: 100% 100%;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    text-shadow: 0 0 20px #ff00b3;
}

a {
    color: white;
    text-decoration: none;
}

body::before{
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 4px 100%;
    pointer-events: none;
}

.contentBox {
    background: black;
    box-shadow: 0 0 20px rgba(255,0,179,0.4), 0 0 40px rgba(255,0,179,0.1) inset;
    border-style: solid;
    border-width: 2px;
    margin: auto;
    overflow-y: auto;
    margin-bottom: 30px;
    text-align: center;
    overflow-x: hidden;
    box-sizing: border-box;
    z-index: 5;
}

.contentTitle {
    width:100%;
    display:block;
    overflow-y: hidden;
    background-color: #fff;
    color:black;
    padding-left:5px;
    padding-right:5px;
    box-sizing:border-box;
    font-size:small;
    text-align: left;
    padding: 2px;
}

.content {
    width: 80%;
    margin: auto;
    padding: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: row;
    flex-grow: 1;
}

.chatbox {
    height: 80vh;
    width: 80%;
    display:flex;
    flex-direction: column;
}

.usersbox {
    height: 80vh;
    width: 20%;
    display:flex;
    flex-direction: column;
}


.messageContent {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-grow: 1;
    height: 100%; 
    overflow: hidden;
}

#messages {
    height: calc(100% - 40px); 
    overflow-y: auto; /* Enable scrolling */
    flex-direction: column-reverse;
    display: flex;
    padding: 10px;
}


#form {
    height: 40px;
    border: 0;
    margin: 0;
    background-color: red;
    display: flex;
    flex-direction: row;
    border-top: 2px solid #fff;
}

#input {
    flex-grow: 1;
    border-radius: 0;
    border: none;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    text-indent: 10px;
    background-color: #14000e;
    font-size: 16px;
}
#input:focus {
    box-shadow: 0 0 20px rgba(255,0,179,0.1) inset;
}
#submit {
    border: none;
    background-color: #14000e;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    outline: none;
    cursor: pointer;
    padding: 0 10px;
    border-left: 2px solid #fff;
    box-shadow: 0 0 40px rgba(255,0,179,0.0) inset;
}
#submit:hover {
    background-color: #240119;
    box-shadow: 0 0 20px rgba(255,0,179,0.1) inset;
}

/* Pfp Popup */
.pfpPopupBack {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(21, 0, 24, 0.534);
    z-index: 100;
}

.pfpPopupBox  {
    background: black;
    border: 2px solid #fff;
    width: 50%;
    max-width: 800px;
    box-shadow: 0 0 20px rgba(255,0,179,0.4), 0 0 40px rgba(255,0,179,0.1) inset;
}

.avatarArea {
    padding: 15px;
}
.avatarElement  {
    width: 100%;
    height: auto;
    opacity: 0.5;
    cursor: pointer;
}
.avatarImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatarGrid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    width: 100%;
    height: 100%;
}
.activePfp {
    border: 2px solid #ff00b3;
    opacity: 1;
}


/* Messages */
.messageBox {
    display:flex;
    flex-direction: row;
    margin: 5px;
    padding: 5px;
}
.pfp {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    margin-right: 20px;
}
.message {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    align-items: left;
    min-width: 0;
    overflow-wrap: break-word;
}
.above {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 3px;
}
.time {
    font-size: 13px;
    color: #ffffffb2;
    margin-left: 10px;
    margin-right: 10px;
}
.name {
    color: #ffffffc7;
}
.text {
    text-align: left;
    margin-bottom: 5px;
    font-size: 16.3px;
    min-width: 0;
    overflow-wrap: break-word;
}

.ID {
    display:none;
}

.userProfile {
    margin-bottom: 0;
}
.onlineUsers {
    flex-grow: 1;
    border-top: none;
    margin-top: 0px;
    margin-bottom: 10px;
}

.rightSide {
    width: 100%;
    margin-left: 10px!important;    
}

.funnyBox {
    margin-bottom: 0;
}

.profile {
    display:flex;
    flex-direction: row;
}

.bigPfp {
    height: 100px;
    width: 100px;
    display: flex;
    cursor: pointer;
}

.nameBig {
    font-size: 20px;
    margin-bottom: 0;
    display: flex;
    cursor: pointer;
}
.idBig {
    font-size: 13px;
    margin-bottom: 0;
    color:#ffffff88;
    display: flex;
}

.rightProfile {
    display:flex;
    flex-direction: column;
    justify-content: left;
    padding: 10px;
}

.funnyImage {
    width: 100%;
    padding: 0;
    margin: 0;
}

.userlistBox {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    padding: 10px;
}
.pfpSide {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    margin-right: 10px;
}
.rightSideList {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    align-items: left;
}
.nameSide {
    color: #ffff;
    display: flex;
    font-size: 16px;
}
.idSide {
    color: #ffffffc7;
    font-size: 13px;
    display: flex;
}

.nobodyOnline {
    padding: 10px;
}