:root {
    --color-bg-darkest: rgb(23, 23, 23);
    --color-bg-darker: rgb(212, 212, 212);
    --color-bg-dark: rgb(229, 229, 229);
    --color-bg-light: rgb(245, 245, 245);
    --color-bg-lightest: rgb(250, 250, 250);
    --color-border-default: rgb(229, 229, 229);
}

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

body {
    display: flex;
    width: 100vw;
    height: 100vh;
    font-family: Arial, sans-serif;
}

nav {
    display: flex;
    flex-direction: column;
    width: 15%;
    height: 100%;
    background-color: var(--color-bg-lightest);
    border-right: 1px solid var(--color-border-default);
}

.nav-header {
    height: 7%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid var(--color-border-default);
}

.search-box {
    width: 90%;
    height: 70%;
    background-color: var(--color-bg-dark);
    border-radius: 5px;
}

.user-list {
    height: 93%;
    width: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-item {
    display: flex;
    align-items: center;
    width: 90%;
    height: 64px;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--color-bg-darker);
    border-radius: 50%;
    flex-shrink: 0;
}

.user-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    height: 32px;
    flex: 1;
}

.user-info {
    display: flex;
    justify-content: space-between;
    flex: 1;
    height: 40px;
    width: 100%;
}

.user-info .left {
    width: 60%;
    height: 16px;
    background-color: var(--color-bg-dark);
    border-radius: 4px;
}

.user-info .right {
    width: 20%;
    height: 12px;
    background-color: var(--color-bg-dark);
    border-radius: 4px;
}

.user-status {
    width: 100%;
    height: 12px;
    background-color: var(--color-bg-dark);
    border-radius: 4px;
}

main {
    display: flex;
    flex-direction: column;
    width: 85%;
    height: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 7%;
    padding: 0 2%;
    border-bottom: 1px solid var(--color-border-default);
    background-color: white;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-avatar {
    width: 45px;
    height: 45px;
    background-color: var(--color-bg-darker);
    border-radius: 50%;
}

.header-name {
    width: 120px;
    height: 40%;
    background-color: var(--color-bg-dark);
    border-radius: 4px;
}

.header-right {
    display: flex;
    gap: 15px;
}

.header-icon {
    width: 32px;
    height: 32px;
    background-color: var(--color-bg-dark);
    border-radius: 3px;
}

.chat-area {
    height: 85%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #fff;
    overflow-y: auto;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    width: fit-content;
}

.message.received {
    align-self: flex-start;
}

.message.received .message-bubble {
    background-color: var(--color-bg-light);
    border-radius: 0 15px 15px 15px;
}

.message.received .message-line {
    background-color: var(--color-bg-dark);
}

.message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.sent .message-bubble {
    background-color: var(--color-bg-darkest);
    border-radius: 15px 0px 15px 15px;
}

.message.sent .message-line {
    background-color: rgb(64 64 64);
}

.message-avatar {
    width: 35px;
    height: 35px;
    background-color: var(--color-bg-dark);
    border-radius: 50%;
    flex-shrink: 0;
}

.message-content {
    display: flex;
    flex-direction: column;
}

.message-bubble {
    padding: 12px 16px;
    min-width: 120px;
}

.message-line {
    height: 12px;
    border-radius: 2px;
    margin-bottom: 8px;
    width: 180px;
}

.message-line:last-child {
    margin-bottom: 0;
}

.message-line.short {
    width: 100px;
}

.input-area {
    height: 8%;
    padding: 0 2%;
    display: flex;
    align-items: center;
    gap: 2%;
    border-top: 1px solid var(--color-border-default);
}

.input-icon {
    width: 40px;
    height: 40px;
    background-color: var(--color-bg-dark);
    border-radius: 5px;
    flex-shrink: 0;
}

.input-box {
    flex: 1;
    height: 60%;
    background-color: var(--color-bg-light);
    border-radius: 30px;
}

.send-button {
    width: 40px;
    height: 40px;
    background-color: var(--color-bg-darkest);
    border-radius: 50%;
    flex-shrink: 0;
}