body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: #121018;
    color: #fff;
    overscroll-behavior: none;
}

#app {
    display: flex;
    height: 100vh;
}

p {
    margin: 0;
}

.sidebar {
    width: 25%;
    background-color: #121018;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: none;
    z-index: 2;
    transition: 0.1s box-shadow;
}

.sidebar-header.scrolled {
    box-shadow: 0 1px #0c0917 !important;
}

.logo {
    font-family: 'Climate Crisis', monospace;
    font-size: 24px;
    line-height: 1;
    user-select: none;
}

.conversations-list {
    flex-grow: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 8px 6px;
    margin: 2px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.conversation-item:hover {
    background: #17151d;
}

.conversation-username {
    vertical-align: middle;
    width: 100%;
}

.main-panel {
    width: 75%;
    display: flex;
    flex-direction: column;
}

.main-header {
    padding: 8px;
    background: #191623;
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    border-radius: 20px 0 0 0;
    z-index: 2;
    transition: 0.1s box-shadow;
}

.main-header.scrolled {
    box-shadow: 0 1px #100f17 !important;
}

.messages-list {
    flex-grow: 1;
    padding: 0;
    overflow-y: auto;
    background-color: #191623;
}

#recipientTextarea {
    flex-grow: 1;
    resize: none;
    height: 16px;
    padding: 8px 0;
    background: #262330;
    color: #fff;
    border: none;
    border-radius: 16px;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1;
    margin-left: -32px;
    padding-left: 32px;
}

#recipientTextarea:disabled {
    background: none;
    color: #fff;
}

.message-input {
    display: flex;
    height: 32px;
    padding: 8px;
    box-shadow: none;
    background: #191623;
    border-radius: 0 0 0 20px;
    transition: 0.1s box-shadow;
}

.message-input.scrolled-to-bottom {
    box-shadow: 0 -1px #110f17 !important;
}

#messageTextarea {
    flex-grow: 1;
    resize: none;
    height: 16px;
    padding: 8px 0;
    background: none;
    color: #fff;
    border: none;
    outline: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1;
}

.message-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 6px;
    border-radius: 8px;
    margin: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #fff;
    overflow-wrap: break-word;
}

.message-item:hover {
    background: #ffffff05;
}

.message-sender {
    color: #ffffff50;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: default;
}

.message-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    /* line-height: 1; */
    padding: 0;
    /* display: flex; */
    /* flex-wrap: wrap; */
    /* align-content: center; */
}

.icon-button {
    background: #ffffff10;
    color: #fff;
    border: none;
    border-radius: 16px;
    color: inherit;
    cursor: pointer;
    height: 32px;
    width: 32px;
    padding: 4px;
    user-select: none;
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    justify-content: center;
}

#sendMessageBtn {
    color: #fff;
    background: #6952b5;
    border-radius: 20px;
    margin-left: 8px;
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    justify-content: center;
}

#emojiBtn {
    color: #fff;
    background: none;
    border-radius: 4px;
}

#toolsBtn {
    color: #fff;
    background: none;
    border-radius: 4px;
    font-variation-settings: 'FILL' 1, 'wght' 800, 'GRAD' 200, 'opsz' 20;
    font-size: 16px;
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    justify-content: center;
}

#user {
    color: #fff;
    background: none;
    border-radius: 4px;
    font-variation-settings: 'FILL' 1, 'wght' 800, 'GRAD' 200, 'opsz' 20;
    font-size: 16px;
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    justify-content: center;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #121018e8;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    background: #191623;
    padding: 0;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 0 1px #100f17;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: none;
}
::-webkit-scrollbar-thumb {
    background: #ffffff30;
    border: 2px solid #191623;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6952b5;
    border: 2px solid #191623;
}
::-webkit-scrollbar-corner {
    background: none;
}
.conversations-list::-webkit-scrollbar-thumb {
    border: 2px solid #121018;
    border-radius: 8px;
}
.conversations-list::-webkit-scrollbar-thumb:hover {
    background: #6952b5;
    border: 2px solid #121018;
}
#messageTextarea::-webkit-scrollbar-track, #recipientTextarea::-webkit-scrollbar-track {
    cursor: default;
}
#messageTextarea::-webkit-scrollbar-thumb, #recipientTextarea::-webkit-scrollbar-thumb {
    border: 2px solid #262330;
    border-radius: 8px;
    cursor: default;
}
#messageTextarea::-webkit-scrollbar-thumb:hover, #recipientTextarea::-webkit-scrollbar-thumb:hover {
    background: #6952b5;
    border: 2px solid #262330;
    cursor: default;
}
.emoji-chooser::-webkit-scrollbar, .tools-chooser::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    
}
.emoji-chooser::-webkit-scrollbar-track, .tools-chooser::-webkit-scrollbar-track {
    background: none;
    margin-top: 16px;
}
.emoji-chooser::-webkit-scrollbar-thumb, .tools-chooser::-webkit-scrollbar-thumb {
    border: 2px solid #262330;
    border-radius: 8px;
    margin-top: 16px;
}
.emoji-chooser::-webkit-scrollbar-thumb:hover, .tools-chooser::-webkit-scrollbar-thumb:hover {
    background: #6952b5;
    border: 2px solid #262330;
}

.emoji-chooser {
    position: absolute;
    background: #262330;
    border: 1px solid #100f17;
    border-radius: 16px 16px 0 0;
    bottom: 48px;
    padding: 8px;
    z-index: 1000;
    width: 264px;
    height: 192px;
    right: 48px;
    overflow: auto;
}

.emoji-header {
    color: #939297;
    padding: 2px 4px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    align-content: center;
    user-select: none;
    font-size: 12px;
}

.emoji-class {
    flex-grow: 1;
    padding: 0 8px;
}

.emoji-header span.material-symbols-rounded {
    font-size: 20px;
}

.emoji-section {
    display: none; /* Hide sections by default */
    flex-wrap: wrap;
    margin: 4px 0;
}

.emoji {
    cursor: pointer;
    margin: 0px;
    font-size: 10px;
    color: #fff;
    line-height: 1;
    width: 16px;
    height: 16px;
}

#messageBar {
    flex-grow: 1;
    display: flex;
    background: #262330;
    border-radius: 16px;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
}

#recipientBar {
    flex-grow: 1;
    display: flex;
    background: none;
    border-radius: 16px;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
}

#sendMessageBtn span.material-symbols-rounded, #signOutBtn span.material-symbols-rounded, #newConvoBtn span.material-symbols-rounded, #toolsBtn span.material-symbols-rounded, #recipientBar span.material-symbols-rounded {
    font-size: 20px;
    font-variation-settings: 'FILL' 1, 'wght' 800, 'GRAD' 200, 'opsz' 20;
}

.fav-emojis-blank, .recent-emojis-blank {
    font-size: 14px;
    text-align: center;
    color: #939297;
    margin: 8px 8px;
    flex-grow: 1;
}

#recipientBar span.material-symbols-rounded {
    color: #fff;
    padding: 6px;
    z-index: 6;
    cursor: default;
}

.tools-chooser {
    position: absolute;
    background: #262330;
    border: 1px solid #100f17;
    border-radius: 16px 16px 0 0;
    bottom: 48px;
    padding: 8px 0 8px 8px;
    z-index: 1000;
    width: 240px;
    height: 192px;
    overflow: auto;
}

.tools-header {
    color: #939297;
    padding: 2px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    font-size: 14px;
}

.tools-class {
    flex-grow: 1;
    padding: 0 8px;
}

span.material-symbols-rounded.tool {
    color: #fff;
    background: #ffffff20;
    border-radius: 8px;
    padding: 8px;
    font-size: 24px;
    cursor: default;
}

.unavailable {
    opacity: 0.25;
}

.tools-section {
    display: flex;
    flex-wrap: wrap;
    margin: 4px 0;
    gap: 8px;
}

.tools-header .material-symbols-rounded {
    font-size: 20px;
}

.emoji-section .emoji {
    width: 24px !important;
    height: 24px !important;
    padding: 4px;
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.context-menu {
    position: absolute;
    background: #181521;
    border: 0 solid #0c0917;
    box-shadow: 0 0 8px #00000050;
    border-radius: 8px;
    padding: 2px;
    z-index: 1000;
    display: none;
    width: 188px;
}

.context-menu-item {
    padding: 8px 8px;
    cursor: pointer;
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    align-content: center;
}

.context-menu-item:hover {
    background: #1d1a25;
}

.context-menu-item.sign-out {
    color: tomato;
}

.context-menu-item.sign-out:hover {
    background: tomato !important;
    color: #181521;
}

.settings-container {
    display: flex;
    margin: 0;
    margin-right: 8px;
}

.settings-tabs {
    width: 160px;
    padding: 0 8px;
    height: 210px;
    overflow: auto;
    border-radius: 0 0 0 20px;
}

.tab-button {
    background: none;
    border: none;
    border-radius: 32px;
    padding: 2px 8px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    height: 32px;
}

.tab-button.active {
    background-color: #6952b5;
}

.tab-button:last-child {
    margin-bottom: 8px;
}

.tab-button>span.material-symbols-rounded {
    margin-right: 8px;
    font-variation-settings: 'FILL' 1, 'wght' 200, 'GRAD' 200, 'opsz' 24;
}

.settings-content {
    padding: 8px;
    flex-grow: 1;
    width: 240px;
    background: #262330;
    border-radius: 16px;
    overflow: auto;
    margin-bottom: 8px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.context-menu-item span.material-symbols-rounded {
    padding-right: 4px;
}

.chat-image, .chat-video {
    width: 384px !important;
    max-height: 50vh;
    max-width: fit-content;
    border-radius: 8px;
    margin-top: 8px;
}

.chat-audio {
    background: #f1f3f4;
    border-radius: 8px;
    width: 384px;
    height: 216px;
    margin-top: 8px;
    /* filter: invert(1) hue-rotate(300deg) brightness(1.25) saturate(0); */
}

iframe.embed {
    width: 384px;
    height: 216px;
    border: none;
    border-radius: 8px;
    margin-top: 8px;
}

.media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #262330;
    border-radius: 8px;
    background-color: #191623;
    margin-top: 8px;
    width: 384px;
    height: 216px;
}

.media-icon {
    font-size: 24px !important;
    margin-bottom: 4px;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 200, 'opsz' 48;
}

.load-media-button {
    background: none;
    color: white;
    border: none;
    border-radius: 4px;
    /* padding: 8px 16px; */
    width: 100%;
    height: 100%;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}

.load-media-button:hover {
    background-color: #262330;
}

.new-messages-button {
    background-color: #6952b5;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    margin: 8px 0;
    width: 100%;
}

.new-messages-button:hover {
    background-color: #5a3f8c;
}

.placeholder {
    text-align: center;
    color: #ffffff50;
    padding: 20px;
    font-size: 18px;
}
.placeholder span {
    font-size: 48px;
    display: block;
}

.profile-pic {
    width: 32px; /* Adjust size as needed */
    height: 32px; /* Adjust size as needed */
    border-radius: 50%; /* Make it circular */
    margin-right: 8px; /* Space between image and text */
    vertical-align: middle; /* Align with text */
}

.text-container {
    display: flex;
    flex-direction: column;
    margin-left: 8px; /* Space between profile picture and text */
}

.conversation-item:first-child, .message-item:first-child {
    margin-top: 2px;
}

.message-sender>img.emoji {
    width: 12px;
    margin-top: -6px;
    margin-bottom: -4px;
    vertical-align: middle;
}

.conversation-username>img.emoji {
    vertical-align: middle;
    margin-top: -6px;
    margin-bottom: -2px;
}

.message-text>.emoji {
    padding: 0 2px;
    vertical-align: middle;
    margin-top: -6px;
    margin-bottom: -2px;
}

#accountOption {
    display: flex;
    justify-content: center;
    height: 64px;
}
#usernameDisplay {
    width: 100%;
    text-align: center;
}
#accountOption>img#profilePic {
    margin-right: 0;
    margin-bottom: 4px;
}

.profile-card {
    margin: 20px 0;
    color: #939298;
    position: absolute;
    width: 256px;
}

.profile-card-details {
    /* margin: 0; */
    padding-top: 166px;
    color: #939298;
    /* height: 256px; */
    background-image: linear-gradient(0deg, #191623, #191623, #191623, transparent, transparent, transparent);
    z-index: 2;
    position: relative;
    text-align: left;
}

.profile-card-subhead {
    font-size: 12px;
    font-weight: 500;
    padding: 0 16px;
}

.profile-detail {
    padding: 0 16px;
}

.profile-card>#profilePicModal {
    margin: 0;
    width: 64px;
    height: 64px;
    transform: translate(0, 50%);
}

#usernameDisplayModal {
    color: #fff;
    margin: 48px 0 0 0;
    padding: 0;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 8px;
}

.modal-head>h2 {
    margin: 0 8px;
    font-size: 16px;
    padding: 0;
}

#profileModal {
    display: none; /* Hidden by default */
}

#profileModal>.modal-content {
    width: 256px;
    height: 256px;
    overflow: auto;
}

#closeProfileModal, #closeSettingsBtn {
    background-color: #272431;
    color: white;
    border: none;
    border-radius: 32px;
    padding: 4px;
    cursor: pointer;
    height: 32px;
    width: 32px;
    user-select: none;
}

#settingsModal>.modal-content>.modal-head {
    justify-content: space-between;
}

hr {
    margin: 2px 8px;
    border: 1px solid #262330;
}