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

        body {
            background: #f0f2f5;
        }

        .chat-container {
            display: flex;
            height: 70vh;
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
            border-radius: 12px; /* Bo góc cho toàn bộ trang */
            overflow: hidden; /* Đảm bảo nội dung không tràn ra ngoài góc bo */
        }

        .sidebar {
            width: 100%; /* Chiếm toàn màn hình ban đầu */
            overflow: hidden; /* Ngăn thanh cuộn không mong muốn */
            display: block;
            position: relative;
        }

        .sidebar.hidden {
            display: none; /* Ẩn khi chọn người dùng */
        }

        .chat-list-header {
            position: sticky; /* Cố định ở đầu */
            top: 0;
            background: white;
            z-index: 10;
            padding: 15px;
            border-bottom: 1px solid #ddd;
        }

        .chat-list-header .title {
            font-size: 24px;
            font-weight: 700;
            color: #0084ff;
            margin-bottom: 10px;
        }

        .chat-list-header .search-bar {
            position: relative;
            margin-bottom: 10px;
        }

        .chat-list-header .search-bar input {
            width: 100%;
            padding: 10px 10px 10px 35px;
            border: 1px solid #ddd;
            border-radius: 20px;
            outline: none;
            font-size: 14px;
        }

        .chat-list-header .search-bar i {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: #65676b;
            font-size: 16px;
        }

        .chat-list-header .filter-tabs {
            display: flex;
            gap: 15px;
        }

        .chat-list-header .filter-tabs .tab {
            font-size: 14px;
            color: #65676b;
            cursor: pointer;
            padding: 5px 10px;
            border-radius: 15px;
        }

        .chat-list-header .filter-tabs .tab:hover {
            background: #f0f2f5;
        }

        .chat-list-header .filter-tabs .tab.active {
            background: #0084ff;
            color: white;
        }

        .chat-list {
            padding: 10px;
            overflow-y: auto; /* Chỉ danh sách người dùng cuộn */
            max-height: calc(100vh - 110px); /* Trừ chiều cao của chat-list-header */
        }

        .chat-item {
            display: flex;
            align-items: center;
            padding: 10px;
            cursor: pointer;
            border-radius: 8px;
            margin-bottom: 5px;
        }

        .chat-item:hover {
            background: #f0f2f5;
        }

        .chat-item img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 10px;
        }

        .chat-item .chat-info {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .chat-item .name {
            font-weight: 500;
            font-size: 16px;
        }

        .chat-item .message-container {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .chat-item .message {
            color: #65676b;
            font-size: 14px;
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .chat-item .timestamp {
            color: #65676b;
            font-size: 12px;
            white-space: nowrap;
        }

        .main-chat {
            flex: 1;
            display: none; /* Ẩn ban đầu */
            flex-direction: column;
        }

        .main-chat.active {
            display: flex; /* Hiển thị khi được chọn */
            width: 100%; /* Chiếm toàn màn hình */
        }

        .chat-header {
            padding: 15px;
            border-bottom: 1px solid #ddd;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .chat-header .header-left {
            display: flex;
            align-items: center;
            gap: 5px; /* Giảm khoảng cách giữa nút back và user-info */
        }

        .chat-header .back-button {
            font-size: 20px;
            color: #0084ff;
            cursor: pointer;
        }

        .chat-header .back-button:hover {
            color: #0073e6;
        }

        .chat-header .user-info {
            display: flex;
            align-items: center;
        }

        .chat-header img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 8px; /* Giảm margin để sát hơn */
        }

        .chat-header .name {
            font-weight: 500;
            font-size: 18px;
        }

        .chat-header .user-status {
            display: flex;
            flex-direction: column;
        }

        .chat-header .status {
            font-size: 12px;
            color: #65676b;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .chat-header .status::before {
            content: '';
            width: 10px;
            height: 10px;
            background: #31a24c;
            border-radius: 50%;
            display: inline-block;
        }

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

        .chat-header .icons i {
            font-size: 20px;
            color: #0084ff;
            cursor: pointer;
        }

        .chat-header .icons i:hover {
            color: #0073e6;
        }

        .chat-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            position: relative;
        }

        .encryption-notice {
            text-align: center;
            color: #65676b;
            font-size: 14px;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }

        .encryption-notice i {
            font-size: 16px;
        }

        .message {
            margin-bottom: 15px;
            display: flex;
        }

        .message.sent {
            justify-content: flex-end;
        }

        .message.received {
            justify-content: flex-start;
        }

        .message-content {
            max-width: 60%;
            padding: 8px 12px;
            border-radius: 18px;
            font-size: 14px;
        }

        .message.sent .message-content {
            background: #0084ff;
            color: white;
        }

        .message.received .message-content {
            background: #e9e9eb;
            color: #333;
        }

        .chat-input {
            padding: 15px;
            border-top: 1px solid #ddd;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .chat-input .input-icons {
            display: flex;
            gap: 10px;
        }

        .chat-input .input-icons i {
            font-size: 20px;
            color: #0084ff;
            cursor: pointer;
        }

        .chat-input .input-icons i:hover {
            color: #0073e6;
        }

        .chat-input .input-container {
            position: relative;
            flex: 1;
        }

        .chat-input input {
            width: 100%;
            padding: 10px 40px 10px 10px;
            border: 1px solid #ddd;
            border-radius: 20px;
            outline: none;
        }

        .chat-input .emoji-icon {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 20px;
            color: #0084ff;
            cursor: pointer;
        }

        .chat-input .emoji-icon:hover {
            color: #0073e6;
        }

        .chat-input .like-button {
            font-size: 20px;
            color: #0084ff;
            cursor: pointer;
            background: none;
            border: none;
            margin: 0 10px;
        }

        .chat-input .like-button:hover {
            color: #0073e6;
        }

        .chat-input .send-button {
            padding: 10px 20px;
            background: #0084ff;
            color: white;
            border: none;
            border-radius: 20px;
            cursor: pointer;
        }

        .chat-input .send-button:hover {
            background: #0073e6;
        }
        .chat-list-header .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.chat-list-header .header-top .title {
    font-size: 24px;
    font-weight: 700;
    color: #0084ff;
}

.chat-list-header .header-top .avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
