/* 工具容器 */
#dpi-converter-tool {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Segoe UI', Arial, sans-serif;
}

/* 上传区域 */
.dpi-upload-zone {
    border: 2px dashed #dcdfe6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    margin-bottom: 20px;
}

.dpi-upload-zone:hover {
    border-color: #409eff;
    background: #f0f7ff;
}

.dpi-upload-zone.dragover {
    border-color: #409eff;
    background: #e8f4ff;
    border-style: solid;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
    color: #909399;
}

.upload-text {
    color: #606266;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.upload-hint {
    color: #c0c4cc;
    font-size: 14px;
}

/* 预览区域容器 */
.dpi-previews-container {
    border-top: 1px solid #ebeef5;
    padding-top: 20px;
}

/* 控制区域 */
.dpi-controls {
    margin-bottom: 20px;
}

.dpi-setting {
    margin-bottom: 15px;
}

.dpi-setting label {
    display: block;
    color: #606266;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.dpi-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    color: #606266;
    background: white;
    transition: border-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.dpi-select:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

/* 操作按钮 */
.dpi-actions {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #ebeef5;
    margin-bottom: 20px;
}

.dpi-clear-btn,
.dpi-convert-btn {
    padding: 10px 28px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    flex: 1;
    text-align: center;
}

.dpi-convert-btn {
    background: #409eff;
    color: white;
    border-color: #409eff;
    order: 1;
}

.dpi-convert-btn:hover {
    background: #66b1ff;
    border-color: #66b1ff;
}

.dpi-convert-btn:disabled {
    background: #c0c4cc;
    border-color: #c0c4cc;
    cursor: not-allowed;
}

.dpi-clear-btn {
    background: white;
    color: #f56c6c;
    border-color: #f56c6c;
    order: 2;
}

.dpi-clear-btn:hover {
    background: #fef0f0;
    border-color: #f56c6c;
}

/* 预览网格 */
.previews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

/* 预览项 */
.dpi-preview-item {
    position: relative;
    border: 1px solid #e4e7ed;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fafafa;
}

.dpi-preview-item:hover {
    border-color: #409eff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.1);
}

.preview-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    background: #f5f5f5;
}

/* 删除按钮 */
.remove-preview-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
}

.dpi-preview-item:hover .remove-preview-btn {
    opacity: 1;
}

.remove-preview-btn:hover {
    background: rgba(245, 108, 108, 0.9);
    transform: scale(1.1);
}

/* 图片信息 */
.preview-info {
    padding: 8px 10px;
    font-size: 12px;
    border-top: 1px solid #ebeef5;
    background: white;
}

.preview-info p {
    margin: 3px 0;
    color: #606266;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-info .file-name {
    font-weight: 500;
    color: #303133;
}

.preview-info .file-size {
    color: #909399;
}

.preview-info .file-format {
    color: #909399;
    font-size: 11px;
    text-transform: uppercase;
    background: #f0f2f5;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 3px;
}

/* 空状态 */
.empty-previews {
    text-align: center;
    padding: 40px 20px;
    color: #c0c4cc;
    font-size: 14px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px dashed #dcdfe6;
    grid-column: 1 / -1;
}

.empty-previews .empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.6;
}
.dpi-content-description {
    width: 100%;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ebeef5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #303133;
}

.description-content {
    max-width: 100%;
    padding: 0 5px;
}

.dpi-content-description h2 {
    font-size: 20px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #409eff;
}

.dpi-content-description h3 {
    font-size: 16px;
    font-weight: 600;
    color: #409eff;
    margin: 18px 0 10px 0;
    padding-left: 0;
}

.description-section {
    margin-bottom: 20px;
    padding: 0;
}

.dpi-content-description p {
    margin: 8px 0;
    color: #606266;
    font-size: 14px;
    line-height: 1.7;
}

.description-section p:first-child {
    margin-top: 0;
}

.description-section ul {
    margin: 8px 0;
    padding-left: 20px;
    color: #606266;
    font-size: 14px;
}

.description-section li {
    margin: 5px 0;
    line-height: 1.6;
}

.dpi-content-description strong {
    color: #303133;
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .dpi-content-description h2 {
        font-size: 18px;
    }
    
    .dpi-content-description h3 {
        font-size: 15px;
    }
    
    .dpi-content-description p {
        font-size: 13px;
    }
}