.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
    margin-bottom: 1.2em;
}

.tool-content .item-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: solid 1px #ddd;
    border-radius: 7px;
    background-color: var(--main-bg);
    width: 100%;
    height: 500px;
    padding: 1em;
    position: relative;
}

.tool-content .item-preview img {
    max-width: 100%;
    max-height: 100%;
    border: solid 8px #fff;
    margin: 0 auto;
    cursor: crosshair;
}

.tool-content .item-preview .color-preview {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    background-color: #f0f0f0;
    display: block;
    z-index: 10;
}

/*颜色区*/
.item-color {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 1.2em 0;
    border-bottom: solid 1px #ddd;
    padding-bottom: 1.2em;
}

.item-color .color-value {
    display: flex;
    align-items: center;
    border: solid 1px #ddd;
    height: 38px;
    border-radius: 6px;
    font-weight: 600;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
}

.item-color .color-value .color-label {
    width: 70px;
    line-height: 38px;
    text-align: center;
    font-family: var(--font-simple);
    font-size: 14px;
    padding: 0 12px;
    background-color: var(--main-bg);
    border-right: solid 1px #ddd;
}

.item-color .color-value .color-code {
    width: 150px;
    line-height: 38px;
    font-family: var(--font-simple);
    font-size: 14px;
    padding: 0 12px;
}

.item-color .color-value .color-input:focus {
    background-color: #f8f7fd;
}

.item-color .color-value .color-copy {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--main-bg);
    border-left: solid 1px #ddd;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.tool-content .operate-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.2em;
}

.table-container {
    margin-top: 1.2em;
}

/*按钮样式*/
.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 svg {
    width: 0.92em;
    height: 0.92em;
}

.btn svg {
    fill: #fff;
}

.btn-purple {
    color: #fff;
    background-color: rgb(93 79 248 / 95%);
    border-color: var(--primary-color);
}

.btn-red {
    color: #fff;
    background-color: rgb(242 55 55 / 95%);
    border-color: rgb(255 31 31);
}

.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;
}

.btn-green svg{
    width: 1.1em;
    height: 1.1em;
}

.btn-color-copy {
    cursor: pointer;
    font-family: var(--font-simple);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-color-copy:hover {
    color: #6b60ff;
}

.table-container table {
    table-layout: fixed;
}

.table-container table th, .table-container table td {
    border-width: 0;
    text-align: center;
}

.table-container table td:first-child span {
    display: block;
    margin: 0 auto;
    border: solid 1px #ddd;
    width: 22px;
    height: 22px;
}

.table-container table th:nth-child(n+2),
.table-container table td:nth-child(n+2) {
    width: calc(33.3% - 40px);
    white-space: nowrap;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .tool-content {
        padding: .8em !important;
    }

    .table-container table th, .table-container table td {
        padding: 6px 8px !important;
    }

    .table-container table th:nth-child(n+2), .table-container table td:nth-child(n+2){
        width: 200px;
    }

    .item-color{
        flex-direction: column;
    }

    .item-color .color-value{
        width: 100%;
    }

    .item-color .color-value .color-code{
        display: flex;
        flex: 1;
    }

    .tool-content .item-preview .color-preview{
        display: none;
    }
}