.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.2em;
}

.tool-content .tool-item {
    display: flex;
    flex-direction: column;
    font-family: var(--font-simple);
    position: relative;
}

.tool-content .tool-item .input-textarea:focus ~ .tool-filter {
    background-color: #f7f9fe;
}

.tool-content .tool-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5em;
    overflow-x: auto; /* 关键：启用横向滚动 */
    white-space: nowrap; /* 防止换行 */
    -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
    height: 48px;
    border-radius: 0 0 7px 7px;
    position: absolute;
    left: 1px;
    bottom: 1px;
    width: calc(100% - 2px);
    border-top: solid 1px #ddd;
    background-color: #f7f9fb;
}

.tool-content .tool-filter label {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.4em;
    cursor: pointer;
}

.tool-content .tool-filter input[type='checkbox'] {
    width: 15px;
    height: 15px;
    border: solid 1.5px #bbb;
    border-radius: 3px;
    transform: translateY(0.5px);
}

.tool-content .tool-filter input[type="checkbox"]:checked {
    background-color: #007bff;
    border-color: #007bff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.tool-content .tool-total {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8em;
    height: 48px;
    border-radius: 0 0 7px 7px;
    position: absolute;
    left: 1px;
    bottom: 1px;
    width: calc(100% - 2px);
    border-top: solid 1px #ddd;
    background-color: #f7f9fb;
    font-size: 14px;
}

.tool-content .tool-total .marks{
    padding: 0 3px;
}

.tool-content .tool-total .num{
    font-family: NumberFont;
    color: #f00;
    font-size: 14px;
}

.tool-content .tool-total .separator{
    font-size: 13px;
    color: #666;
    margin: 0 2px;
}

.tool-content .operate-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/*按钮样式*/
.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-purple {
    color: #fff;
    background-color: rgb(93 79 248 / 95%);
    border-color: var(--primary-color);
}

.btn-grey {
    color: #fff;
    background-color: rgba(100, 100, 100, 0.95);
    border-color: rgba(100, 100, 100, 1);
}

.btn-green {
    color: #fff;
    background-color: rgba(34, 197, 94, 0.95);
    border-color: #22c55e;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ==================== 富文本编辑器 ==================== */
.input-textarea {
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    min-width: 100%;
    max-width: 700px;
    width: 100%;
    min-height: 300px;
    line-height: 30px;
    padding: 6px 12px 55px;
    border-radius: 7px;
    font-family: var(--font-simple);
    outline: none;
    font-size: 15px;
    resize: none;
    display: block;
}

.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);
}

@media (max-width: 768px) {
    .tool-content {
        padding: .8em !important;
        box-shadow: unset;
    }

    .operate-buttons .btn {
        line-height: 32px !important;
        height: 32px !important;
        padding: 0 8px !important;
    }

    .input-textarea {
        min-height: 200px;
    }
}