* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #1e1e1e;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.app-container {
    width: 100%;
    height: 100%;
    background-color: #0f4ca3;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    height: 60px;
    background-color: #0f4ca3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 15px;
    flex-shrink: 0;
}

.back-button {
    position: absolute;
    left: 15px;
    background-color: #1c5fc4;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.back-icon {
    width: 20px;
    height: 2px;
    background-color: #0f4ca3;
    position: relative;
}

.back-icon::before, .back-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 10px;
    height: 2px;
    background-color: #0f4ca3;
    transform-origin: left center;
}

.back-icon::before {
    transform: rotate(-45deg);
    top: 0;
}

.back-icon::after {
    transform: rotate(45deg);
    bottom: 0;
}

.header-title-box {
    border: 2px solid #ffffff;
    border-radius: 20px;
    padding: 6px 90px;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}

.main-content {
    display: flex;
    flex: 1;
    background-color: #cce0ff;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    background-color: #5575ba;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #ffffff;
    flex-shrink: 0;
}

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

.contact-item {
    display: flex;
    align-items: center;
    padding: 14px 15px;
    border-bottom: 1px solid #ffffff;
    color: #ffffff;
    font-weight: bold;
    font-size: 17px;
    cursor: pointer;
    position: relative;
}

.contact-item.active {
    background-color: #6a89cc;
}

.contact-item.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15px;
    bottom: 15px;
    width: 6px;
    background-color: #0f4ca3;
    border-radius: 4px 0 0 4px;
}

.avatar {
    width: 38px;
    height: 38px;
    background-color: #ffffff;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background-color: #5575ba;
    border-radius: 50%;
}

.avatar::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 18px;
    background-color: #5575ba;
    border-radius: 50%;
}

.contact-item.active .avatar::before,
.contact-item.active .avatar::after {
    background-color: #6a89cc;
}

.chat-header .avatar::before,
.chat-header .avatar::after {
    background-color: #92b0ea;
}

.sidebar-footer {
    height: 85px;
    background-color: #92b0ea;
    border-top: 2px solid #ffffff;
    display: flex;
    align-items: center;
    padding-left: 20px;
    flex-shrink: 0;
}

.icon-menu-bars {
    width: 36px;
    height: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.icon-menu-bars span {
    display: block;
    height: 5px;
    background-color: #1a1a1a;
    border-radius: 2px;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #cce0ff;
    overflow: hidden;
}

.chat-header {
    height: 50px;
    background-color: #92b0ea;
    border-bottom: 2px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #ffffff;
    font-weight: bold;
    font-size: 19px;
    flex-shrink: 0;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.msg-container {
    display: flex;
    width: 100%;
}

.msg-container.received {
    justify-content: flex-start;
}

.msg-container.sent {
    justify-content: flex-end;
}

.msg-bubble {
    max-width: 60%;
    padding: 12px 35px 12px 24px;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    border-radius: 16px;
    word-wrap: break-word;
    position: relative;
    display: flex;
    align-items: center;
}

.msg-container.received .msg-bubble {
    background-color: #3b71ca;
    border-bottom-left-radius: 2px;
}

.msg-container.sent .msg-bubble {
    background-color: #54b4d3;
    border-bottom-right-radius: 2px;
}

.msg-arrow {
    position: absolute;
    right: 10px;
    top: 14px;
    width: 14px;
    height: 14px;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.msg-arrow::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    width: 6px;
    height: 6px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
}

.msg-bubble:hover .msg-arrow {
    opacity: 1;
}

.msg-dropdown {
    display: none;
    position: absolute;
    top: 35px;
    right: 10px;
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    overflow: hidden;
    min-width: 110px;
}

.msg-dropdown.show {
    display: block;
}

.msg-dropdown div {
    padding: 10px 14px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    white-space: nowrap;
}

.msg-dropdown div:hover {
    background-color: #f5f5f5;
}

.star-icon {
    font-size: 14px;
    color: #ffd600;
    margin-left: 8px;
}

.chat-input-box {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.input-wrapper {
    flex: 1;
    background-color: #92b0ea;
    border-radius: 20px;
    padding: 10px 20px;
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 17px;
    font-weight: bold;
}

.input-wrapper input::placeholder {
    color: #ffffff;
    opacity: 0.7;
}

.send-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-plane {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 24px;
    border-color: transparent transparent transparent #1a1a1a;
    position: relative;
    transform: rotate(-15deg);
}

.send-plane::after {
    content: '';
    position: absolute;
    top: -12px;
    left: -24px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 12px;
    border-color: transparent transparent transparent #92b0ea;
}
