/* ========== 二维码美化弹窗 ========== */
.bf-modal-mask {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.bf-modal-mask.show { display: flex; }
.bf-modal-box {
    width: 1050px;
    height: 640px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    animation: bfModalIn 0.25s ease;
}
@keyframes bfModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* 左侧配置区 */
.bf-modal-left {
    flex: 1;
    width: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f0f0f0;
}
.bf-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.bf-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.bf-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}
.bf-modal-close:hover { background: #f5f5f5; color: #333; }

/* Tab 胶囊标签 */
.bf-tabs {
    display: flex;
    padding: 12px 20px;
    gap: 8px;
    flex-wrap: wrap;
}
.bf-tab {
    width: 72px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #666;
    border: 0;
    background: #fff;
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.2s;
}
.bf-tab:hover { 
    color: #165dff;
}
.bf-tab.active {
    color: #fff;
    background: linear-gradient(268.5deg, rgba(38,111,255,1) 1.98%, rgba(70,179,240,1) 98.71%);
    font-weight: 500;
}

/* Tab 内容区 */
.bf-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* 模版子分类 Tab */
.bf-sub-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}
.bf-sub-tab {
    padding: 6px 18px;
    font-size: 13px;
    color: #666;
    border: 0;
    background: #f4f4f4;
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.2s;
}
.bf-sub-tab.active {
    color: #266fff;
    background: #ebf2ff;
}

/* 模版网格 */
.bf-template-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.bf-template-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 0;
    color: #999;
    font-size: 13px;
}
.bf-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e8e8e8;
    border-top-color: #165dff;
    border-radius: 50%;
    animation: bf-spin 0.7s linear infinite;
}

/* 模版项 */
.bf-template-item {
    position: relative;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
    background: #f9f9f9;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bf-template-item img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    border-radius: 8px;
}
.bf-template-item:hover {
    border-color: #d0d0d0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.bf-template-item.selected {
    border-color: #165dff;
    box-shadow: 0 0 0 2px rgba(22,93,255,0.15);
}

/* 模板包裹层 */
.bf-template-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 模板名称（选项框外下方） */
.bf-template-name {
    font-size: 12px;
    color: #333;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-top: 6px;
    padding: 0 4px;
}

/* 模板删除按钮 */
.bf-template-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    border: none;
    cursor: pointer;
    padding: 0;
    display: none;
}
.bf-template-item:hover .bf-template-delete {
    display: block;
}
.bf-template-delete:hover {
    background: #ff4444;
}

/* 设为默认按钮（hover时居中显示） */
.bf-template-set-default {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 13px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    display: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 5;
}
.bf-template-item:hover .bf-template-set-default {
    display: block;
}
.bf-template-set-default:hover {
    background: #165dff;
    color: #fff;
}

/* 默认标签（左下角常驻） */
.bf-template-default-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    padding: 2px 8px;
    background: #165dff;
    color: #fff;
    font-size: 11px;
    border-radius: 4px;
    z-index: 4;
}

/* 空状态 */
.bf-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #999;
    font-size: 14px;
}

/* 分区标题 */
.bf-section-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 16px;
}

/* LOGO 选择网格 */
.bf-logo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}
.bf-logo-all-grid {
    display: flex;
    gap: 16px;
    padding: 4px;
}
.bf-logo-all-grid .bf-logo-icon {
    width: 40px;
    height: 40px;
}

/* Logo 效果选项网格（仅3项） */
.bf-effect-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* 效果图标描边预览 */
.bf-effect-icon-origin{
    border: 2px solid #fff;
    overflow: hidden;
}
.bf-effect-icon-rect {
    border: 2px solid #fff;
    border-radius: 6px;
    overflow: hidden;
}
.bf-effect-icon-circle {
    border: 2px solid #fff;
    border-radius: 50%;
    overflow: hidden;
}
.bf-logo-item {
    width: 65px;
    height: 65px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    box-sizing: border-box;
}
.bf-logo-item:hover {
    border-color: #c0c4cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bf-logo-item.selected {
    border-color: #165dff;
    box-shadow: 0 0 0 2px rgba(22,93,255,0.12);
}
.bf-logo-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bf-logo-icon svg {
    width: 28px;
    height: 28px;
}
.bf-logo-label {
    font-size: 10px;
    color: #666;
}

/* 右侧预览区 */
.bf-modal-right {
    width: 380px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.bf-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}
.bf-preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.bf-preview-qrcode {
    width: 300px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bf-preview-qrcode canvas,
.bf-preview-qrcode svg {
    display: block;
    width: 100%;
}

/* 预览操作区 */
.bf-preview-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
}
.bf-preview-actions .bf-btn-confirm{
    width: 100%;
}
.bf-btn-confirm {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 100px;
    background: linear-gradient(268.5deg, rgba(38,111,255,1) 1.98%, rgba(70,179,240,1) 98.71%);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}
.bf-btn-confirm:hover { opacity: 0.9; }
.bf-preview-links {
    width: 100%;
    display: flex;
    justify-content: space-between;
}
.bf-link {
    font-size: 13px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}
.bf-link.point {
    color: #165dff;
}

/* ========== 其他设置 ========== */
/* 选项胶囊行 */
.bf-option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.bf-option-pill {
    padding: 6px 16px;
    font-size: 13px;
    color: #666;
    background: #f4f4f4;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.bf-option-pill:hover {
    color: #266fff;
    background: #ebf2ff;
}
.bf-option-pill.selected {
    color: #fff;
    background: #266fff;
}
/* 选项说明文字 */
.bf-option-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.6;
}
/* 码点/码眼选项网格 */
.bf-module-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.bf-module-item {
    cursor: pointer;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
}
.bf-module-item:hover {
    border-color: #c0c4cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bf-module-item.selected {
    border-color: #165dff;
    box-shadow: 0 0 0 2px rgba(22,93,255,0.12);
}
.bf-module-icon {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    padding: 8px;
    box-sizing: border-box;
}
.bf-mayan-icon {
    width: 65px;
    height: 65px;
    padding: 8px;
}
.bf-module-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ========== 颜色 Tab ========== */

/* 颜色模式单选（无背景无边框，仅靠 radio dot 显示选中状态） */
.bf-color-mode-group {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}
.bf-radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}
.bf-radio-item input[type="radio"] {
    display: none;
}
.bf-radio-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.bf-radio-item input:checked + .bf-radio-dot {
    border-color: #165dff;
    background: #165dff;
}
.bf-radio-item input:checked + .bf-radio-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

/* 推荐颜色网格（每排7个，正方形无圆角） */
.bf-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}
.bf-color-swatch {
    width: 40px;
    height: 40px;
    padding: 2px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s;
}
.bf-color-swatch-inner{
    width: 100%;
    height: 100%;
    border-radius: 8px;
}
.bf-color-swatch:hover {
    border-color: #c0c4cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bf-color-swatch.selected {
    border: 1px solid #165dff;
    box-shadow: 0 0 0 2px rgba(22,93,255,0.12);
}

/* 自定义颜色行 */
.bf-custom-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}
.bf-color-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bf-color-picker-label {
    font-size: 13px;
    color: #333;
}
.bf-color-picker {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    cursor: pointer;
    padding: 2px;
    background: #fff;
}
.bf-color-picker-sm {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    cursor: pointer;
    padding: 2px;
    background: #fff;
}

/* 复选框 */
.bf-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}
.bf-checkbox-item input[type="checkbox"] {
    display: none;
}
.bf-checkbox-dot {
    width: 16px;
    height: 16px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.bf-checkbox-item input:checked + .bf-checkbox-dot {
    border-color: #165dff;
    background: #165dff;
}
.bf-checkbox-item input:checked + .bf-checkbox-dot::after {
    content: '';
    width: 8px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    margin-top: -2px;
}

/* 双色选择器行 */
.bf-color-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bf-color-picker-label {
    font-size: 13px;
    color: #333;
}

/* 渐变方向单选组 */
.bf-gradient-dir-group {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

/* 背景色行（提示文案与颜色选择器同行） */
.bf-bg-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.bf-color-tip {
    font-size: 12px;
    color: #999;
}
/* 透明按钮与颜色选择器保持一致的尺寸和样式 */
.bf-transparent-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bf-transparent-btn:hover {
    border-color: #165dff;
    color: #165dff;
}

/* 码眼颜色行 */
.bf-corner-color-row {
    display: flex;
    gap: 20px;
}
.bf-corner-color-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bf-corner-color-label {
    font-size: 13px;
    color: #333;
}

/* 前景图填充色块 */
.bf-pattern-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}
.bf-pattern-swatch {
    width: 65px;
    height: 65px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bf-pattern-swatch:hover {
    border-color: #c0c4cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bf-pattern-swatch.selected {
    border: 1px solid #165dff;
    box-shadow: 0 0 0 2px rgba(22,93,255,0.12);
}
.bf-pattern-img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

/* ========== 文字 Tab ========== */
/* 输入字段组（input + counter） */
.bf-text-field {
    margin-bottom: 12px;
}
.bf-text-input-wrap {
    position: relative;
}
.bf-text-input {
    width: 100%;
    height: 36px;
    padding: 0 50px 0 14px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.bf-text-input:focus {
    border-color: #165dff;
}
.bf-text-input:disabled {
    background: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
}
.bf-text-input::placeholder {
    color: #bbb;
}
.bf-text-counter {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #bbb;
    white-space: nowrap;
    pointer-events: none;
}

/* 字体行（粗细 + 大小 并排） */
.bf-text-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.bf-text-select-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bf-text-select-label {
    font-size: 13px;
    color: #333;
}
.bf-text-select {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.bf-text-select:focus {
    border-color: #165dff;
}

/* 文字位置单选组 */
.bf-text-position-group {
    display: flex;
    gap: 16px;
}

/* 外框样式网格 */
.bf-border-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}
.bf-border-item {
    width: 65px;
    height: 65px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}
.bf-border-item:hover {
    border-color: #c0c4cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bf-border-item.selected {
    border-color: #165dff;
    box-shadow: 0 0 0 2px rgba(22,93,255,0.12);
    background: #fff;
}
.bf-border-img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    display: block;
}
.bf-border-none-text {
    font-size: 12px;
    color: #666;
    user-select: none;
}
.bf-border-item.selected .bf-border-none-text {
    color: #165dff;
}
.bf-border-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}
.bf-border-page-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.bf-border-page-btn:hover:not(:disabled) {
    border-color: #165dff;
    color: #165dff;
}
.bf-border-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.bf-border-page-info {
    font-size: 13px;
    color: #666;
    user-select: none;
}

/* 保存模板弹窗 */
.bf-save-template-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 12px;
}
.bf-save-template-mask.show {
    display: flex;
}
.bf-save-template-box {
    background: #fff;
    border-radius: 12px;
    width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.bf-save-template-header {
    height: 56px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f0f0f0;
}
.bf-save-template-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
}
.bf-save-template-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    font-size: 20px;
}
.bf-save-template-close:hover {
    color: #333;
}
.bf-save-template-body {
    padding: 24px 32px 16px;
}
.bf-save-template-form {
    margin-bottom: 16px;
}
.bf-save-template-label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}
.bf-save-template-input-wrap {
    position: relative;
}
.bf-save-template-input {
    width: 100%;
    height: 36px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 0 50px 0 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.bf-save-template-input:focus {
    border-color: #165dff;
}
.bf-save-template-count {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
}
.bf-save-template-tip {
    font-size: 13px;
    color: #999;
    margin-top: 8px;
}
.bf-save-template-footer {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 24px;
    border-top: 1px solid #f0f0f0;
}
.bf-btn-cancel {
    width: 106px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 100px;
    background: #fff;
    color: #165dff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}
.bf-btn-cancel:hover {
    background: #EBF2FF;
}
.bf-btn-confirm {
    width: 106px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 100px;
    background: linear-gradient(268.5deg, rgba(38,111,255,1) 1.98%,rgba(70,179,240,1) 98.71%);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}
@keyframes bf-spin {
    to { transform: rotate(360deg); }
}

/* 自定义颜色选择器触发器 */
.bf-color-picker-trigger {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 3px;
    background: #fff;
    transition: all 0.2s;
}
.bf-color-picker-trigger:hover {
    border-color: #c0c4cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bf-color-picker-preview {
    width: 100%;
    height: 100%;
    border-radius: 5px;
}
.bf-color-picker-hex {
    font-size: 13px;
    color: #666;
    font-family: monospace;
}

/* 自定义颜色选择器弹窗 */
.bf-color-picker-modal {
    position: fixed;
    display: none;
    visibility: hidden;
    z-index: 10000;
}
.bf-color-picker-modal.show {
    display: block;
}
.bf-color-picker-dialog {
    background: #fff;
    border-radius: 8px;
    width: 360px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}
.bf-color-picker-body {
    padding: 20px;
}
.bf-color-picker-main {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.bf-color-picker-saturation {
    flex: 1;
    height: 200px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}
.bf-color-picker-saturation-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.bf-color-picker-saturation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, #fff, transparent);
}
.bf-color-picker-saturation-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, #000);
}
.bf-color-picker-pointer {
    position: absolute;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.bf-color-picker-pointer-inner {
    width: 100%;
    height: 100%;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0,0,0,0.6);
}
.bf-color-picker-hue {
    width: 24px;
    display: flex;
    flex-direction: column;
}
.bf-color-picker-hue-slider {
    width: 24px;
    height: 200px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to bottom, 
        hsl(0, 100%, 50%), 
        hsl(60, 100%, 50%), 
        hsl(120, 100%, 50%), 
        hsl(180, 100%, 50%), 
        hsl(240, 100%, 50%), 
        hsl(300, 100%, 50%), 
        hsl(360, 100%, 50%)
    );
    border-radius: 12px;
    cursor: pointer;
    writing-mode: bt-lr;
    -webkit-writing-mode: vertical-lr;
    transform: rotate(180deg);
}
.bf-color-picker-hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 2px rgba(0,0,0,0.6);
    cursor: pointer;
}
.bf-color-picker-hue-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 2px rgba(0,0,0,0.6);
    cursor: pointer;
}
.bf-color-picker-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}
.bf-color-picker-input {
    flex: 1;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
    font-family: monospace;
    outline: none;
    transition: border-color 0.2s;
}
.bf-color-picker-input:focus {
    border-color: #165dff;
}
.bf-color-picker-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.bf-color-picker-btn-clear {
    background: transparent;
    border: none;
    color: #165dff;
}
.bf-color-picker-btn-clear:hover {
    background: #f0f5ff;
}
.bf-color-picker-btn-confirm {
    background: #165dff;
    border: 1px solid #165dff;
    color: #fff;
}
.bf-color-picker-btn-confirm:hover {
    background: #1252e0;
    border-color: #1252e0;
}
