* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-size: 15px;
    background-color: #f5f7fa;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.5;
}

.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

.text-center::after {
    content: ' ';
    display: inline-block;
    width: 0;
    height: 100%;
    vertical-align: middle;
}


/* 主容器 */

.service {
    width: 100%;
    max-width: 640px;
    height: 100%;
    position: fixed;
    left: 0;
    right: 0;
    margin: auto;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.pc-service {
    width: 372px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}


/* 头部样式 */

.msg-head {
    height: 60px;
    background: linear-gradient(135deg, #4a69bd, #1e3799);
    color: #fff;
    font-size: 17px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.msg-head a {
    width: 40px;
    height: 40px;
    line-height: 40px;
    position: absolute;
    left: 10px;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.msg-head a:hover {
    transform: translateX(-3px);
}

.msg-head a i {
    font-size: 22px;
}

.msg-head .tha {
    height: 20px;
    line-height: 22px;
}

.msg-head .thb {
    height: 20px;
    line-height: 20px;
    font-size: 16px;
}


/* 消息区域 */

.msg-box {
    flex: 1;
    background-color: #f1f5f9;
    padding: 16px 16px 0;
    line-height: 1.5;
    box-sizing: border-box;
    overflow-y: auto;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e6e9f0' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.msg {
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg:last-of-type {
    margin-bottom: 16px;
}


/* 头像样式 */

.msg .img1 {
    width: 40px;
    height: 40px;
    float: left;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.msg .img2 {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* 消息内容样式 */

.msg .content {
    max-width: 70%;
    float: left;
    background-color: #fff;
    margin: 0 0 0 12px;
    padding: 12px 16px;
    box-sizing: border-box;
    position: relative;
    text-align: justify;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.content .indicate {
    display: none;
}

.msg .content img {
    display: block;
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 0;
}


/* 自己发送的消息样式 */

.msg.on .img1 {
    display: none;
}

.msg.on .img2 {
    float: right;
    width: 40px;
    height: 40px;
    display: block;
}

.msg.on .content {
    float: right;
    margin: 0 12px 0 0;
    background-color: #e3f2fd;
    border-color: #bbdefb;
}

.msg-box p {
    margin-top: -6px;
}


/* 输入区域样式 */

input,
textarea {
    border: none;
}

input:focus,
textarea:focus {
    outline: none;
    outline-offset: 0;
}

.msg-post {
    width: 100%;
    height: auto;
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.msg-post textarea {
    flex: 1;
    height: 40px;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
    resize: none;
    font-size: 14px;
    line-height: 20px;
    color: #333;
    transition: all 0.3s ease;
}

.msg-post textarea:focus {
    outline: none;
    border-color: #2196F3;
    background: #fff;
}

.msg-post form {
    margin: 0 10px;
    position: relative;
}

.msg-post label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

.msg-post label:hover {
    background: #f0f0f0;
    border-color: #2196F3;
}

.msg-post label i {
    font-size: 20px;
    color: #2196F3;
}

.msg-post label::after {
    content: '📷';
    font-size: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.msg-post input[type="file"] {
    display: none;
}

.msg-post input[type="button"] {
    width: 70px;
    height: 40px;
    background: #2196F3;
    color: #fff;
    border: none;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.msg-post input[type="button"]:hover {
    background: #1976D2;
}

.msg-post .back {
    width: 50px;
    line-height: 38px;
    text-align: center;
    background-color: #3498db;
    border-radius: 3px;
}

.msg-post .back a {
    text-decoration: none;
    color: inherit;
}


/* 用户列表相关样式 */

.service-box {
    flex: 1;
    font-size: 14px;
    background-color: #fff;
    overflow-y: auto;
    vertical-align: baseline;
}

.user-box {
    padding: 16px 16px 0;
}

.user-box a {
    text-decoration: none;
    color: inherit;
}

.user-list {
    height: 60px;
    background-color: #f9fafc;
    padding: 8px;
    display: flex;
    margin-bottom: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-list:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.user-list img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.user-list .user {
    margin-left: 12px;
    padding-top: 3px;
    flex: 1;
    width: 0;
}

.user-list .user .name {
    height: 23px;
    line-height: 23px;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.user-list .user .name .ison {
    margin-left: 8px;
    font-size: 13px;
    color: #e74c3c;
    vertical-align: 1px;
    font-weight: normal;
}

.user-list .user .last-msg {
    height: 20px;
    line-height: 20px;
    color: #7f8c8d;
    padding-left: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-list .data {
    width: 82px;
    text-align: right;
}

.user-list .data .time {
    height: 27px;
    line-height: 27px;
    color: #7f8c8d;
    font-size: 13px;
}

.user-list .data .num {
    width: 20px;
    height: 20px;
    border-radius: 10px;
    background-color: #e74c3c;
    color: #fff;
    text-align: center;
    line-height: 20px;
    margin-left: 62px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(231, 76, 60, 0.3);
}

.foot {
    height: 50px;
    background-color: #fff;
    padding: 10px;
    display: flex;
    border-top: 1px solid #eaedf3;
}

.foot>div {
    flex: 1;
    padding: 1px;
    margin-right: 10px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 8px;
    color: #fff;
    text-align: center;
    line-height: 38px;
    transition: all 0.3s ease;
}

.foot>div:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.3);
}

.foot a {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}


/* PC版特有样式 */

.pc-main {
    width: 1014px;
    height: 100%;
    position: fixed;
    left: 0;
    right: 0;
    margin: auto;
}

.pc-left {
    width: 372px;
    height: 100%;
    float: left;
    border: 1px solid #eaedf3;
    border-right: none;
    box-sizing: border-box;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.pc-right {
    width: 642px;
    height: 100%;
    float: left;
    border: 1px solid #eaedf3;
    box-sizing: border-box;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}


/* 适配不同屏幕大小 */

@media screen and (max-width: 768px) {
    .msg-head {
        height: 50px;
    }
    .msg-post {
        padding: 10px;
    }
    .msg-post textarea {
        font-size: 14px;
    }
    .msg-post label {
        width: 36px;
        height: 36px;
    }
    .msg-post input[type="button"] {
        width: 60px;
        height: 36px;
        font-size: 14px;
    }
    .msg .content {
        max-width: 85%;
        padding: 10px 12px;
    }
    .msg .content img {
        max-width: 250px;
    }
}

.faq-questions {
    margin-top: 10px;
    border-top: 1px solid #eaeaea;
    padding-top: 10px;
}

.faq-item {
    display: block;
    background-color: #f0f7ff;
    border: 1px solid #c0d8f3;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    color: #2b7bdb !important;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-decoration: none !important;
}

.faq-item:hover {
    background-color: #e0efff;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    text-decoration: none !important;
}

.faq-item:active {
    background-color: #d0e5ff;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.faq-item::after {
    content: "→";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #2b7bdb;
    font-weight: bold;
}


/* 常见问题链接样式 */

.faq-link {
    display: block;
    color: #2b7bdb;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 4px;
    background-color: #f0f7ff;
    border: 1px solid #d0e3ff;
    transition: all 0.2s ease;
}

.faq-link:hover {
    background-color: #e0efff;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-link:active {
    background-color: #d0e5ff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}