
#chat-system-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

#chat-toggle-button {
    background: #2c3e50;
    color: white;
    padding: 12px 18px;
    border-radius: 25px;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

#chat-toggle-button:hover {
    background: #1a2530;
    transform: translateY(-2px);
}

.chat-icon {
    font-size: 18px;
}

.chat-text {
    font-weight: 500;
}

#chat-window {
    width: 350px;
    height: 450px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.chat-header {
    background: #2c3e50;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
}

.close-chat {
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    position: relative;
}

.user-message {
    background: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.admin-message {
    background: #f1f0f0;
    border-bottom-left-radius: 5px;
}

.system-message {
    background: #fff8e1;
    text-align: center;
    margin: 0 auto 15px auto;
    max-width: 90%;
}

.message p {
    margin: 0 0 5px 0;
    word-break: break-word;
}

.message-time {
    font-size: 11px;
    color: #999;
    display: block;
    text-align: right;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    background: white;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#chat-message-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    height: 50px;
    font-size: 14px;
}

#send-message-btn {
    margin-left: 10px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

#send-message-btn:hover {
    background: #1a2530;
}

/* 管理界面样式 */
#chat-admin-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.conversations-list {
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background: white;
}

.conversations-list h2 {
    margin-top: 0;
}

.conversation-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: #f5f5f5;
}

.conversation-item.active {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.conversation-user {
    font-weight: 500;
    margin-bottom: 5px;
}

.conversation-time {
    font-size: 12px;
    color: #666;
}

.unread-badge {
    background: #ff4757;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 12px;
    margin-left: 5px;
}

.conversation-detail {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    display: flex;
    flex-direction: column;
}

#no-conversation-selected {
    padding: 40px;
    text-align: center;
    color: #666;
}

#conversation-chat {
    display: flex;
    flex-direction: column;
    height: 600px;
}

#admin-chat-messages {
    flex: 1;
    padding: 20px;
}

#admin-message-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    height: 50px;
    margin-right: 10px;
}

#admin-send-btn {
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0 20px;
    height: 50px;
    cursor: pointer;
}