:root {
    --indigo: hsla(287, 100%, 23%, 1);
    --vivid-orchid: hsla(309, 100%, 43%, 1);
    --royal-orchid-opacity: hsla(289, 100%, 31%, 0.75);
    --royal-orchid: rgba(129, 0, 158, 1);
    --crimson-violet: rgb(82, 0, 68);
    --crimson-violet-opacity: hsla(310, 100%, 16%, 0.75);
    --crimson-violet-opactiy-glass: hsla(310, 100%, 16%, 0.10);
    --midnight-violet-opacity: rgba(36, 0, 30, 0.757);
    --midnight-violet: rgba(36, 0, 30, 1);
    --indigo-2: hsla(276, 100%, 23%, 1);
    --white-grey: rgb(225, 225, 225);
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: url(../assets/images/1qltq5uehmr71.png);
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    font-family: DM sans, Georgia, Times, 'Times New Roman', serif;
    font-size: larger;
    font-weight: 300;
    color: var(--white-grey);
}

h1 {
    position: relative;
    top: auto;
    margin: 30px 0;
    font-weight: 400;
    letter-spacing: 0.2rem;
    text-align: center;
}

.div-outer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 30px;
    height: auto;
    background: var(--crimson-violet-opactiy-glass);
    box-shadow: 0 8px 30px 0 var(--crimson-violet);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 2px solid var(--crimson-violet-opacity);
    border-radius: 40px 0px 40px 0px;
    margin: 10px auto;
}

.div-main-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 95%;
}

.div-main-box-logged-in {
    display: flex;
    flex-direction: row;
    align-items: start;
    justify-content: center;
}

.description-section {
    display: block;
    align-items: center;
    text-align: center;
    width: 40%;
    color: var(--white-grey);
    margin: 0 auto 25px auto;
}

#alert-display {
    color: rgb(182, 148, 15);
    background-color: var(--crimson-violet-opacity);
    padding: 10px;
}

input {
    border-radius: 5px;
    font-size: 14px;
    padding: 10px;
    margin: 3px;
    font-weight: 600;
    background-color: var(--midnight-violet-opacity);
    color: var(--white-grey);
    border: var(--indigo) 2px solid;
}

.chat-input-div {
    position: relative;
}

#emoji-picker-container {
    position: absolute;
    width: 30%;
    bottom: 50px; 
    z-index: 100;
}

#emoji-trigger {
    padding: 0;
    height: 40px;
    border-radius: 5px;
    font-size: 20px;
    border: none;
    background-color: rgba(255, 255, 255, 0);
}

#username {
    border-radius: 20px 5px 0px 0px;
}

::placeholder {
    color: rgba(255, 255, 255, 0.506);
}

#login-btn {
    border-radius: 0px 0px 20px 5px;
    cursor: pointer;
    position: relative;
    z-index: 101;
    background-color: var(--crimson-violet-opacity);
}

#logout-btn {
    width: 286px;
    align-self: start;
    border-radius: 25px;
}

#form-username {
    display: flex;
    margin: 30px auto;
    width: 90%;
    display: flex;
    flex-direction: column;
}

#username-div p {
    text-align: center;
    margin: 5px;
}

section {
    display: flex;
    flex-direction: column;
}

#username-div {
    margin: 0 auto;
    width: 90%;
    max-width: 400px;
    position: relative;
    z-index: 100;
    flex-direction: column;
    justify-content: center;
}

ul {
    display: flex;
    margin: 5px;
    padding: 0;
}

li {
    background-color: var(--crimson-violet-opacity);
    border-radius: 5px;
    border: 1px solid var(--vivid-orchid);
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 5px;
}

#online-users-main-div {
    width: 100%;
    align-self: start;
}

.online-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid black;
}

#chat-stage {
    display: flex;
    flex-direction: column;
}

.chat-input-div {
    flex-direction: row;
    align-self: center;
}

#chat {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 530px;
    overflow-y: auto;
    padding: 5px;
    margin-right: 5px;
    box-sizing: border-box;
    background-color: var(--crimson-violet-opacity);
}

#chat .text-msg,
#chat .other {
    font-size: 14px;
    font-weight: 200;
    z-index: 1;
    width: 60%;
    max-width: 500px;
    padding: 5px;
    margin: 5px;
    border: 1px solid black;
    border-radius: 5px;
    background-color: rgba(99, 33, 101, 0.751);
}

#chat .username {
    font-size: 16px;
    font-weight: 500;
}

#chat time {
    font-size: 12px;
}

#chat .text-msg {
    align-self: flex start;
}

#chat .other {
    align-self: flex-end;
    text-align: right;
}

canvas {
    margin: 0px 5px;
    border: 1px solid var(--midnight-violet);
    background-color: rgba(255, 255, 255, 0.534);
    opacity: 75%;
    border-radius: 10px;
    border-width: 3px;
    border-style: inset;
    touch-action: none;
}

.hidden {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}