#private_chat_module {}

#private_chat_module #private_chat_open {
    position: fixed;
    right: 20px;
    bottom: 20px;
    height: 50px;
    width: 50px;
    background: linear-gradient(135deg, #2a2a2a 0%, #404040 100%);
    text-align: center;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#private_chat_module #private_chat_open:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#private_chat_module #private_chat_open i {
    font-size: 20px;
}

#private_chat_module #private_chat_open .unread {
    position: absolute;
    right: -5px;
    top: -5px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 50%;
    font-size: 11px;
    line-height: 22px;
    font-weight: 600;
    border: 2px solid #1a1a1a;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#private_chat_module .room_chat {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    z-index: 3;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    overflow: hidden;
    display: flex;
    border: 1px solid #40404061;
    backdrop-filter: blur(10px);
}

#private_chat_module .room_chat .chat_list {
    border-right: 1px solid #40404061;
    overflow-y: auto;
    overflow-x: hidden;
    width: 250px;
    height: 450px;
    background: linear-gradient(180deg, #1a1a1a 0%, #222222 100%);
}

#private_chat_module .room_chat .chat_list h5 {
    line-height: 50px;
    height: 50px;
    border-bottom: 1px solid #40404061;
    width: 100%;
    font-weight: 600;
    position: relative;
    color: #ffffff;
    font-size: 16px;
    display: flex;
    padding: 0 15px;
}

#private_chat_module .room_chat .chat_list h5 p {
    cursor: pointer;
}


#private_chat_module .room_chat .chat_list::-webkit-scrollbar {
    width: 6px;
}

#private_chat_module .room_chat .chat_list::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#private_chat_module .room_chat .chat_list::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 3px;
}

#private_chat_module .room_chat .chat_list::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

#private_chat_module .room_chat .chat_list .chat_module {
    height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
}

#private_chat_module .room_chat .chat_list ul {
    width: 100%;
    padding: 0;
    margin: 0;
}

#private_chat_module .room_chat .chat_list ul li {
    padding: 12px 15px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 1px solid #2a2a2a;
    margin: 0;
}

#private_chat_module .room_chat .chat_list ul li:hover {
    background: rgba(255, 255, 255, 0.05);
}

#private_chat_module .room_chat .chat_list ul li.unread {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
}

#private_chat_module .room_chat .chat_list ul li.active {
    background: linear-gradient(135deg, rgba(64, 64, 64, 0.3) 0%, rgba(85, 85, 85, 0.3) 100%);
    border-left: 3px solid #555555;
}

#private_chat_module .room_chat .chat_list ul li .avatar {
    float: left;
    position: relative;
    margin-right: 12px;
}

#private_chat_module .room_chat .chat_list ul li .avatar .user_profile_div {
    height: 45px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    border: 2px solid #404040;
    transition: all 0.3s ease;
}

#private_chat_module .room_chat .chat_list ul li .avatar .user_profile_div:hover {
    border-color: #555555;
    transform: scale(1.05);
}

#private_chat_module .room_chat .chat_list ul li .avatar .user_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#private_chat_module .room_chat .chat_list ul li .avatar .online {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
}

#private_chat_module .room_chat .chat_list ul li .avatar .online.on {
    background: #4caf50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

#private_chat_module .room_chat .chat_list ul li .avatar .online.off {
    background: #9e9e9e;
}

#private_chat_module .room_chat .chat_list ul li .detail {
    float: left;
    margin-left: 0;
    font-size: 13px;
    width: calc(100% - 70px);
}

#private_chat_module .room_chat .chat_list ul li .detail .name {
    font-size: 15px;
    margin-bottom: 4px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

#private_chat_module .room_chat .chat_list ul li .detail .last_text {
    color: #b0b0b0;
    line-height: 1.3;
    font-size: 12px;
}

#private_chat_module .room_chat .chat_list ul li .detail .last_text span {
    color: #888888;
    font-weight: 400;
    font-size: 11px;
}

#private_chat_module .room_chat .chat_content {
    width: 480px;
    position: relative;
    background: linear-gradient(180deg, #1a1a1a 0%, #222222 100%);
}

#private_chat_module .room_chat .chat_content h5 {
    height: 50px;
    line-height: 50px;
    padding: 0 15px;
    border-bottom: 1px solid #40404061;
    font-weight: 600;
    position: relative;
    color: #ffffff;
    font-size: 16px;
}

#private_chat_module .room_chat .chat_content h5 .name {
    float: left;
    font-weight: 600;
}

#private_chat_module .room_chat .chat_content h5 .name a {
    color: var(--cms-url-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

#private_chat_module .room_chat .chat_content h5 .name a:hover {
    color: #888888;
}

#private_chat_module .room_chat .chat_content h5 .control {
    position: absolute;
    right: 15px;
    top: 50%;
    font-weight: 600;
    font-size: 14px;
    color: #b0b0b0;
    cursor: pointer;
    transform: translate(0, -50%);
    display: flex;
    gap: 8px;
}

#private_chat_module .room_chat .chat_content h5 .control p {
    height: 28px;
    border: 1px solid #404040;
    color: #b0b0b0;
    width: 28px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 0;
    font-size: 12px;
    position: relative;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

#private_chat_module .room_chat .chat_content h5 .control p:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #555555;
    color: #ffffff;
}

#private_chat_module .room_chat .chat_content h5 .control p i {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

#private_chat_module .room_chat .chat_content h5 .control p.active {
    background: linear-gradient(135deg, #404040 0%, #555555 100%);
    color: #ffffff;
    border-color: #555555;
}

#private_chat_module .room_chat .chat_content .chat_module_div.chat {
    position: relative;
    height: calc(100% - 50px);
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text {
    height: 325px;
    padding: 0 15px;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--white-color);
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text::-webkit-scrollbar {
    width: 6px;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 3px;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div {padding: 15px 0;display: flex;flex-direction: column;gap: 10px;}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div li {
    margin: 0;
    list-style: none;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .avatar {
    float: left;
    height: 40px;
    width: 40px;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #404040;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .avatar .user_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .me .avatar {
    display: none;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .detail {
    max-width: calc(100% - 60px);
    position: relative;
    float: left;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .me .detail {
    float: right;
    text-align: right;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .text {
    border-radius: 18px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #2a2a2a 0%, #333333 100%);
    color: #ffffff;
    line-height: 1.4;
    font-size: 14px;
    border: 1px solid #404040;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    word-wrap: break-word;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .me .text {
    background: linear-gradient(135deg, #404040 0%, #555555 100%);
    border-color: #555555;
    border-radius: 18px 18px 4px 18px;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .text .time {
    color: #888888;
    font-size: 11px;
    position: absolute;
    top: 50%;
    font-weight: 400;
    transform: translate(0,-50%);
    right: -35px;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .me .text .time {
    left: -35px;
    right: auto;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .text .chat_image img {
    max-height: 120px;
    vertical-align: middle;
    border-radius: 10px;
    margin: 8px 0;
    cursor: pointer;
    border: 1px solid #404040;
    transition: transform 0.3s ease;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .text .chat_image img:hover {
    transform: scale(1.02);
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .text .emoji {
    max-height: 80px;
    vertical-align: middle;
    border-radius: 8px;
    margin: 5px 0;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .text a {
    color: #888888;
    font-weight: 600;
    text-decoration: none;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_text .chat_div .text a:hover {
    color: #aaaaaa;
    text-decoration: underline;
}

#private_chat_module .room_chat .chat_add {
    display: flex;
    background: linear-gradient(135deg, #2a2a2a 0%, #333333 100%);
    border-radius: 25px;
    border: 1px solid #404040;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin: 12px 15px;
}

#private_chat_module .room_chat .chat_add input {
    line-height: 46px;
    border: none;
    height: 46px;
    border-radius: 0;
    flex: 1;
    padding: 0 20px;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    outline: none;
}

#private_chat_module .room_chat .chat_add input::placeholder {
    color: #888888;
}

#private_chat_module .room_chat .chat_icon {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 15px;
}

#private_chat_module .room_chat .chat_icon .chat_icon_item {
    font-size: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #b0b0b0;
}

#private_chat_module .room_chat .chat_icon .chat_icon_item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: scale(1.1);
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_loading {
    height: 100%;
    text-align: center;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 2;
    background: rgba(26, 26, 26, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

#private_chat_module .room_chat .chat_content .chat_module_div .chat_loading img {
    height: 80px;
    opacity: 0.7;
}

/* Responsive design */
@media (max-width: 799px) {
    #private_chat_module .room_chat {
    width: 100%;
    left: 0;
    bottom: 0;
    }
    
    #private_chat_module .room_chat .chat_list {
        width: 200px;
    }
    
    #private_chat_module .room_chat .chat_content {
        width: calc(100% - 200px);
    }
    #private_chat_module .room_chat {
        flex-direction: column;
        height: 80vh;
        border-radius: 0;
    }
    
    #private_chat_module .room_chat .chat_list {
        width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid #404040;
    }
    
    #private_chat_module .room_chat .chat_content {
        width: 100%;
        height: 50vh;
    }
    
    #private_chat_module .room_chat .chat_content .chat_module_div.chat {
    height: 40vh;
    }
    
    #private_chat_module .room_chat .chat_content .chat_module_div .chat_text {
        height: calc(100% - 50px);
    }
}
