:root {
    --main-font: 'Noto Sans';
    --main-background: #121214;
    --chat-background: #1a1a1e;
    --user-background: #121214;
    --message-hover: #242428;
    --blurple: #748CDC;
    --channel-background: #121214;
}

body {
    background-color: var(--main-background);
    text-align: center;
    font-family: var(--main-font);
    overflow-x: hidden;
}

.loading {
    animation: animateBg 4s linear infinite;
    background-image: linear-gradient(90deg,#3f3f3f,#212121,#3f3f3f,#212121);
    background-size: 300% 100%;
    border-radius: 5px;
}

@keyframes animateBg {
  0% { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}


/* login styles */

#loginTitle {
    color: rgb(100, 230, 220);
    font-size: 70px;
    position: relative;
    top: calc(25vh - 150px);
    font-family: var(--main-font);
    font-weight: 500;
}

#loginBackground {
    background-color: #343C3C;
    border-radius: 5px;
    text-align: center;
    position: absolute;
}

#loginBackground button {
    position: absolute;
    left: 5px;
    bottom: 5px;
    border:none;
    background-color: rgba(0, 0, 0, 0);
    text-decoration: underline;
    color: var(--blurple);
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
}

#loginBackground h1, #loginBackground h4 {
    position:absolute;
    margin-left: 10px;
    color: white;
    font-family: "Work Sans", sans-serif;
}

#loginForm input {
    font-size: 15px;
    height: 30px;
    width: 250px;
    outline: none;
    background-color: #485353;
    color: white;
    margin-top: 10px;
    margin-bottom: 10px;
    border:none;
    border-radius: 2px;
    font-family: "Work Sans", sans-serif;
    font-weight: 500;
    padding-left: 5px;
}

/* scrollbar styles */

::-webkit-scrollbar {
    background-color: rgba(0,0,0,0);
    border-radius: 2px;
    width: 9px;
}

::-webkit-scrollbar-thumb {
    background: #666771;
    border-radius: 10px;
}

/* chat styles */

#fullChatContainer {
    background-color: var(--main-background);
    width: calc(100vw - 500px);
    height: 100vh;
    position: absolute;
    top: 0;
    left: 260px;
    overflow-y: none;
}

#innerChatContainer {
    width: calc(100% - 5px);
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
}

#chatInput {
    position: absolute;
    left: 5px;
    width: calc(100% - 10px);
    min-height: 60px;
    bottom: 5px;
    overflow: hidden;
    display: flex;
}

#chatInput textarea {
    width: calc(100% - 55px);
    min-height: 25px;
    height: 16px;
    background-color: #222327;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    padding-left: 10px;
    outline:none;
    color: rgb(200, 200, 200);
    position: absolute;
    bottom: 10px;
    left: 0;
    word-wrap: break-word;
    overflow-x: hidden;
    resize: none;
    padding-top: 9px;
}

#chatInput input[type="submit"] {
    width: 35px;
    height: 35px;
    position: absolute;
    right: 3px;
    top: 5px;
    background-color: rgba(0, 0, 0, 0);
    border: none;
}

#chatInput input[type="submit"]:hover {
    cursor: pointer;
}

#sendButton {
    position: absolute;
    height: 35px;
    width: 35px;
    right: 10px;
    bottom: 15px;
}

#imageDisplay {
    background-color: rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 40px;
    position: relative;
    top: 10px;
}

#emojiPopup {
    display: none;
    position: absolute;
    z-index: 100;
    background: #333;
    border: 1px solid #555;
    color: #fff;
    padding: 5px;
    height: 250px;
    width: 250px;
    overflow-y: auto;
    font-size: 16px;
    border-radius: 5px;
    right: 270px;
    bottom: 50px;
}

#emojiPopup.visible {
    display: block;   
}

/*Message sending states */

#fullChatContainer.reply #innerChatContainer {
    height: calc(100% - 70px);
}

#fullChatContainer.reply #chatInput {
    height: 70px;
}

#fullChatContainer.images #innerChatContainer {
    height: calc(100% - 100px);
}

#fullChatContainer.images #chatInput {
    height: 100px;
}

#fullChatContainer.reply.images #innerChatContainer {
    height: calc(100% - 110px);
}

#fullChatContainer.reply.images #chatInput {
    height: 100px;
}

/*
#748CDC blurple
#44444C light-ish grey
#343C3C 
#25282D dark-ish grey
*/

/* Message styles */

.messageContainer {
    width: 100%;
    position: relative;
    left: -5px;
    top:auto;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    display: flex;
    flex-direction: column;
}

.messageContainer:not(.group) {
    margin-top: 10px;
}

.messageContainer:hover {
    background-color: var(--message-hover);
}

.messageContainer .pfp {
    position: relative;
    left: 20px;
    top: 4px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    user-select: none;
}

.messageContainer .username {
    position: absolute;
    left: 70px;
    top: -13px;
    font-size: 15px;
    color: #f9f9f9;
    font-family: "Work Sans", sans-serif;
    font-weight: 430;
    white-space: nowrap;
}

.messageContainer .username:hover {
    text-decoration: underline;
    /*cursor: pointer;*/
}

.messageContainer .timestamp {
    position: absolute;
    top: -7px;
    color: #82838b;
    font-size: 11px;
    user-select: none;
    font-weight: 400;
}

.messageContainer.group .timestamp {
    left: 5px;
    top: -7px;
    display: none;
}

.messageContainer.group:hover .timestamp {
    display: block;
}

.messageText {
    position: relative;
    color: #efeff0;
    left: 70px;
    top: -27px;
    font-size: 15px;
    height: auto;
    max-width: calc(100% - 90px);
    word-wrap: break-word;
    font-family: 'Work Sans', sans-serif;
    text-align: left;
    font-weight: 350;
    margin-bottom: -23px;
    display: block;
}

.messageImage {
    display: block;
    object-fit: contain;
    position: relative;
    left: 50px;
    width: 200px;
    height: 200px;
    padding-bottom: 5px;
}

.boldText {
    font-weight: 550;
}

.italicText {
    font-style: italic;
}


/* User List, Server List, and profile styles */

#serverList {
    width: 60px;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--main-background);
}

#serverList hr {
    width: 60%;
    border: 1px solid #393c42;
    border-radius: 3px;
    margin-top: 4px;
    margin-bottom: 3px;
}

button.serverIcon {
    width: 48px;
    height: 48px;
    max-height: 48px;
    position: relative;
    margin-top: 5px;
    margin-left: -12px;
    background-color: rgba(0,0,0,0);
    border: none;
    cursor: pointer;
}

button.serverIcon > img {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    position: relative;
}

button.serverIcon div {
    visibility: hidden;
    position: absolute;
    left: 70px;
    top: 10px;
    font-size: 17px;
    z-index: 100;
    height: 24px;
    border-radius: 5px;
    padding-left: 5px;
    padding-right: 5px;
}

button.serverIcon p {
    position: relative;
    top: -15px;
    display: inline-block;
}

button.serverIcon:hover div {
    color: #f9f9f9;
    position: absolute;
    background-color: #44444C;
    visibility: visible;
}

#channelList {
    width: 200px;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 60px;
    background-color: #121214;
    border-top-left-radius: 10px;
    border-left: #1c1c24 solid 1px;
}

#channelServerName {
    width: 100%;
    height: 30px;
    border-bottom: solid 1px #24272b;
    margin-bottom: -10px;
}

#channelList h2 {
    color: #f9f9f9;
    text-align: left;
    position: relative;
    left: 16px;
    top: 1px;
    font-size: 16px;
}

#channels {
    min-height: 30px;
}

#channels div {
    width: 95%;
    height: 30px;
    position: relative;
    left: 2.5%;
    border-radius: 5px;
    background-color: #2f3136;
    user-select: none;
}

#channels div:hover {
    background-color: #393c42;
    cursor: pointer;
}

#channels div.selected {
    background-color: #393c42;
    color: #f9f9f9;
}

#channels div.selected h3 {
    color: #f9f9f9;
}

#channels h3 {
    font-size: 16px;
    font-weight: 450;
    text-align: left;
    padding-left: 10px;
    padding-top: 3px;
    color: inherit;
}

#channels h3::before {
    content: "#  ";
    font-size: 18px;
    transform: skew(20deg);
}

#channels h3.read {
    color: #82838b;
}

#userList {
    width: 240px;
    height: 100vh;
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--user-background);
}

.userContainer {
    width: 100%;
    height: 60px;
    position: relative;
    color: black;
}

.userContainer .username {
    font-size: 20px;
    position: absolute;
    top: 10px;
}

.userContainer .pfp {
    height: 50px;
    width: 50px;
    position: relative;
    margin-left: 5px;
    margin-top: 5px;
}

/* Home menu and settings */

#userDisplay {
    width: 200px;
    height: 50px;
    position: absolute;
    left: 60px;
    bottom: 0;
    background-color: #292b2f;
    text-align: left;
    user-select: none;
}

#userDisplay .pfp {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    position: absolute;
    left: 9px;
    top: 9px;
}

#username {
    display: inline;
    position: absolute;
    left: 46px;
    bottom: 0;
    font-size: 11px;
    color: #82838b;
}

#displayName {
    display: inline;
    position: absolute;
    bottom: 14px;
    left: 46px;
    font-size: 12px;
    font-weight: 650;
    color: #f9f9f9;
    max-width: 85px;
}

#notifToggle {
    width: 24px;
    height: 24px;
    position: absolute;
    right: 40px;
    bottom: 14px;
}

#notifToggle:hover {
    cursor: pointer;
}

#buttonContainer {
    background-color: inherit;
    visibility: visible;
    position: relative;
    top: 10px;
}

#buttonContainer > * {
    background-color: inherit;
    width: 95%;
    height: 40px;
    border: none;
    color: #82838b;
    font-size: 15px;
    text-align: left;
    font-weight: 500;
    padding-left: 20px;
}

#friendsButton {
    border-top-right-radius: 7px;
    border-top-left-radius: 7px;
}

#appealButton {
    border-bottom-right-radius: 7px;
    border-bottom-left-radius: 7px;
}

#buttonContainer > *:hover, #buttonContainer > *.selected {
    background-color: #1d1d1e;
    color: #f9f9f9;
    cursor: pointer;
}

#buttonContainer > *:active {
    background-color: #2a272a;
}

#dmHeader {
    width: 100%;
    height: 20px;
    margin-top: 20px;
}

#dmHeader h3 {
    text-align: left;
    font-size: 11px;
    color: #82838b;
    position: relative;
    top: 4px;
    left: 13px;
}

#dmHeader h2 {
    text-align: center;
    font-size: 15px;
    color: #82838b;
    position: relative;
    top: -24px;
    left: 170px;
    width: 16px;
    user-select: none;
    cursor: pointer;
    display: block;
}

#dmHeader h2:hover {
    color: #f9f9f9;
}

#dmContainer {
    margin-top: 4px;
    width: 100%;
    min-height: 10px;
}

.dmContainer {
    color: #82838b;
    width: 90%;
    height: 36px;
    text-align: left;
    margin-bottom: 7px;
    margin-left: 5%;
    border-radius: 5px;
    padding-left: 4px;
    padding-top: 4px;
    cursor: pointer;
    font-weight: 400;
}

.dmContainer.selected {
    background-color: #2a272a !important;
    color: #f9f9f9;
}

.dmContainer:hover {
    background-color: #1d1d1e;
    color: #f9f9f9;
}

.dmContainer > * {
    position: absolute;
}

.dmContainer img {
    height: 32px;
    width: 32px;
    border-radius: 50%;
}

.dmContainer h1 {
    font-weight: 500;
    font-size: 15px;
    left: 50px;
    user-select: none;
}
