/* 工作区 */
/* 上传区域 */
.img-dropzone {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.img-dropzone.dragover {
    background: rgba(37, 99, 235, 0.05);
    border-color: #2563eb;
}

.img-dropzone-content {
    text-align: center;
    color: #666;
}

.img-dropzone-content svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    stroke: currentColor;
}

.img-dropzone-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.img-dropzone-content p:last-child {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

/* 取色器区域 */
.color-picker {
    display: none;
    margin-top: 20px;
    gap: 20px;
}

/* 左侧画布区域 */
.preview-section {
    flex: 1;
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#imageCanvas {
    width: 100%;
    height: 400px;
    cursor: crosshair;
    object-fit: contain;
}

/* 取色指示器 */
.color-pointer {
    position: fixed;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 1000;
    display: none;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    box-shadow: 
        0 0 0 2px #fff,
        0 0 0 3px rgba(0, 0, 0, 0.2);
}

/* 右侧颜色信息 */
.color-info {
    width: 250px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.color-preview {
    width: 100%;
    height: 60px;
    border-radius: 6px;
    margin-bottom: 16px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.color-values {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.color-value span {
    font-size: 12px;
    color: #666;
}

.color-value input {
    width: 100%;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    color: #333;
    background: #f8f9fa;
}

/* 工具容器 */
.tool-content {
    flex: 1;
    overflow: hidden;
    margin-bottom: 2rem;
}


/* 取色记录 */
.color-history {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 16px;
    margin: 12px 0;
    min-height: 68px;
    position: relative;
}

/* 空状态提示文案 */
.color-history::after {
    content: '取色记录';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    font-size: 14px;
    pointer-events: none;
}

.color-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 36px;
    position: relative;
    z-index: 1;
    min-height: 36px;
}

/* 当列表不为空时隐藏提示文案 */
.color-list:not(:empty) ~ .color-history::after {
    display: none;
}

.color-item {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 
        inset 0 0 0 1px rgba(0,0,0,0.1),
        0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.color-item:hover {
    transform: translateY(-2px);
    box-shadow: 
        inset 0 0 0 1px rgba(0,0,0,0.1),
        0 4px 8px rgba(0,0,0,0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {


    .color-history {
        padding: 12px;
        margin: 8px 0;
        min-height: 56px;  /* 32px(颜色块高度) + 24px(上下内边距) */
    }

    .color-list {
        gap: 8px;
        min-height: 32px;  /* 与移动端颜色块高度一致 */
    }

    .color-item {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }
}

