.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-tool {
    display: flex;
    flex-direction: column;
    gap: 1.2em;
    font-family: var(--font-simple);
}

.item-tool .random-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border: solid 1px #ddd;
    background-color: var(--main-bg);
    width: 100%;
    min-height: 400px;
    border-radius: 7px;
    font-family: var(--font-simple);
    cursor: pointer;
    user-select: none;
}

/*按钮样式*/
.tool-content .operate-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    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;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/*下拉框样式*/
.tool-content .item-select {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2em 1em;
    flex-direction: row;
    margin: 1.2em 0;
    border-bottom: solid 1px #ddd;
    padding-bottom: 1.2em;
}

.tool-content .item-select .options {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 5px;
}

.tool-content .item-select .options label {
    font-size: 13.5px;
}

.tool-content .item-select .options .custom-select {
    position: relative;
}

.tool-content .item-select .options .custom-select button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 8px;
    gap: 0 6px;
}

.tool-content .item-select .options .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;
}

/*input输入框*/
.input-text {
    border: 1px solid #ddd;
    background-color: var(--main-bg);
    width: 130px;
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    font-family: var(--font-simple);
    outline: none;
    font-size: 14px;
    text-align: center;
}

.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-color {
    border: 1px solid #ddd;
    background-color: var(--main-bg);
    width: 130px;
    height: 36px;
    line-height: 36px;
    padding: 3px;
    text-indent: 12px;
    border-radius: 6px;
    font-family: var(--font-simple);
    outline: none;
    font-size: 14px;
    cursor: pointer;
}

/* 针对不同浏览器的进一步优化 */
.input-color::-webkit-color-swatch {
    border: none; /* 清除颜色块的边框 */
    border-radius: 4px; /* 与input保持一致 */
}

.input-color::-webkit-color-swatch-wrapper {
    padding: 0; /* 清除颜色块容器的内边距 */
}

/* Firefox */
.input-color::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.named-List, .unnamed-List {
    gap: 0.5em !important;
    margin-top: 1em;
}

.named-List > p, .unnamed-List > p {
    color: #666;
    margin-bottom: 0;
}

.item-tool .name-list {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 10px;
    flex-wrap: wrap;
}

.item-tool .name-list li {
    border: 1px solid #eaeaea;
    color: #336cc9;
    line-height: 2;
    padding: 0 10px;
    cursor: pointer;
    margin-bottom: 0;
}

/* ===== 名单编辑弹窗 ===== */
.edit-names-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(25, 27, 31, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.edit-names-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.edit-names-modal {
    background: white;
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(90, 77, 248, 0.15);
    width: 90%;
    max-width: 540px;
    transform-origin: center;
    transform: scale(0.5);
    opacity: 0;
    transition: all 0.4s
    cubic-bezier(0.16, 1, 0.3, 1);
}

.edit-names-overlay.active .edit-names-modal {
    transform: scale(1);
    opacity: 1;
}

.edit-names-title {
    margin: 0 0 8px;
    color: #1a1a1a;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
}

.edit-names-underline {
    height: 3px;
    width: 27px;
    background-color: #5a4df8;
    border-radius: 3px;
    margin: 6px auto 15px;
}

.edit-names-description {
    color: #555;
    font-size: 15px;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 15px;
    padding: 0 10px;
}

.edit-names-group {
    margin-bottom: 20px;
}

.edit-names-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    background-color: var(--main-bg);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    resize: none;
    outline: none;
    font-family: var(--font-simple);
}

.edit-names-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);
}

.edit-names-button-container {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.edit-names-btn-cancel {
    background-color: #f4f6f9;
    color: #495057;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    min-width: 88px;
    transition: all 0.2s ease;
}

.edit-names-btn-cancel:hover {
    background-color: #e9ecef;
}

.edit-names-btn-save {
    background-color: #5a4df8;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    min-width: 88px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(90, 77, 248, 0.2);
}

.edit-names-btn-save:hover {
    background-color: #4c3de5;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(90, 77, 248, 0.35);
}

@media (max-width: 768px) {
    .tool-content {
        padding: .8em !important;
    }

    .item-tool .random-box{
        min-height: 200px;
    }
}