.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    border-radius: .6em;
    overflow: hidden;
    position: relative;
    display: flex;
    gap: 1.2em;
}

/*左侧操作栏*/
.wechat-operate {
    width: 450px;
    background-color: #f8f9ff;
    border-left: solid 1px #e5e5e5;
}

.wechat-operate > label {
    font-weight: bold;
    display: block;
    font-family: var(--font-simple);
    text-align: center;
    font-size: 15px;
    line-height: 50px;
}

.menu-operate {
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 1em;
    font-family: var(--font-simple);
}

.menu-operate .input-group {
    display: flex;
    align-items: center;
    justify-content: start;
    width: 100%;
    gap: 0 12px;
}

.menu-operate .input-group > label {
    min-width: 70px;
    text-align: right;
}

/*按钮*/
.btn {
    outline: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
    font-family: var(--font-simple);
}

.btn .ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    animation: ripple-effect 0.6s ease-out forwards;
}

.btn-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-purple {
    color: #fff;
    background-color: rgb(93 79 248 / 95%);
    border-color: var(--primary-color);
}

.btn-purple svg {
    fill: #fff;
}

.btn-red {
    color: #fff;
    background-color: rgb(242 55 55 / 95%);
    border-color: rgb(255 31 31);
}

.btn-red svg {
    fill: #fff;
}


/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/*下拉框*/
.menu-operate .input-group .custom-select {
    position: relative;
    width: 100%;
}

.menu-operate .input-group .custom-select button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 10px;
    gap: 0 6px;
    width: 100%;
    height: 38px;
}

.menu-operate .input-group .select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: max-content;
    min-width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 2px 0;
    white-space: nowrap;
}

.select-dropdown li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 3px 5px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #333;
    font-size: 13.7px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.select-dropdown li:hover,
.select-dropdown li[aria-selected="true"] {
    background-color: #f5f5f5;
}

.select-dropdown li .check-icon {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    opacity: 0;
    display: block !important;
}

.select-dropdown li[aria-selected="true"] .check-icon {
    opacity: 1;
}

/*范围框*/
.menu-operate .input-group .input-range {
    width: 100%;
    height: 5px;
    background-color: #d6d1ff;
    border-radius: 2px;
}

.menu-operate .input-group .input-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f5f4ff;
    cursor: pointer;
    border: 3px solid #887eff;
    box-shadow: 0 0 3px 3px rgb(226 223 255 / 20%);
}

/*输入框*/
.menu-operate .input-group .input-text {
    display: flex;
    flex: 1;
    height: 40px;
    border: solid 1px #ddd;
    background-color: #fff;
    padding: 0 12px;
    border-radius: 7px;
    font-family: var(--font-simple);
    outline: none;
    font-size: 14px;
    box-shadow: inset 0 1px 4px rgb(211 198 255 / 20%), 0 0 0 2px rgba(224, 224, 224, 0.1);
}

.menu-operate .input-group .input-text:focus {
    border-color: #5a4df8;
    background-color: #f8f7fd;
    box-shadow: inset 0 1px 4px rgba(90, 77, 248, 0.2), 0 0 0 2px rgba(90, 77, 248, 0.1);
}

/*微信头像*/
.menu-operate .input-group .avatar-options {
    display: flex;
    align-items: center;
    justify-content: start;
    flex-wrap: wrap;
    gap: 7px;
}

.menu-operate .input-group .avatar-options .avatar-option {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.menu-operate .input-group .avatar-options .avatar-option:hover img {
    border: solid 2px #8278ff;
}

.menu-operate .input-group .avatar-options .avatar-option input[type="radio"] {
    display: none;
}

.menu-operate .input-group .avatar-options .avatar-option input[type="radio"]:checked + img {
    border: solid 2px #8278ff;
}

.menu-operate .input-group .avatar-options .avatar-option img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 0 5px 0 rgb(0 0 0 / 20%);
    transition: border-color 0.2s;
}

.menu-operate .input-group .avatar-options .avatar-upload {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: solid 2px #fff;
    background-color: #ccd3ff;
    box-shadow: 0 0 5px 0 rgb(0 0 0 / 20%);
    transition: border-color 0.2s ease;
}

.menu-operate .input-group .avatar-options .avatar-upload:hover {
    background-color: #bac3fc;
}

.menu-operate .wechat-label {
    margin-top: 1em;
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
}

.menu-operate .wechat-label svg {
    width: 17px;
    height: 17px;
    cursor: pointer;
    color: #7f75f8;
}

.menu-operate .wechat-label svg:hover {
    color: #695fdd;
}

.menu-operate .wechat-label svg:hover + .wechat-tooltip {
    opacity: 1;
    pointer-events: auto;
}

.menu-operate .wechat-label .wechat-tooltip {
    position: absolute;
    bottom: 28px;
    left: -38px;
    background-color: #333;
    color: #fff;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 12.3px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    font-family: var(--font-simple);
    line-height: 1.8;
}

/*富文本框*/
.menu-operate .input-textarea {
    border: solid 1px #ddd;
    background-color: #fff;
    box-shadow: inset 0 1px 4px rgb(211 198 255 / 20%), 0 0 0 2px rgba(224, 224, 224, 0.1);
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    min-height: 250px;
    line-height: 24px;
    padding: 6px 12px;
    border-radius: 7px;
    font-family: var(--font-simple);
    outline: none;
    font-size: 15px;
    resize: none;
    display: block;
}

.menu-operate .input-textarea:focus {
    border-color: #5a4df8;
    background-color: #f8f7fd;
    box-shadow: inset 0 1px 4px rgba(90, 77, 248, 0.2), 0 0 0 2px rgba(90, 77, 248, 0.1);
}

.wechat-preview > label {
    font-weight: bold;
    display: block;
    font-family: var(--font-simple);
    text-align: center;
    font-size: 15px;
    line-height: 50px;
}

.wechat-preview {
    flex: 1;
    margin-bottom: 1em;
}

.wechat-wrapper {
    width: 450px;
    margin: 0 auto;
    padding: 18px 20px 17px 20px;
    overflow: hidden;
    background: url(../images/wechat-box.png) no-repeat top;
    background-size: cover;
}

.wechat-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/*头部信息模块*/
.wechat-container .chat-header {
    position: relative;
    overflow: hidden;
}

.wechat-container .chat-header .header-bg {
    display: block;
    width: 100%;
    border-top-left-radius: 52px;
    border-top-right-radius: 52px;
}

.wechat-container .chat-header .header-time {
    position: absolute;
    top: 16px;
    left: 32px;
    color: #000;
    font-size: 20px;
    font-weight: bold;
    font-family: SimHei, 榛戜綋, sans-serif;
    z-index: 10;
    text-shadow: rgba(255, 255, 255, 0.8) 1px 1px 2px;
}

.wechat-container .chat-header .header-signal {
    position: absolute;
    top: 25px;
    right: 103px;
    z-index: 10;
    background: url(../images/wechat-signal.png) no-repeat;
    width: 20px;
    height: 16px;
    background-size: 100%;
}

.signal-level-4 {
    background-position: 0 0;
}

.signal-level-3 {
    background-position: 0 -18px !important;
}

.signal-level-2 {
    background-position: 0 -35px !important;
}

.signal-level-1 {
    background-position: 0 -53px !important;
}

.wechat-container .chat-header .header-network {
    position: absolute;
    top: 17px;
    right: 73px;
    color: #000;
    font-size: 17px;
    font-weight: 500;
    z-index: 10;
    text-shadow: rgba(255, 255, 255, 0.8) 1px 1px 2px;
}

.wechat-container .chat-header .header-battery {
    position: absolute;
    top: 22px;
    right: 28px;
    z-index: 10;
    background: url(../images/wechat-battery.png) no-repeat center;
    width: 36px;
    height: 18px;
    background-size: 100%;
}

.wechat-container .chat-header .header-battery .battery-level {
    position: absolute;
    top: 3px;
    left: 2.5px;
    height: 12.5px;
    border-radius: 2px;
}

.wechat-container .chat-header .header-nickname {
    position: absolute;
    top: 53px;
    left: 50%;
    transform: translateX(-50%);
    color: #000;
    font-size: 21px;
    font-weight: 500;
    font-family: SimHei, 榛戜綋, sans-serif;
    z-index: 10;
    text-shadow: rgba(255, 255, 255, 0.8) 1px 1px 2px;
}

/*聊天内容模块*/
.chat-messages {
    position: relative;
    width: 100%;
    height: 712px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    background-color: #f5f5f5;
    padding: 30px 15px;
}

.chat-messages::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.avatar-img {
    width: 48px;
    height: 48px;
    margin: 0;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 8px;
}

.message-time {
    font-size: 12px;
    color: #666;
    margin: 10px 0;
    text-align: center;
    padding: 8px 15px;
    display: inline-block;
    font-weight: 500;
    width: 100%;
    position: relative;
}

.chat-messages .message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1.15vw;
    width: 100%;
}

.chat-messages .message .message-content {
    max-width: calc(75% - 30px);
    padding: 8px 12px;
    border-radius: 6px;
    word-wrap: break-word;
    position: relative;
    margin-top: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    white-space: normal;
    line-height: 1.4;
    font-size: 16.6px;
}

.chat-messages .hongbao {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    font-size: 1.15vw;
    width: 100%;
}

.chat-messages .hongbao .hongbao-content {
    max-width: calc(75% - 30px);
    padding: 1px 8px;
    border-radius: 6px;
    word-wrap: break-word;
    position: relative;
    margin-top: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    white-space: normal;
    line-height: 1.4;
}

.chat-messages .me .hongbao-content .hongbao-text {
    position: absolute;
    left: 72px;
    top: 24px;
    color: #fff;
    font-size: 15px;
}

.chat-messages .other .hongbao-content .hongbao-text {
    position: absolute;
    left: 72px;
    top: 24px;
    color: #fff;
    font-size: 15px;
}

.me {
    justify-content: flex-end;
}

.me .message-content {
    background-color: #95ec69;
    color: #000;
    margin-left: 8px;
}

.me .message-content::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 18px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-left-color: #95ec69;
    border-right: 0;
}

.other {
    justify-content: flex-start;
}

.other .message-content {
    background-color: white;
    color: #000;
    border: none;
    margin-right: 8px;
}

.other .message-content::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 18px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-right-color: white;
    border-left: 0;
}

.wechat-container .chat-footer .footer-bg {
    display: block;
    width: 100%;
    border-bottom-left-radius: 52px;
    border-bottom-right-radius: 52px;
}

@media (max-width: 768px) {
    .tool-content {
        border-width: 0;
        flex-direction: column;
        box-shadow: none;
    }

    .wechat-preview{
        margin-bottom: 0;
    }

    .wechat-wrapper {
        width: 100%;
        padding: 12px;
    }

    .chat-messages {
        height: 544px;
        padding: 30px 10px;
    }

    .wechat-container .chat-header .header-bg {
        border-top-left-radius: 40px;
        border-top-right-radius: 40px;
    }

    .wechat-container .chat-footer .footer-bg{
        border-bottom-left-radius: 40px;
        border-bottom-right-radius: 40px;
    }

    .wechat-container .chat-header .header-time {
        top: 8px;
        font-size: 14px;
        text-shadow: none;
    }

    .wechat-container .chat-header .header-signal {
        top: 13px;
        right: 85px;
        width: 15px;
        height: 11px;
    }

    .wechat-container .chat-header .header-network {
        top: 8px;
        right: 62px;
        font-size: 13px;
    }

    .wechat-container .chat-header .header-battery {
        top: 10px;
        right: 25px;
        width: 30px;
        height: 15px;
    }

    .wechat-container .chat-header .header-battery .battery-level {
        position: absolute;
        top: 2.5px;
        left: 2.5px;
        width: 28.5px;
        height: 10px;
        background-color: #000;
        border-radius: 2px;
    }

    .wechat-container .chat-header .header-nickname {
        font-size: 16px;
        top: 39px;
    }

    .chat-messages .message .message-content {
        font-size: 15px;
    }

    .wechat-operate {
        width: 100%;
        border: solid 1px #e5e5e5;
        border-radius: 8px;
    }

    .chat-messages .hongbao .hongbao-content .hongbao-text{
        left: 53px;
        top: 16px;
        font-size: 12px;
    }

    .avatar-img{
        width: 40px;
        height: 40px;
        border-radius: 4px;
    }

    .chat-messages .message .message-content{
        min-height: 40px;
        border-radius: 4px;
        margin-top: 1px;
    }

    .me .message-content::after{
        top: 15px;
    }

    .other .message-content::before{
        top: 15px;
    }
}