* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    font-family: sans-serif;
    background-color: #323339;
    color: #eee;
	scrollbar-width: thin;
    scrollbar-color: #202225 #2f3136;
}

#login-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    background-image: url("https://i.imgur.com/FZSWuc2.png");
	background-color: #323339;
    background-size: cover;
    background-position: top left;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: fixed;
    z-index: 100;
}

#login-form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 650px;
    height: 250px;
    background: #323339;
    margin: auto auto;
	border-radius: 20px;
}

#login-form a {
    font-size: 18px;
    color: white;
    text-decoration: none; 
    background: #5a69d7;
    padding: 16px;
    border-radius: 15px;
}

#login-form a:visited {
    color: white;
    text-decoration: none; 
}

#login-form form {
    display: block;
}

#app {
    display: grid;
    grid-template-columns: 60px 240px 1fr 280px;
    grid-template-rows: 34px auto;
    grid-template-areas:
    "global-topbar global-topbar global-topbar global-topbar"
    "sidebar dm-panel chat right-panel";
    height: 100vh;
}

.global-topbar {
    grid-area: global-topbar;
    background-color: #2c2d32;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #38393e;
}

.global-title {
    font-weight: normal;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.global-title img {
    height: 20px;
    border-radius: 50%;
}

.sidebar {
    grid-area: sidebar;
    background-color: #2c2d32;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    gap: 10px;
    border-right: 1px solid #444;
    overflow-y: hidden;
}

.server {
    width: 45px;
    height: 45px;
    border-radius: 25%;
    overflow: hidden;
    cursor: pointer;
    position: relative;
	margin-top: 12px;
}

.server-icon {
    width: 100%;
    height: 100%;
}

.server-icon .server-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.server-name {
    display: none;
}

.separator {
    width: 30px;
    height: 1px;
    background-color: #444;
    margin: 12px 0 0 0;
}

.separator0 {
    width: 30px;
    height: 1px;
    background-color: #444;
    margin: 12px 0 0 0;
}

#server-nav-panel {
    grid-area: dm-panel;
    background-color: #2c2d32;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid #444;
    overflow-y: auto;
}

/* this is not a place of honor */

#app:not(.dm-nav-panel) .dm-exclusive {
    display: none;
}

#app.dm-nav-panel .server-exclusive {
    display: none;
}

#app:not(.dm-nav-panel) #server-nav-panel #channel-list .channel {
}

.dm-nav-panel #server-nav-panel #channel-list .channel {
}

#app:not(.dm-nav-panel) #server-nav-panel #channel-list .channel .avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
	filter: invert(100%);
	opacity: 0.5;
}

.dm-nav-panel #server-nav-panel #channel-list .channel .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    margin-left: 5px;
}

#app.dm-nav-panel .global-topbar .global-title img#global-title-img {
    height: 12px !important;
	border-radius: 0px !important;
}

#server-nav-content {
    padding: 10px;
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #202225 #2f3136;
}

#server-nav-content::-webkit-scrollbar {
    width: 6px;
}

.search {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 10px;
}

.channel {
    display: flex;
    align-items: center;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    margin-bottom: 2px;
	padding: 5px;
	color: #aaa;
}

.channel:hover,
.channel.active {
    background-color: #40444b;
}

.channel .user-info .channel-name {
    font-size: 14px;
}

.user-bar {
    background-color: #292b2f;
    padding: 10px;
    display: flex;
    align-items: center;
    border-top: 1px solid #444;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details .username {
    font-weight: bold;
    font-size: 13px;
}

.user-details .status {
    font-size: 11px;
    color: #aaa;
}

.server-user {
    display: flex;
    align-items: center;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    margin-bottom: 2px;
	padding: 5px;
	color: #aaa;
}

.server-user:hover {
    background-color: #40444b;
}

.server-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

#topbar {
    grid-area: topbar;
    background-color: #2f3136;
    padding: 10px 0px 10px 0px;
    border-bottom: 1px solid #444;
}

#topbar-content {
    display: flex;
    align-items: center;
    font-weight: bold;
    gap: 8px; 
}

#topbar-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
	margin-left: 10px;
}

#app:not(.dm-nav-panel) #topbar-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
	margin-left: 10px;
    filter: invert(100%);
	opacity: 0.5;
}

#topbar-title {
    font-weight: normal; 
	font-size: 16px;
}

.main {
    grid-area: chat;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
	position: relative;
}

.chat-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#chat-messages {
    font-size: 14px;
    padding: 10px;
    overflow-y: scroll;
    height: calc(100vh - 135px);
    align-content: end;
	padding-bottom: 20px;
}

.chat-message {
    margin-top: 15px;
	margin-bottom: 5px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.message-text {
    white-space: break-spaces;
}

.message-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

#chat-input-wrapper {
	position: absolute;
	bottom: 0;
	width: 100%;
    padding: 10px;
    background-color: #40444b;
    border-top: 1px solid #444;
	height: 53px !important;
}

#chat-typing-status {
    position: absolute;
    bottom: 57px;
    left: 7px;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
    white-space: nowrap;
}

#chat-input-wrapper #chat-message-input {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 4px;
    background-color: #2f3136;
    color: white;
    outline: none;
    caret-color: white;
}

.right-panel {
    grid-area: right-panel;
    background-color: #393a41;
    padding: 10px;
    border-left: 1px solid #444;
	overflow-y: auto;
}

.right-panel .profile-banner {
    height: 90px;
    overflow: hidden;
    border-radius: 10px 10px 0px 0px;
}

.right-panel .profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-card {
    background-color: #2c2d32;
    border-radius: 0px 0px 10px 10px;
    padding: 15px;
}

.user-card .username {
    font-weight: bold;
    font-size: 16px;
}

.user-card .status {
    color: #43b581;
    font-size: 12px;
    margin-top: 5px;
}

.user-card .about {
    font-size: 12px;
    margin-top: 10px;
    color: #aaa;
    white-space: break-spaces;
}
