.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
}

.tool-content .text-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: var(--font-simple);
    margin-bottom: 1.2em;
}

/*单选框*/
.tool-content .text-item .item-radio {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 0;
}

.tool-content .text-item .item-radio .text-radio {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 33.3%;
}

.tool-content .text-item .item-radio .text-radio > label {
    display: block;
    width: 110px;
    padding-right: 10px;
    text-align: right;
}

/*输入框*/
.item-input {
    display: flex;
    align-items: center;
    justify-content: start;
    flex-direction: column;
    gap: 1em;
}

.item-input .input-group {
    display: flex;
    align-items: center;
    justify-content: start;
    width: 100%;
    gap: 0 12px;
}

.item-input .input-group .input-text {
    width: 100%;
    height: 40px;
    background-color: #fff;
    box-shadow: inset 0 1px 4px rgb(211 198 255 / 20%), 0 0 0 2px rgba(224, 224, 224, 0.1);

}

.item-input .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);
}

.item-input .input-group .input-button-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 6px;
    background-color: rgba(34, 197, 94, 0.95);
    border-color: rgba(34, 197, 94, 0.95);
    cursor: pointer;
    color: #fff;
    width: 130px;
    height: 38px;
    font-size: 14px;
}

.item-input .input-group .input-button-del {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 6px;
    background-color: #f84468;
    cursor: pointer;
    color: #fff;
    width: 120px;
    height: 40px;
    font-size: 14px;
}

.item-input .input-group .btn-disable{
    cursor: not-allowed;
    background-color: #ff93a8;
}

.tool-content .operate-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.table-container table tr:first-child {
    font-weight: normal !important;
}

/*按钮样式*/
.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 / 85%);
    border-width: 0;
    fill: #fff;
}

.btn-orange {
    color: #fff;
    background-color: rgb(255 80 0 / 95%);
    border-color: rgb(255, 80, 0);;
    fill: #fff;
}

.btn-green {
    color: #fff;
    background-color: rgba(34, 197, 94, 0.95);
    border-color: #22c55e;
    fill: #fff;
}

.btn-red {
    color: #fff;
    background-color: rgb(242 55 55 / 95%);
    border-color: rgb(255 31 31);
    fill: #fff;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ==================== 进制选择框 ==================== */
.icon-unit-selector {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 0;
    font-size: 14px;
}

.unit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 16px;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.unit-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* 外圈 - 圆形边框 */
.unit-item::before {
    content: '';
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 1.5px solid #adb5bd;
    border-radius: 50%;
    background-color: white;
    transition: all 0.2s ease;
    z-index: 1;
}

.unit-item.active::before {
    border-color: rgba(90, 77, 248, 0.9);
}

/* 内点 - 默认不显示，active 时出现 */
.unit-item::after {
    content: '';
    position: absolute;
    left: 4px;
    width: 10px;
    height: 10px;
    background-color: rgba(90, 77, 248, 0.9);
    border-radius: 50%;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.unit-item.active::after {
    opacity: 1;
}

.unit-label {
    color: #212529;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.unit-item.active .unit-label {
    color: rgba(90, 77, 248, 0.9);
}

table {
    width: 100%;
    border-collapse: collapse;
}

.input-text {
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    min-width: 150px;
    height: 40px;
    line-height: 40px;
    padding: 0 12px;
    border-radius: 7px;
    font-family: var(--font-simple);
    outline: none;
    font-size: 14px;
}

.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);
}

.input-textarea {
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    min-height: 300px;
    line-height: 24px;
    padding: 6px 12px;
    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);
}

/* ==================== 关键：松手后整体弹出动画 ==================== */

@keyframes popIn {
    0% {
        transform: scale(0);
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* 同时给外圈和内点添加动画 */
.unit-item.pop-animation::before,
.unit-item.pop-animation::after {
    animation: popIn 0.3s cubic-bezier(0.25, 0.1, 0.75, 1) forwards;
}

@media (max-width: 768px) {
    .tool-content {
        padding: .8em !important;
    }

    .operate-buttons .btn {
        line-height: 32px !important;
        height: 32px !important;
        padding: 0 8px !important;
    }

    .table-container table th, .table-container table td {
        padding: 6px 8px !important;
    }

}