/* 现代化客服系统样式 */
*{margin: 0; padding: 0; box-sizing: border-box;}
.text-center::after{content: ' '; display: inline-block; width: 0; height: 100%; vertical-align: middle; margin-top: 4px;}
body{font-size: 15px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif; min-height: 100vh;}
.clearfix::after{ content:""; display:block; clear:both;}

/* 主容器 */
.service{width: 100%; max-width: 640px; height: 100vh; position: fixed; left: 0; right: 0; top: 0; margin:auto; display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(0,0,0,0.1); background: #fff; animation: slideIn 0.3s ease-out;}
.pc-service{width: 372px; height: 100vh; display: flex; flex-direction: column;}

/* 头部样式 */
.msg-head{height: 60px; background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); border-bottom: 1px solid rgba(255,255,255,0.1); color: #fff; font-size: 17px; text-align: center; position: relative; backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center;}
.msg-head a{width: 40px; height: 40px; position: absolute; left: 15px; text-decoration: none; color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.3s ease;}
.msg-head a:hover{background: rgba(255,255,255,0.2); transform: scale(1.1);}
.msg-head a i{font-size: 20px;}
.msg-head .tha{font-size: 16px; font-weight: 600; margin-bottom: 2px;}
.msg-head .thb{font-size: 12px; opacity: 0.9;}

/* 在线状态指示器 */
.online-status {
    position: absolute;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background-color: #4CAF50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
}

.status-indicator.offline {
    background-color: #f44336;
    box-shadow: 0 0 6px rgba(244, 67, 54, 0.6);
}

.status-indicator.away {
    background-color: #FF9800;
    box-shadow: 0 0 6px rgba(255, 152, 0, 0.6);
}

.status-text {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
}

/* 消息容器 */
.msg-box{flex: 1; background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%); padding: 20px 15px 0; line-height: 1.5; overflow-y: auto; scroll-behavior: smooth;}
.msg-box::-webkit-scrollbar{width: 6px;}
.msg-box::-webkit-scrollbar-track{background: transparent;}
.msg-box::-webkit-scrollbar-thumb{background: rgba(0,0,0,0.2); border-radius: 3px;}
.msg-box::-webkit-scrollbar-thumb:hover{background: rgba(0,0,0,0.3);}

/* 消息样式 */
.msg{margin-bottom: 20px; animation: fadeInUp 0.3s ease-out;}
.msg:last-of-type{margin-bottom: 20px}
.msg .img1{width:40px; height: 40px; float: left; border-radius: 50%; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.1);}
.msg .img2{display: none;}
.msg .img1 img, .msg .img2 img{width: 100%; height: 100%; object-fit: cover;}
.msg .content{max-width: 70%; float: left; border: none; border-radius: 18px; background: #fff; margin: 6px 0 0 12px; padding: 12px 16px; position: relative; text-align: justify; box-shadow: 0 2px 15px rgba(0,0,0,0.1); transition: all 0.3s ease;}
.msg .content:hover{transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.15);}
.content .indicate{width: 0; height: 0; border: 8px solid; border-color: transparent; position: absolute; top: 12px;}
.msg .content .left-indicate{border-right-color: #fff;  left: -14px;}
.msg .content .right-indicate{display: none;}

/* 发送方消息样式 */
.msg.on .img1{display: none;}
.msg.on .img2{float: right; width:40px; height: 40px; display: block; border-radius: 50%; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.1);}
.msg.on .content{float: right; margin: 6px 12px 0 0; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff;}
.msg.on .content .left-indicate{display: none;}
.msg.on .content .right-indicate{border-left-color: #764ba2; right: -14px; display: block;}
.msg-box p{margin-top: -6px}

/* 输入区域 */
.msg-post{height: 60px; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-top: 1px solid rgba(0,0,0,0.1); display: flex; align-items: center; padding: 10px 15px;}
.msg-post textarea{resize: none; font-size: 15px; line-height: 1.4; padding: 8px 50px 8px 15px; flex: 1; border: 2px solid #e9ecef; border-radius: 25px; background: #f8f9fa; transition: all 0.3s ease; font-family: inherit;}
.msg-post textarea:focus{border-color: #667eea; background: #fff; outline: none; box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);}
.msg-post label{position: absolute; right: 75px; bottom: 12px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease;}
.msg-post label:hover{transform: scale(1.1);}
.msg-post label .iconfont{font-size: 24px; color: #667eea;}
.msg-post input[type="file"]{display: none;}
.msg-post input[type="button"]{padding: 8px 20px; font-size: 14px; font-weight: 600; margin-left: 10px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; border-radius: 25px; color: #fff; cursor: pointer; transition: all 0.3s ease;}
.msg-post input[type="button"]:hover{transform: translateY(-2px); box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);}
.msg-post .back{width: 50px; line-height: 36px; text-align: center; background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); border-radius: 25px; color: #fff; text-decoration: none; font-weight: 600; transition: all 0.3s ease;}
.msg-post .back:hover{transform: translateY(-2px); box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);}

/* 文件附件样式 */
.file-attachment {
    display: flex;
    align-items: center;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    margin: 4px 0;
}

.file-attachment i {
    margin-right: 8px;
    color: #667eea;
}

/* 拖拽上传区域 */
.drop-zone {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.drop-zone.active {
    display: flex;
}

.drop-zone-text {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    max-width: 300px;
}

.drop-zone-text i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 16px;
}

.drop-zone-text p {
    margin-bottom: 8px;
    color: #333;
}

.drop-zone-text span {
    color: #666;
    font-size: 12px;
}

.progress-container {
    margin-top: 20px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    padding: 16px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* PC端主布局样式 */
.pc-main {
    width: 100%;
    height: 100vh;
    display: flex;
    background: #f5f5f5;
}

.pc-left {
    width: 372px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.pc-right {
    flex: 1;
    height: 100vh;
    background: #fff;
}

/* PC端服务列表样式 */
.pc-service {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.service-box {
    flex: 1;
    overflow-y: auto;
    background: #fafafa;
}

.user-box {
    padding: 10px 0;
}

.user-list {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.user-list:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.user-list img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid #e9ecef;
}

.user {
    flex: 1;
}

.name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ison {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #e9ecef;
    color: #6c757d;
    font-weight: 400;
}

.last-msg {
    font-size: 13px;
    color: #666;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.time {
    font-size: 11px;
    color: #999;
}

.num {
    min-width: 18px;
    height: 18px;
    background: #ff4757;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* PC端底部控制栏 */
.foot {
    height: 60px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    padding: 0 15px;
    justify-content: space-between;
    flex-shrink: 0;
}

.admin-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-label {
    font-size: 12px;
    color: #666;
}

.admin-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.admin-status-text {
    font-size: 12px;
    font-weight: 500;
}

.sound, .robot {
    font-size: 12px;
}

.sound a, .robot a {
    color: #666;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: inline-block;
}

.sound a:hover, .robot a:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

/* 滚动条样式 */
.service-box::-webkit-scrollbar {
    width: 6px;
}

.service-box::-webkit-scrollbar-track {
    background: transparent;
}

.service-box::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.service-box::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}