/* style.css */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* 登录容器 */
.login-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}
.login-container h2 { margin-top: 0; }
.login-container input {
    width: 80%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.login-container button {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}
.login-container button:hover { background-color: #0056b3; }

/* 聊天容器 */
.chat-container {
    width: 400px;
    height: 600px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}
.chat-header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    text-align: center;
}
.chat-header h2 { margin: 0; font-size: 1.2em; }
.chat-header span { font-size: 0.9em; opacity: 0.9; }

.chat-box {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
    clear: both;
}
.message-sender {
    font-weight: bold;
    font-size: 0.8em;
    color: #555;
    margin-bottom: 5px;
}
.message-time {
    font-weight: normal;
    color: #999;
    margin-left: 10px;
}
.message-content {
    padding: 10px;
    border-radius: 10px;
    word-wrap: break-word;
}

.user-message {
    float: right;
    margin-left: auto;
    text-align: right;
}
.user-message .message-content {
    background-color: #007bff;
    color: white;
}

.support-message {
    float: left;
    margin-right: auto;
}
.support-message .message-content {
    background-color: #e9e9eb;
    color: #333;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
}
.chat-input input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    margin-right: 10px;
}
.chat-input button {
    border: none;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
}
.chat-input button:hover { background-color: #0056b3; }

/* 客服界面 */
.support-container {
    display: flex;
    width: 90vw;
    height: 80vh;
    max-width: 1000px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.user-list-panel {
    width: 250px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
}
.user-list-panel h3 {
    margin: 0;
    padding: 20px;
    border-bottom: 1px solid #eee;
}
#user-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}
#user-list li {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
#user-list li:hover { background-color: #f9f9f9; }
#user-list li.active { background-color: #007bff; color: white; }

.chat-panel {
    flex-grow: 1;
}
.chat-panel .chat-container {
    width: 100%;
    height: 100%;
    box-shadow: none;
    border-radius: 0;
}
/* style.css 新增样式 */
.chat-input {
    align-items: center;
}
#attach-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #555;
    padding: 0 10px;
}
#attach-btn:hover {
    color: #007bff;
}

.message-content img.chat-image,
.message-content video.chat-video {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 5px;
}
